POST
/
v2
/
auctions
/
travel
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
The information describing what will be auctioned. Topsort will run an auction for each batched auction request, for which travel products' bids will compete against each other.
auctions
object[]
required

Describes the intent of running a single auction.

Response

201
application/json
The auction results. The list of winners will contain at most `winners` 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.
results
object[]
required