Auction examples
- Running auctions
- Sponsored listings
- Sponsored banners
- Sponsored brands
Asset examples
Webhook examples
Offsite Ads API
- POST[BETA] Create a new advertiser
- GET[BETA] Get advertiser details
- GET[BETA] List all audiences
- POST[BETA] Create a new audience
- POST[BETA] Upload users to an audience
- GET[BETA] List all campaigns
- POST[BETA] Create a new campaign
- GET[BETA] Get campaign details
- PATCH[BETA] Update campaign settings
- GET[BETA] Get campaign geotargeting settings
- GET[BETA] Get Job Status
- GET[BETA] Get campaign performance summary
- GET[BETA] Get daily campaign performance report
- GET[BETA] Get product-level campaign performance report
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
- GETGet Campaign Restriction
- POSTCreate Campaign Restriction
- PATCHUpdate Campaign Restriction
- POST[BETA] Get estimated clicks of a future campaign for a given vendor
- GETGet Products In Campaign
- GETGet Restriction Types
- GETGet Restriction Type
- GETGet Sponsored Products
Catalog API
Invitation API
Reporting API
- GETGet Campaign Report
- GETGet Campaign Daily Report
- GETGet Campaign Report By Product
- GETGet Product Report
- GETGet Product Daily Report
- GETGet Interactions Dump Urls
- GETGet Scored Attribution Dump Urls
- 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
- DEL[BETA] Delete Toppie Campaign
- PATCH[BETA] Update Toppie Campaign
- GET[BETA] Get Toppie Campaign Bids
- GET[BETA] List Account Products
- GET[BETA] Get Agency Account Report.
- GET[BETA] Account Activity Reports.
- GET[BETA] Get Campaigns Reporting.
- GET[BETA] Get Campaigns by IDs report.
- GET[BETA] Get Campaign Report.
- GET[BETA] Get Campaign Products Report.
Report events
Use the /events
endpoint to report user interactions and activity in on a marketplace:
- Impressions — a user viewed an asset.
- Clicks — a user clicked on an asset.
- Purchases — a user created an order.
- Pageviews — a user visited a page.
Interactions require either a resolvedBidId
, for sponsored events coming from the /v2/auctions
response,
or an entity
that describes the entity that was interacted with, in the case of organic or non-sponsored events.
For analytics purposes, you can use the placement
field to differentiate different listings or banners.
For example, on a product page with a carousel of products, you can track impressions and clicks related to the carousel
by including /carousel
at the end of the path
field in the placement
object. This allows you to monitor
the performance of carousel products in the Data Room.
curl --request POST \
--url https://api.topsort.com/v2/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"impressions": [
{
"id": "eb874c98-bf4d-40a9-ae6d-fcf4cecb535c",
"occurredAt": "2019-01-01T12:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"placement": {
"path": "/categories/dairy",
"position": 1,
"page": 1,
"pageSize": 15,
"categoryId": "9BLIe"
},
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"deviceType": "mobile",
"channel": "onsite"
}
],
"clicks": [
{
"id": "b39d39ed-ea0e-4059-9d15-4990b39c85a2",
"occurredAt": "2019-01-01T13:01:42-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"placement": {
"path": "/categories/dairy",
"position": 1,
"page": 1,
"pageSize": 15,
"categoryId": "9BLIe"
},
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"deviceType": "mobile",
"channel": "offsite"
}
],
"purchases": [
{
"id": "0e06c899-b2cd-4e0d-b0de-8aefb4b6d0a0",
"items": [
{
"productId": "p_SA0238",
"unitPrice": 12.95,
"quantity": 2,
"vendorId": "v_8fj2D"
},
{
"productId": "p_oajf2D",
"unitPrice": 1.49
}
],
"occurredAt": "2019-01-01T12:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"deviceType": "desktop",
"channel": "onsite"
},
{
"id": "b7147656-504f-4ae7-b335-740829ff64c6",
"items": [
{
"productId": "p_SA0279",
"unitPrice": 119.95,
"quantity": 5,
"vendorId": "v_8fj2D"
}
],
"occurredAt": "2019-01-01T13:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"channel": "instore"
}
],
"pageviews": [
{
"id": "8f648a8e-830c-4bb4-9d93-6ea80075ca82",
"occurredAt": "2019-01-01T12:59:58-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"page": {
"type": "category",
"pageId": "/categories/dairy",
"value": "dairy"
},
"deviceType": "mobile",
"channel": "onsite"
}
]
}'
This response does not have an example.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Response
All events were reported successfully.
curl --request POST \
--url https://api.topsort.com/v2/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"impressions": [
{
"id": "eb874c98-bf4d-40a9-ae6d-fcf4cecb535c",
"occurredAt": "2019-01-01T12:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"placement": {
"path": "/categories/dairy",
"position": 1,
"page": 1,
"pageSize": 15,
"categoryId": "9BLIe"
},
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"deviceType": "mobile",
"channel": "onsite"
}
],
"clicks": [
{
"id": "b39d39ed-ea0e-4059-9d15-4990b39c85a2",
"occurredAt": "2019-01-01T13:01:42-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"placement": {
"path": "/categories/dairy",
"position": 1,
"page": 1,
"pageSize": 15,
"categoryId": "9BLIe"
},
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"deviceType": "mobile",
"channel": "offsite"
}
],
"purchases": [
{
"id": "0e06c899-b2cd-4e0d-b0de-8aefb4b6d0a0",
"items": [
{
"productId": "p_SA0238",
"unitPrice": 12.95,
"quantity": 2,
"vendorId": "v_8fj2D"
},
{
"productId": "p_oajf2D",
"unitPrice": 1.49
}
],
"occurredAt": "2019-01-01T12:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"deviceType": "desktop",
"channel": "onsite"
},
{
"id": "b7147656-504f-4ae7-b335-740829ff64c6",
"items": [
{
"productId": "p_SA0279",
"unitPrice": 119.95,
"quantity": 5,
"vendorId": "v_8fj2D"
}
],
"occurredAt": "2019-01-01T13:59:59-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"channel": "instore"
}
],
"pageviews": [
{
"id": "8f648a8e-830c-4bb4-9d93-6ea80075ca82",
"occurredAt": "2019-01-01T12:59:58-05:00",
"opaqueUserId": "71303ce0-de89-496d-8270-6434589615e8",
"page": {
"type": "category",
"pageId": "/categories/dairy",
"value": "dairy"
},
"deviceType": "mobile",
"channel": "onsite"
}
]
}'
This response does not have an example.