Use the /auctions
endpoint to create auctions. Each batch of auction requests can be a combination of
sponsored listing auctions and banner auctions. Each auction type has a unique body schemas.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The information describing what will be auctioned. Topsort will run an auction for each batched auction request, for which products' bids will compete against each other.
The body is of type object
.
The auction results. The list of winners will contain at most slots
entries per auction. It may contain fewer or no entries at all if there aren't enough products with usable bids, that is, a bid amount greater than the reserve price and belonging to a campaign with enough remaining budget. Bids become unusable if campaign budget is exhausted, the bid is disqualified to preserve spend pacing, etc.
The response is of type object
.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}
Use the /auctions
endpoint to create auctions. Each batch of auction requests can be a combination of
sponsored listing auctions and banner auctions. Each auction type has a unique body schemas.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The information describing what will be auctioned. Topsort will run an auction for each batched auction request, for which products' bids will compete against each other.
The body is of type object
.
The auction results. The list of winners will contain at most slots
entries per auction. It may contain fewer or no entries at all if there aren't enough products with usable bids, that is, a bid amount greater than the reserve price and belonging to a campaign with enough remaining budget. Bids become unusable if campaign budget is exhausted, the bid is disqualified to preserve spend pacing, etc.
The response is of type object
.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}