- 4 Minutes to read
Deals
- 4 Minutes to read
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 |
---|---|---|---|---|
| Specifies the deal ID. |
| N/A | Required |
| Specifies the name of the deal. |
| Required | Optional |
| Specifies the current status of the deal. Allowed values:
|
| Required | Optional |
| Specifies the exchange ID. To learn more, refer to Exchanges. |
| Required | Optional |
| Specifies the unique ID for the deal on the exchange. |
| Required | Optional |
| Specifies a brief description of the deal. |
| Required | Optional |
| Specifies the acceptable reserve price for the deal. Default value is 0. |
| Optional | Optional |
| 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. |
| Optional | Optional |
| 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. |
| Optional | Optional |
| Specifies whether an advertiser may or may not access the deal:
|
| Required | Optional |
| Specifies an array of advertiser IDs that can or cannot target the deal depending on the value of the If the |
| Optional | Optional |
| Specifies an array of account group IDs that can or cannot target the deal depending on the value of the If the An account group is a set of advertiser accounts that are managed as a group. To learn more, refer to Account Groups. |
| 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 |
---|---|---|---|
| Specifies the search term. Use URL encoding conventions (i.e. a space should be replaced with a |
| N |
| Specifies the page number. |
| N |
| Specifies the total number of items to return. The maximum value is |
| N |
| Specifies the column to sort by. |
| N |
| Specifies the sort direction. Allowed values:
|
| 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.