Draft a multi-store Ads campaign
curl --request POST \
--url https://omnicommerce.ai/api/v1/ads/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": {
"name": "<string>",
"objective": "product_sales",
"schedule": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"productIds": [
"<string>"
],
"deployments": [
{
"store": {
"country": "<string>",
"storeId": "<string>"
},
"adFormat": "<string>",
"currency": "<string>",
"dailyBudget": "<string>",
"dailyLimit": "<string>",
"totalLimit": "<string>",
"bidding": {
"strategy": "auto"
}
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign: {
name: '<string>',
objective: 'product_sales',
schedule: {from: '2023-12-25', to: '2023-12-25'},
productIds: ['<string>'],
deployments: [
{
store: {country: '<string>', storeId: '<string>'},
adFormat: '<string>',
currency: '<string>',
dailyBudget: '<string>',
dailyLimit: '<string>',
totalLimit: '<string>',
bidding: {strategy: 'auto'}
}
]
}
})
};
fetch('https://omnicommerce.ai/api/v1/ads/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/ads/campaigns"
payload = { "campaign": {
"name": "<string>",
"objective": "product_sales",
"schedule": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"productIds": ["<string>"],
"deployments": [
{
"store": {
"country": "<string>",
"storeId": "<string>"
},
"adFormat": "<string>",
"currency": "<string>",
"dailyBudget": "<string>",
"dailyLimit": "<string>",
"totalLimit": "<string>",
"bidding": { "strategy": "auto" }
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "developer_v1",
"operationId": "<string>",
"status": "accepted",
"warnings": [
"<string>"
],
"recommendations": [
"<string>"
],
"links": {},
"data": {
"success": true,
"succeededCount": 0,
"failedCount": 0,
"campaignId": "<string>",
"planIds": [
"<string>"
],
"results": [
{
"success": true,
"store": {
"marketplace": "shopee",
"country": "<string>",
"storeId": "<string>"
},
"planId": "<string>",
"error": "<string>",
"status": "<string>",
"targetCount": 123
}
]
}
}Ads
Draft a multi-store Ads campaign
Requires ads:write. Every target is organization/store scoped.
Partial failures are explicit in data.success and ordered results.
Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
POST
/
api
/
v1
/
ads
/
campaigns
Draft a multi-store Ads campaign
curl --request POST \
--url https://omnicommerce.ai/api/v1/ads/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": {
"name": "<string>",
"objective": "product_sales",
"schedule": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"productIds": [
"<string>"
],
"deployments": [
{
"store": {
"country": "<string>",
"storeId": "<string>"
},
"adFormat": "<string>",
"currency": "<string>",
"dailyBudget": "<string>",
"dailyLimit": "<string>",
"totalLimit": "<string>",
"bidding": {
"strategy": "auto"
}
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign: {
name: '<string>',
objective: 'product_sales',
schedule: {from: '2023-12-25', to: '2023-12-25'},
productIds: ['<string>'],
deployments: [
{
store: {country: '<string>', storeId: '<string>'},
adFormat: '<string>',
currency: '<string>',
dailyBudget: '<string>',
dailyLimit: '<string>',
totalLimit: '<string>',
bidding: {strategy: 'auto'}
}
]
}
})
};
fetch('https://omnicommerce.ai/api/v1/ads/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/ads/campaigns"
payload = { "campaign": {
"name": "<string>",
"objective": "product_sales",
"schedule": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"productIds": ["<string>"],
"deployments": [
{
"store": {
"country": "<string>",
"storeId": "<string>"
},
"adFormat": "<string>",
"currency": "<string>",
"dailyBudget": "<string>",
"dailyLimit": "<string>",
"totalLimit": "<string>",
"bidding": { "strategy": "auto" }
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "developer_v1",
"operationId": "<string>",
"status": "accepted",
"warnings": [
"<string>"
],
"recommendations": [
"<string>"
],
"links": {},
"data": {
"success": true,
"succeededCount": 0,
"failedCount": 0,
"campaignId": "<string>",
"planIds": [
"<string>"
],
"results": [
{
"success": true,
"store": {
"marketplace": "shopee",
"country": "<string>",
"storeId": "<string>"
},
"planId": "<string>",
"error": "<string>",
"status": "<string>",
"targetCount": 123
}
]
}
}Authorizations
Body
application/json
Response
Operation result.