curl --request POST \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign-id}/bids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bids": [
{
"target": {
"id": "<string>",
"type": "product"
},
"amount": "<unknown>",
"location": "Santiago",
"trigger": {
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
},
"triggers": [],
"formatProperties": {
"bannerAssets": [
{
"dimensions": {
"width": 123,
"height": 123
},
"url": "<string>",
"contentType": "image/png",
"size": 123,
"assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
"content": {},
"jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"slotId": "<string>",
"adFormat": "<string>",
"deviceType": "desktop"
}
}
]
}
'{
"hasMore": true,
"bids": [
{
"bidId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"id": "<string>",
"type": "product"
},
"isActive": true,
"triggers": [
{
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
}
],
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "active",
"amount": "<unknown>",
"trigger": {
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
},
"location": "Santiago",
"bidsBehaviorData": "<string>",
"formatProperties": {
"bannerAssets": [
{
"dimensions": {
"width": 123,
"height": 123
},
"url": "<string>",
"contentType": "image/png",
"size": 123,
"assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
"content": {},
"jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"slotId": "<string>",
"adFormat": "<string>",
"deviceType": "desktop"
}
}
],
"next": {
"offset": 123,
"limit": 123
}
}Endpoint to create a bid for a campaign.
curl --request POST \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign-id}/bids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bids": [
{
"target": {
"id": "<string>",
"type": "product"
},
"amount": "<unknown>",
"location": "Santiago",
"trigger": {
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
},
"triggers": [],
"formatProperties": {
"bannerAssets": [
{
"dimensions": {
"width": 123,
"height": 123
},
"url": "<string>",
"contentType": "image/png",
"size": 123,
"assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
"content": {},
"jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"slotId": "<string>",
"adFormat": "<string>",
"deviceType": "desktop"
}
}
]
}
'{
"hasMore": true,
"bids": [
{
"bidId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"id": "<string>",
"type": "product"
},
"isActive": true,
"triggers": [
{
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
}
],
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "active",
"amount": "<unknown>",
"trigger": {
"type": "<string>",
"value": {
"words": [
"<string>"
],
"matchType": "exact"
}
},
"location": "Santiago",
"bidsBehaviorData": "<string>",
"formatProperties": {
"bannerAssets": [
{
"dimensions": {
"width": 123,
"height": 123
},
"url": "<string>",
"contentType": "image/png",
"size": 123,
"assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
"content": {},
"jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"slotId": "<string>",
"adFormat": "<string>",
"deviceType": "desktop"
}
}
],
"next": {
"offset": 123,
"limit": 123
}
}A valid API key generated in Topsort's UI.
The ID of the campaign.
Skip creating bids that already exist. Existing bids will not be updated and will not be returned in the response.
An array of bids to be created.
1 - 500 elementsShow child attributes
Represents a promotable entity that will be returned upon a winning auction.
By using this option you will be able to target this campaign to a specific group.You must define the same location as a parameter on the auction request. Products on a specific campaign will have specific conversion rates, considering the context of location, so it will not interfere with the conversion rates for the same product in other campaigns.
1"Santiago"
The object that triggers the appearance of this bid on an auction.
A list of objects that trigger the appearance of this bid on an auction.
1When should this bid participate in an auction.
The format properties of the bid. This field is required for banner ads. Should be not set for listing ads.
Show child attributes
The assets for the banner campaign, if adFormat is banner.
1Show child attributes
The url where the asset is located. If asset_id is provided, this field will be ignored.
1 - 2083The mime type of the asset. If asset_id is provided, this field will be ignored.
1"image/png"
The file size of the asset, in bytes. If asset_id is provided, this field will be ignored.
Asset id, if created using the asset API.
33"asset_01j713j64yfsvtj4bs3ccpy5ca"
The id of the json template that was used to create the json content.
The external slot id provided by the marketplace.
1"banner"The targeted device for this campaign, if adFormat is banner.
mobile, desktop Successful Response
The public response body of the bids endpoints.
Whether this is the last page of results or not.
An array of bids.
500Show child attributes
The ID of the bid
Whether the bid is active.
A list of objects that trigger the appearance of this bid on an auction.
When should this bid participate in an auction.
The ID of the campaign.
The activity state of the bid.
active, deactivated_manually, inactive_entity, deleted_entity, legacy_inactive An object that triggers the appearance of this bid on an auction.
By using this option you will be able to target this campaign to a specific group.You must define the same location as a parameter on the auction request. Products on a specific campaign will have specific conversion rates, considering the context of location, so it will not interfere with the conversion rates for the same product in other campaigns.
1"Santiago"
Deprecated. This field is always null. For behavioral data use reporting service.
Show child attributes
The assets for the banner campaign, if adFormat is banner.
1Show child attributes
The url where the asset is located. If asset_id is provided, this field will be ignored.
1 - 2083The mime type of the asset. If asset_id is provided, this field will be ignored.
1"image/png"
The file size of the asset, in bytes. If asset_id is provided, this field will be ignored.
Asset id, if created using the asset API.
33"asset_01j713j64yfsvtj4bs3ccpy5ca"
The id of the json template that was used to create the json content.
The external slot id provided by the marketplace.
1"banner"The targeted device for this campaign, if adFormat is banner.
mobile, desktop Was this page helpful?