V1 Deals Sync API for Buyers¶
Warning
In Q3 2024, we will begin gradually phasing out of the Deals Sync API v1.0, starting with sunsetting the POST
method. Please follow the Deals Sync API for Buyers V1 to V2 Migration Guide.
The API enables you to programmatically update and negotiate deals with Suppliers.
Important
Deals are only created by Suppliers, therefore your can only update existing deals.
The maximum number of deals objects per
post
orput
request is 50.
Syncing Deal Data¶
It is expected that to receive updated information your system should make regular
get
requests to the Deals Sync API. The Deals Sync API will not push data to your system. To get
the details of your deals, make regular get
requests to this endpoint, which will
return all of your deal details.
<!-- GET this endpoint where the <dsp-id> is the BidSwitch Seat ID -->
<!-- and <version> is v1 or v2 -->
https://my.bidswitch.com/api/v1/dsp/<dsp-id>/deals/
{
"deals": [
{
"deal_id": "id:123:yolo-campaign",
"display_name": "Deal Busters",
"ssp_name": "exampleSSP",
"buyers": [
"abc",
"def"
],
"inventory_source": [
"pub-123",
"pub-321"
],
"contact_email": "someone@example.com",
"guaranteed_units_purchased_count": 23000,
"start_time": "2019-10-02T15:01:23.045123456Z",
"end_time": "2019-11-02T15:01:23.045123456Z",
"dsp_update_time": "2019-11-02T15:01:43.045123456Z",
"ssp_update_time": "2019-11-02T15:01:43.045123456Z",
"deal_type": "private_auction",
"contract_type": "guaranteed",
"dsp_deal_status": "active",
"price_method": "cpm",
"price": 5432.12,
"currency_code": "usd",
"price_type": "auction",
"bid_floor": 2.678,
"revision_id": 3,
"creative_type": "video",
"display_sizes": [
{
"w": 320,
"h": 70
},
{
"w": 80,
"h": 250
}
],
"duration": 15,
"duration_match": "equals_to_duration",
"skippable": "skippable"
}
]
}
Updating a Deal¶
To update an existing deal, PUT
the changes to the Deals Sync API, ensuring you specify the
correct "deal_id"
and changes in the request body.
<!-- PUT to this endpoint where the <dsp-id> is your BidSwitch Seat ID -->
<!-- and <version> is v1 or v2 -->
https://my.bidswitch.com/api/v1/dsp/<dsp-id>/deals/
{
"deals": [
{
"deal_id": "id:123:playoff-campaign",
"display_name": "Deal Busters",
"ssp_name": "abc-123",
"ssp_bid_request_name": "rubicon",
"buyers": [
"abc",
"def"
],
"inventory_source": [
"pub-123"
],
"contact_email": "someone@example.com",
"guaranteed_units_purchased_count": 23000,
"start_time": "2019-10-02T15:01:23.045123456Z",
"end_time": "2019-11-02T15:01:23.045123456Z",
"ssp_deal_status": "active",
"price": 5432.12,
"currency_code": "usd",
"price_type": "auction",
"price_method": "cpm",
"bid_floor": 2.678,
"deal_type": "private_auction",
"contract_type": "guaranteed",
"creative_type": "video",
"display_sizes": [
{
"w": 320,
"h": 70
},
{
"w": 80,
"h": 250
}
],
"duration": 15,
"duration_match": "equals_to_duration",
"skippable": "skippable"
}
]
}
Request/Response Fields¶
Field |
Type |
Description |
---|---|---|
deals |
array of objects |
(Required) Contains an array of deals and their relevant information |
deal_id |
string |
(Required) This is the deal ID which will be sent in bid requests, e.g.
|
display_name |
string |
(Optional) This is the name of the deal which will be shown in the Supplier
UI, e.g. |
ssp_name |
string |
(Optional) Specifies the Supplier ID to whom you wish to send this deal, e.g
|
ssp_bid_request_name |
string |
(Required. DSP Only) Specifies the Supplier name that will be passed in the
bid request, this maps to the |
buyers |
array of strings |
(Optional) Specifies the Advertiser/Agencies in your system that should have
access to this deal, e.g. |
inventory_source |
array of strings |
(Optional) The ads.txt ID for the publisher(s) from whom the deal inventory
is sourced. This helps to ensure the ads.txt authorization status is correct for
deals verification on both ends within real time trading and during
negotiations. Only alphanumeric symbols and a period, colon, underscore, space,
and dash are allowed |
contact_email |
string |
(Response Only) Supplier contact details e.g. |
guaranteed_units_purchased_count |
int |
(Optional) For guaranteed deals, specifies the minimum number of
impressions guaranteed by the Supplier e.g. |
contract_type |
string |
(Optional) Specifies the contract type, the possible values are:
|
start_time |
string |
(Optional) Specifies the start time of the deal, the format uses
RFC3339, and the default time zone is UTC, e.g.
|
end_time |
string |
(Optional) Specifies the end time of the deal, the format uses RFC3339,
and the default time zone is UTC, e.g. |
ssp_update_time |
string |
(Response Only) Specifies the time when the inventory source was last
updated, the format uses RFC3339, and the default time zone is UTC,
e.g. |
dsp_update_time |
string |
(Response Only) Specifies the time when the Buyer last updated the deal
status, the format uses RFC3339, and the default time zone is UTC,
e.g. |
ssp_deal_status |
string |
(Response Only) Indicates the status of the Deal on the Supplier side. Can take the following values:
|
dsp_deal_status |
string |
(Required) Indicates the status of the Deal on the Buyer side. Can take the following values:
|
currency_code |
string |
(Optional) The currency code in ISO 4217, e.g. |
price |
float |
(Optional) Represents an amount of money for a fixed price deal, for fixed
price auctions it should be equal to the bid floor, e.g.
|
bid_floor |
float |
(Optional) Specifies the bid floor for this deal at auction. For fixed
price deals this specifies the deal price, e.g.
|
price_type |
string |
(Optional) Indicated whether the price is fixed or set at auction, the valid values are:
Note: If a deal has been created by an advertiser in DV360, when uploading the deal information to BidSwitch the price type must match. |
price_method |
string |
(Optional) Indicates the pricing method, the only possible value is |
deal_type |
string |
(Optional) Indicates the deal type, these are the possible values.
|
creative_type |
string |
(Optional) Indicates the acceptable creative type for this deal, the possible values are:
|
display_sizes |
array of objects |
(Optional) An array of objects indicating the possible ad slot sizes, e.g.
|
duration |
float |
Optional for Video/Audio The duration of the video/audio creative in
seconds, e.g. |
duration_match |
string |
(Optional for video/audio) Indicates whether the creative duration meets the required duration, the possible values are:
|
skippable |
string |
(Optional for video/audio) Indicates if the video/audio can be skipped, the possible values are
|
dsp_note |
string |
(Optional) Passes information from the Buyer to Supplier. This is a read-only
field for Suppliers and may only be changed by Buyers, e.g.
|
revision_id |
integer |
This is a read-only field generated by BidSwitch. When a Supplier changes the value of
any field(s), excluding the |
Standard HTTP responses¶
403 Forbidden
The client does not have access rights to the content404 Not Found
The server can not find the requested resource, even if the endpoint is valid