Deals
  • 4 Minutes to read

    Deals


      Article summary

      This article describes resources for adding, updating, and reading deals and for enabling advertisers and advertiser groups to access those deals.

      Overview

      A deal is a set of terms reflecting an agreement between an exchange and an advertiser that is executed programmatically via a deal ID.

      Deals are negotiated offline between the publisher and advertiser networks. The network administrator can set up and share deals with advertiser groups or advertisers. The advertiser must then target the exchange with or without the deal ID.

      Yahoo DSP supports Shared Deals. In a shared deal the publisher offers supply on an exchange to all interested buyers.

      Endpoint

      /traffic/deals

      The action taken depends on the HTTP method and the parameters specified.

      • Use the GET method to read an existing deal.

      • Use the POST method to create a new deal.

      • Use the PUT method to update an existing deal.

      Resources

      Deal

      The Deals object contains the following fields:

      Name

      Description

      Type

      Create

      Update

      id

      Specifies the deal ID.

      integer

      N/A

      Required

      name

      Specifies the name of the deal.

      string

      Required

      Optional

      status

      Specifies the current status of the deal.

      Allowed values:

      • ACTIVE: the deal is active.

      • INACTIVE: the deal is inactive.

      string

      Required

      Optional

      exchangeId

      Specifies the exchange ID.

      To learn more, refer to Exchanges.

      integer

      Required

      Optional

      exchangeDealId

      Specifies the unique ID for the deal on the exchange.

      string

      Required

      Optional

      description

      Specifies a brief description of the deal.

      string

      Required

      Optional

      reservePrice

      Specifies the acceptable reserve price for the deal.

      Default value is 0.

      number

      Optional

      Optional

      spendCommitment

      A negotiated commitment made with a publisher to reach a specific inventory cost. Specify a spend commitment in order to track spend and progress towards fulfilling that commitment. Default value is null.

      number

      Optional

      Optional

      accountGroupId

      Specifies an account group that can target the deal.

      An account group is a set of advertiser accounts that are managed as a group. To learn more, refer to Account Groups.

      number

      Optional

      Optional

      accountIsExcluded

      Specifies whether an advertiser may or may not access the deal:

      • true: all advertisers may target the deal except those specified in accounts and accountGroups array parameters.

      • false: an advertiser may target the deal only if it is specified in accounts and accountGroups array parameters.

      boolean

      Required

      Optional

      accounts

      Specifies an array of advertiser IDs that can or cannot target the deal depending on the value of the accountIsExcluded parameter.

      If the accountIsExcluded parameter is true, account IDs specified in this array cannot target the deal.

      array

      Optional

      Optional

      accountGroups

      Specifies an array of account group IDs that can or cannot target the deal depending on the value of the accountIsExcluded parameter.

      If the accountIsExcluded parameter is true, account group IDs specified in this array cannot target the deal.

      An account group is a set of advertiser accounts that are managed as a group. To learn more, refer to Account Groups.

      array

      Optional

      Optional

      Read Deal

      Get data for a specific deal.

      GET /traffic/deals/{id}

      Parameters

      Parameter

      Parameter Type

      Description

      Data Type

      Required

      id

      path

      Specifies the deal ID.

      integer

      Y

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/deals/2269365

      Example Response

      {
        "response": {
          "status": "ACTIVE",
          "id": 2269365,
          "name": "deal for targeting",
          "exchangeId": 3,
          "exchangeDealId": "43434",
          "description": "line deal",
          "reservePrice": 1,
          "accountIsExcluded": false,
          "accounts": [
            1356341
          ]
        },
        "errors": null,
        "timeStamp": "2017-09-22T04:43:02Z"
      }

      Read Deals

      Get a filtered list of deals.

      GET /traffic/deals?query={query}&page={page}&limit={limit}&sort={sort}&dir={dir}

      All of the accepted parameters are query parameters.

      Parameters

      Parameter

      Description

      Data Type

      Required

      query

      Specifies the search term.

      Use URL encoding conventions (i.e. a space should be replaced with a + or %20).

      string

      N

      page

      Specifies the page number.

      integer

      N

      limit

      Specifies the total number of items to return. The maximum value is 100.

      integer

      N

      sort

      Specifies the column to sort by.

      string

      N

      dir

      Specifies the sort direction. Allowed values:

      • ASC: data is sorted in ascending order.

      • DESC: data is sorted in descending order.

      string

      N

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/deals?page=1&limit=2

      Example Response

      {
        "response": [
         {
            "id": 1,
            "name": "Test_Deal_1",
            "exchangeId": 1,
            "exchangeDealId": "1",
            "description": "A deal description",
            "reservePrice": 0,
            "status": "ACTIVE",
            "accountIsExcluded": false,
            "accounts": []
          },
          {
            "id": 2,
            "name": "Test_Deal_2",
            "exchangeId": 1,
            "exchangeDealId": "2",
            "description": "A deal description",
            "reservePrice": 0,
            "status": "INACTIVE",
            "accountIsExcluded": false,
            "accounts": []
          }
        ],
        "errors": null,
        "timeStamp": "2017-04-12T04:49:06Z"
      }

      Create Deal

      Create a new deal.

      POST /traffic/deals

      Parameters

      All parameters are specified in the body of the application/json payload.

      Example Request URL

      POST https://dspapi.admanagerplus.yahoo.com/traffic/deals

      Example Request Body

      {
        "name": "deal for targeting 24",
        "exchangeDealId": "43434",
        "description": "line deal",
        "reservePrice": 1,
        "exchangeId": 3,
        "status": "ACTIVE",
        "accountIsExcluded": false,
        "accounts": [
          1356341
        ],
        "accountGroupId": 2492
      }

      Example Response

      {
        "response": {
          "status": "ACTIVE",
          "id": 2293549,
          "name": "deal for targeting 24",
          "exchangeId": 3,
          "exchangeDealId": "43434",
          "description": "line deal",
          "reservePrice": 1,
          "accountIsExcluded": false,
          "accountGroupId": 2492,
          "accounts": [
            1356341
          ],
          "accountGroups": []
        },
        "errors": null,
        "timeStamp": "2018-09-06T01:52:03Z"
      }

      Update Deal

      Update an existing deal.

      PUT /traffic/deals/{id}

      Partial updates are supported; values of supported fields which are not in the payload will remain unchanged.

      Parameters

      The Deal id is specified in the url path. All other fields are specified in the body of the application/json payload.

      Example Request URL

      PUT https://dspapi.admanagerplus.yahoo.com/traffic/deals/2269365

      Example Request Body

      {
        "status": "ACTIVE",
        "accounts": [1356341]
      }

      Example Response

      {
        "response": {
          "status": "ACTIVE",
          "id": 2269365,
          "name": "Z_Auto_Deal-TEST9",
          "exchangeId": 3,
          "exchangeDealId": "43434",
          "description": "line deal",
          "reservePrice": 1,
          "accountIsExcluded": false,
          "accounts": [
            1356341
          ],
          "accountGroups": []
        },
        "errors": null,
        "timeStamp": "2018-09-06T01:41:44Z"
      }

      Delete Deal

      The DSP Traffic API does not support deletion of deals.


      Was this article helpful?