Resolve Campaign Promotion Selection
curl --request POST \
--url https://omnicommerce.ai/api/v1/campaigns/promotion-options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"windowId": "<string>",
"promotionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({windowId: '<string>', promotionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://omnicommerce.ai/api/v1/campaigns/promotion-options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/campaigns/promotion-options"
payload = {
"windowId": "<string>",
"promotionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"succeededCount": 4503599627370495,
"failedCount": 4503599627370495,
"promotionIds": [
"<string>"
],
"results": [
{
"promotionId": "<string>",
"success": true,
"offer": {
"id": "<string>",
"windowId": "<string>",
"promotion": {
"name": "<string>",
"description": "<string>",
"kind": "product_discount",
"salesChannels": [
"pdp"
],
"discountType": "percentage",
"discountValue": 1,
"storeDiscounts": [
{
"storeKey": "<string>",
"discountType": "percentage",
"discountValue": 1
}
],
"targetStores": [
{
"marketplace": "lazada",
"country": "<string>",
"storeId": "<string>"
}
],
"minSalePrice": 1,
"maxDiscountAmount": 1,
"minSpend": 1,
"voucherCode": "<string>",
"claimStartsAt": "2023-11-07T05:31:56Z",
"totalUsageLimit": 4503599627370495,
"perBuyerLimit": 4503599627370495,
"mechanicConfig": {
"voucherType": "shopee_shop",
"voucherCampaign": {
"campaignId": "<string>",
"sessionId": "<string>",
"termsAccepted": true
},
"browserAutomation": {
"aopId": "<string>",
"variableValues": {},
"instructions": "<string>"
},
"voucherScope": "products",
"voucherReward": "discount",
"voucherAudience": "general",
"repeatPurchaseMinCount": 500,
"repeatPurchaseLookbackDays": 183,
"smartVoucher": true,
"followPrizeExpiryDays": 15,
"videoDisplayMode": "shopee_video",
"exclusiveCreatorUsernames": [
"<string>"
],
"exclusiveStreamerUsernames": [
"<string>"
],
"voucherDisplayChannels": [
"all"
],
"bundlePriceType": "discount",
"bundleTiers": [
{
"minimumQuantity": 1501,
"discountValue": 123
}
],
"thresholdType": "item_quantity",
"thresholdValue": 123,
"giftType": "gift",
"giftQuantity": 123,
"gifts": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalClaimLimit": 50000,
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"buyQuantity": 123,
"getQuantity": 123,
"benefitProductIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"benefitType": "free",
"benefitValue": 1,
"maxApplicationsPerOrder": 123,
"bundleMinimumQuantity": 1501,
"shippingDeliveryOption": "<string>",
"shippingBudget": 123
}
},
"promotionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productIds": [],
"reviewNotes": "",
"excludedReason": "",
"source": {
"sheet": "<string>",
"rows": [
123
],
"headers": [
"<string>"
],
"values": [
[
"<string>"
]
]
}
},
"error": "<string>"
}
]
}Campaigns
Resolve Campaign Promotion Selection
Read 1–50 eligible draft promotions as campaign offers without creating or publishing promotions. Exact organization/store ownership and existing campaign links are checked.
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
POST
/
api
/
v1
/
campaigns
/
promotion-options
Resolve Campaign Promotion Selection
curl --request POST \
--url https://omnicommerce.ai/api/v1/campaigns/promotion-options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"windowId": "<string>",
"promotionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({windowId: '<string>', promotionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://omnicommerce.ai/api/v1/campaigns/promotion-options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/campaigns/promotion-options"
payload = {
"windowId": "<string>",
"promotionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"succeededCount": 4503599627370495,
"failedCount": 4503599627370495,
"promotionIds": [
"<string>"
],
"results": [
{
"promotionId": "<string>",
"success": true,
"offer": {
"id": "<string>",
"windowId": "<string>",
"promotion": {
"name": "<string>",
"description": "<string>",
"kind": "product_discount",
"salesChannels": [
"pdp"
],
"discountType": "percentage",
"discountValue": 1,
"storeDiscounts": [
{
"storeKey": "<string>",
"discountType": "percentage",
"discountValue": 1
}
],
"targetStores": [
{
"marketplace": "lazada",
"country": "<string>",
"storeId": "<string>"
}
],
"minSalePrice": 1,
"maxDiscountAmount": 1,
"minSpend": 1,
"voucherCode": "<string>",
"claimStartsAt": "2023-11-07T05:31:56Z",
"totalUsageLimit": 4503599627370495,
"perBuyerLimit": 4503599627370495,
"mechanicConfig": {
"voucherType": "shopee_shop",
"voucherCampaign": {
"campaignId": "<string>",
"sessionId": "<string>",
"termsAccepted": true
},
"browserAutomation": {
"aopId": "<string>",
"variableValues": {},
"instructions": "<string>"
},
"voucherScope": "products",
"voucherReward": "discount",
"voucherAudience": "general",
"repeatPurchaseMinCount": 500,
"repeatPurchaseLookbackDays": 183,
"smartVoucher": true,
"followPrizeExpiryDays": 15,
"videoDisplayMode": "shopee_video",
"exclusiveCreatorUsernames": [
"<string>"
],
"exclusiveStreamerUsernames": [
"<string>"
],
"voucherDisplayChannels": [
"all"
],
"bundlePriceType": "discount",
"bundleTiers": [
{
"minimumQuantity": 1501,
"discountValue": 123
}
],
"thresholdType": "item_quantity",
"thresholdValue": 123,
"giftType": "gift",
"giftQuantity": 123,
"gifts": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalClaimLimit": 50000,
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"buyQuantity": 123,
"getQuantity": 123,
"benefitProductIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"benefitType": "free",
"benefitValue": 1,
"maxApplicationsPerOrder": 123,
"bundleMinimumQuantity": 1501,
"shippingDeliveryOption": "<string>",
"shippingBudget": 123
}
},
"promotionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productIds": [],
"reviewNotes": "",
"excludedReason": "",
"source": {
"sheet": "<string>",
"rows": [
123
],
"headers": [
"<string>"
],
"values": [
[
"<string>"
]
]
}
},
"error": "<string>"
}
]
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Body
application/json
Required string length:
1 - 160Required array length:
1 - 50 elementsPattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Required for session auth. Optional for an API key, which already identifies the organization.
Required string length:
1 - 120Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
Canonical operation result. Inspect aggregate and per-target success and marketplace delivery evidence.