Auction examples
- Running auctions
- Sponsored listings
- Sponsored banners
- Sponsored brands
Asset examples
Webhook examples
Toptimize
Assets API
Billing API
- GETGet Billing Contacts
- GETGet Billing Contact
- PUTUpsert Billing Contact
- GETGet Campaign Billing Contact
- PUTUpsert Campaign Billing Contact
- GETGet Marketplace Credit Limit
- POSTSet Marketplace Credit Limit
- PUTUpsert Vendor Billing Contact
- GETGet Vendor Charges
- GETGet Vendor Account Activity
- GETGet Vendor Balance
- POSTAdd Vendor Balance
- POSTBurn Vendor Balance
- GETGet Vendor Credit History
- GETGet Vendor Credit Limit
- POSTSet Vendor Credit Limit
- DELDelete Vendor Billing Contact
- GETGet Vendor Wallets
- POSTCreate Wallet
- POSTAdjust Wallet Balance
Campaign API
- GETGet Campaigns
- POSTCreate Campaign
- GETGet Campaign By Id
- DELDelete Campaign By Id
- PATCHUpdate Campaign By Id
- GETGet Campaign Bids
- POSTCreate Campaign Bids
- DELDelete Campaign Bid By Id
- PATCHUpdate Campaign Bid By Id
- POST[BETA] Get estimated clicks of a future campaign for a given vendor
- GETGet Products In Campaign
- GETGet Sponsored Products
Catalog API
Invitation API
Modal API
Reporting API
- GETGet Campaign Report
- GETGet Campaign Daily Report
- GETGet Campaign Report By Product
- GETGet Product Report
- GETGet Product Daily Report
- GETGet Marketplace Interactions Report
- GETGet Marketplace Report
- GETGet Marketplace Campaigns Kpis
- GETGet Marketplace Daily Report
- GETGet Marketplace Vendors Kpis
- GETGet Vendor Report
- GETGet Vendor Daily Report
Segments Service
Toppie API
- GET[BETA] Get Agency Account Balance
- GET[BETA] Get Agency Account Top-ups
- GET[BETA] Get Toppie Campaigns
- POST[BETA] Create Toppie Campaign
- GET[BETA] Get Toppie Campaign Details
- PATCH[BETA] Update Toppie Campaign
- GET[BETA] Get Toppie Campaign Bids
- GETList Account Products
- GETGet Agency Account Report
- GETGet Agency Account Activity
- GETGet Agency Account Campaigns
- GETGet Account Campaigns By Ids
- GETGet Agency Campaign Report
- GETGet Campaign Report Per Product
Create travel auctions
Use the /auctions/travel
endpoint to create batch auctions for sponsored travel listings. We support two types of sponsored travel listings, hotels and flights. Each batch of auction requests can be a combination of sponsored hotel and flight listing auctions. Each auction type has a unique body schemas.
curl --request POST \
--url https://api.topsort.com/v2/auctions/travel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "hotels",
"slots": 2,
"products": [
{
"id": "hotel-1",
"qualityScore": 0.7
},
{
"id": "hotel-2"
}
],
"travelContext": {
"travelStartDate": "2025-01-01T00:00:00.000Z",
"travelEndDate": "2025-01-15T00:00:00.000Z",
"site": "argentina",
"passengers": 2,
"travelerType": "couple"
}
},
{
"type": "flights",
"slots": 2,
"products": [
{
"id": "L0_SAO-ORL",
"variationID": "001",
"price": 1500,
"qualityScore": 0.7
},
{
"id": "L0_SAO-ORL",
"variationID": "002",
"price": 2000
}
],
"travelContext": {
"site": "argentina",
"passengers": 2,
"route": "SAO-ORL",
"flightType": "one-way"
}
}
]
}'
[
{
"results": [
{
"resultType": "hotels",
"winners": [
{
"rank": 1,
"id": "hotel-1",
"resolvedBidId": "ChAHd-K97Xs8MNRELdY9VCeJFiBCk1_aEYz8eb-WZqyhzL4EFhBCk5Mt_X2_b8Yu_vXJgzPWJhVLBTFRBTGssk9",
"campaignId": "8b816367-da17-4c65-9a26-391edf01a10d"
},
{
"rank": 2,
"id": "hotel-2",
"resolvedBidId": "ChAJe-M23Yr5QPTEFdX7VBgJGhCDm2_wDXy6cb-XZpxjxK6GHhCDm3Ku_W1_c9Zw_wYHfzQYKjTLBVGQBTLttu6",
"campaignId": "7be0d8c8-243c-41af-bb43-b43ef4935672"
}
]
},
{
"resultType": "flights",
"winners": [
{
"rank": 1,
"id": "L0_SAO-ORL",
"resolvedBidId": "ChAKf-N45Vq3LOTEGcW9VDhKHjADk3_zCXx8db-XZsyiwM2HIjADk4Lr_X0_b9Xw_uKHgyRZKhUKCTHQCTHrrh7",
"campaignId": "8ab7b29e-1934-4ec9-ad87-60c285bc7f38",
"variationID": "002"
},
{
"rank": 2,
"id": "L0_SAO-ORL",
"resolvedBidId": "ChAGg-P56Wu4MRUEHdX8VEfLHkBEk4_aEXz9fb-YZtxjwN3IJkBEk5Ms_W2_c8Yx_vZJhzSXKlVLDUJQDUJssl8",
"campaignId": "cb8ed0a7-0ecf-4ffb-a863-022f862649ec",
"variationID": "001"
}
]
}
]
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Describes the intent of running a single auction.
Web site requesting the auction
1 - 64
"argentina"
Number of passengers. Must not exceed 10.
3
RFC3339 formatted date representing the travel start point.
"2009-01-01"
RFC3339 formatted date representing the travel end point. Must be greater than start date.
"2009-01-15"
family
, group
, solo
, couple
Page name e.g. "flights", "hotels", "package", ...
Platform e.g. "app", "mobile", "web", ...
Discriminator for the type of travel auction.
hotels
Specifies the maximum number of auction winners that should be returned.
An array of hotels products that should participate in the auction.
ID to identify hotel product.
"miami-hotel"
If given, this value will be combined with our internal quality score to provide a score that better represents the relevance of the participating products. If not given it will default to 1. Values must be between 0 and 1.
0 < x <= 1
0.75
Response
Array of winner objects in order from highest to lowest bid. It will be empty if there were no qualifying bids or if there was an error.
Where the product's bid ranked in the auction. One-based, so the product with rank 1 won the auction. In an auction response, the winners array is sorted so rank will match the entry's index.
x >= 1
The target type of the winning bid.
product
, vendor
, brand
, url
The marketplace's ID of the winning entity, depending on the target of the campaign.
"p_Mfk15"
An opaque Topsort ID to be used when this item is interacted with.
"WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
The ID of the campaign that won the auction.
"4bcc6093-f367-4df2-aa1b-7c1674dd6441"
A boolean indicating whether this auction was resolved successfully.
false
curl --request POST \
--url https://api.topsort.com/v2/auctions/travel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "hotels",
"slots": 2,
"products": [
{
"id": "hotel-1",
"qualityScore": 0.7
},
{
"id": "hotel-2"
}
],
"travelContext": {
"travelStartDate": "2025-01-01T00:00:00.000Z",
"travelEndDate": "2025-01-15T00:00:00.000Z",
"site": "argentina",
"passengers": 2,
"travelerType": "couple"
}
},
{
"type": "flights",
"slots": 2,
"products": [
{
"id": "L0_SAO-ORL",
"variationID": "001",
"price": 1500,
"qualityScore": 0.7
},
{
"id": "L0_SAO-ORL",
"variationID": "002",
"price": 2000
}
],
"travelContext": {
"site": "argentina",
"passengers": 2,
"route": "SAO-ORL",
"flightType": "one-way"
}
}
]
}'
[
{
"results": [
{
"resultType": "hotels",
"winners": [
{
"rank": 1,
"id": "hotel-1",
"resolvedBidId": "ChAHd-K97Xs8MNRELdY9VCeJFiBCk1_aEYz8eb-WZqyhzL4EFhBCk5Mt_X2_b8Yu_vXJgzPWJhVLBTFRBTGssk9",
"campaignId": "8b816367-da17-4c65-9a26-391edf01a10d"
},
{
"rank": 2,
"id": "hotel-2",
"resolvedBidId": "ChAJe-M23Yr5QPTEFdX7VBgJGhCDm2_wDXy6cb-XZpxjxK6GHhCDm3Ku_W1_c9Zw_wYHfzQYKjTLBVGQBTLttu6",
"campaignId": "7be0d8c8-243c-41af-bb43-b43ef4935672"
}
]
},
{
"resultType": "flights",
"winners": [
{
"rank": 1,
"id": "L0_SAO-ORL",
"resolvedBidId": "ChAKf-N45Vq3LOTEGcW9VDhKHjADk3_zCXx8db-XZsyiwM2HIjADk4Lr_X0_b9Xw_uKHgyRZKhUKCTHQCTHrrh7",
"campaignId": "8ab7b29e-1934-4ec9-ad87-60c285bc7f38",
"variationID": "002"
},
{
"rank": 2,
"id": "L0_SAO-ORL",
"resolvedBidId": "ChAGg-P56Wu4MRUEHdX8VEfLHkBEk4_aEXz9fb-YZtxjwN3IJkBEk5Ms_W2_c8Yx_vZJhzSXKlVLDUJQDUJssl8",
"campaignId": "cb8ed0a7-0ecf-4ffb-a863-022f862649ec",
"variationID": "001"
}
]
}
]
}
]