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

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 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 `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.
results
object[]
required