Get Campaign
curl --request GET \
--url https://omnicommerce.sg/api/v1/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnicommerce.sg/api/v1/campaigns/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"campaign": {
"id": "<string>",
"organizationId": "<string>",
"revision": 0,
"stage": "draft",
"approval": {
"revision": 0,
"userId": "<string>",
"approvedAt": "<string>"
},
"runId": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"plan": {
"brief": {
"name": "<string>",
"ownerId": "<string>",
"approverId": "<string>",
"timezone": "<string>",
"objective": "",
"brand": "",
"stores": [],
"serviceRequest": "",
"priority": "standard",
"documentIds": [],
"reviewDueAt": "2023-11-07T05:31:56Z",
"sourceCurrency": "<string>",
"sourceMarketplace": "shopee",
"sourceCountry": "<string>",
"cleanupNotes": ""
},
"windows": [],
"offers": [
{
"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",
"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>"
]
]
}
}
]
},
"pendingChange": {
"version": 0,
"plan": {
"brief": {
"name": "<string>",
"ownerId": "<string>",
"approverId": "<string>",
"timezone": "<string>",
"objective": "",
"brand": "",
"stores": [],
"serviceRequest": "",
"priority": "standard",
"documentIds": [],
"reviewDueAt": "2023-11-07T05:31:56Z",
"sourceCurrency": "<string>",
"sourceMarketplace": "shopee",
"sourceCountry": "<string>",
"cleanupNotes": ""
},
"windows": [],
"offers": [
{
"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",
"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>"
]
]
}
}
]
},
"proposedBy": "<string>",
"proposedAt": "<string>"
}
},
"executions": [
{
"offerId": "<string>",
"windowId": "<string>",
"promotionId": "<string>",
"state": "draft",
"error": "<string>",
"evidence": "<unknown>",
"termsRevision": 0
}
],
"audit": [
{
"id": "<string>",
"action": "<string>",
"actorId": "<string>",
"actorName": "<string>",
"createdAt": "<string>",
"details": {},
"summary": "<string>",
"items": [
{
"kind": "brief",
"action": "add",
"id": "<string>",
"name": "<string>",
"changes": [
{
"field": "<string>",
"label": "<string>",
"from": "<string>",
"to": "<string>"
}
]
}
],
"hiddenCount": 4503599627370495
}
],
"readiness": [
"<string>"
],
"pendingChangeIssues": [
"<string>"
],
"pendingScheduleCount": 4503599627370495,
"failedScheduleCount": 4503599627370495,
"waitingBrowserJobCount": 4503599627370495,
"scheduleIssues": [
{
"windowId": "<string>",
"phase": "prepare",
"kind": "overdue"
}
],
"recovery": [
{
"windowId": "<string>",
"phase": "prepare",
"state": "<string>",
"attempt": 0,
"nextRetryAt": "<string>",
"error": "<string>"
}
],
"cleanupFailed": true,
"progress": {
"asOf": "<string>",
"title": "<string>",
"description": "<string>",
"total": 4503599627370495,
"counts": {
"waiting": 4503599627370495,
"preparing": 4503599627370495,
"prepared": 4503599627370495,
"live": 4503599627370495,
"ending": 4503599627370495,
"ended": 4503599627370495,
"cancelled": 4503599627370495,
"failed": 4503599627370495
},
"issues": [
{
"offerId": "<string>",
"name": "<string>",
"error": "<string>"
}
],
"scheduleIssues": [
{
"windowId": "<string>",
"phase": "prepare",
"kind": "overdue",
"name": "<string>",
"message": "<string>"
}
],
"blockers": [
"<string>"
],
"nextWindow": {
"id": "<string>",
"name": "<string>",
"preparesAt": "<string>",
"startsAt": "<string>",
"endsAt": "<string>"
}
}
}Campaigns
Get Campaign
Read one campaign, including its plan, executions, audit, schedule, and progress. Requires promotions:read.
GET
/
api
/
v1
/
campaigns
/
{campaignId}
Get Campaign
curl --request GET \
--url https://omnicommerce.sg/api/v1/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnicommerce.sg/api/v1/campaigns/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"campaign": {
"id": "<string>",
"organizationId": "<string>",
"revision": 0,
"stage": "draft",
"approval": {
"revision": 0,
"userId": "<string>",
"approvedAt": "<string>"
},
"runId": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"plan": {
"brief": {
"name": "<string>",
"ownerId": "<string>",
"approverId": "<string>",
"timezone": "<string>",
"objective": "",
"brand": "",
"stores": [],
"serviceRequest": "",
"priority": "standard",
"documentIds": [],
"reviewDueAt": "2023-11-07T05:31:56Z",
"sourceCurrency": "<string>",
"sourceMarketplace": "shopee",
"sourceCountry": "<string>",
"cleanupNotes": ""
},
"windows": [],
"offers": [
{
"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",
"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>"
]
]
}
}
]
},
"pendingChange": {
"version": 0,
"plan": {
"brief": {
"name": "<string>",
"ownerId": "<string>",
"approverId": "<string>",
"timezone": "<string>",
"objective": "",
"brand": "",
"stores": [],
"serviceRequest": "",
"priority": "standard",
"documentIds": [],
"reviewDueAt": "2023-11-07T05:31:56Z",
"sourceCurrency": "<string>",
"sourceMarketplace": "shopee",
"sourceCountry": "<string>",
"cleanupNotes": ""
},
"windows": [],
"offers": [
{
"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",
"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>"
]
]
}
}
]
},
"proposedBy": "<string>",
"proposedAt": "<string>"
}
},
"executions": [
{
"offerId": "<string>",
"windowId": "<string>",
"promotionId": "<string>",
"state": "draft",
"error": "<string>",
"evidence": "<unknown>",
"termsRevision": 0
}
],
"audit": [
{
"id": "<string>",
"action": "<string>",
"actorId": "<string>",
"actorName": "<string>",
"createdAt": "<string>",
"details": {},
"summary": "<string>",
"items": [
{
"kind": "brief",
"action": "add",
"id": "<string>",
"name": "<string>",
"changes": [
{
"field": "<string>",
"label": "<string>",
"from": "<string>",
"to": "<string>"
}
]
}
],
"hiddenCount": 4503599627370495
}
],
"readiness": [
"<string>"
],
"pendingChangeIssues": [
"<string>"
],
"pendingScheduleCount": 4503599627370495,
"failedScheduleCount": 4503599627370495,
"waitingBrowserJobCount": 4503599627370495,
"scheduleIssues": [
{
"windowId": "<string>",
"phase": "prepare",
"kind": "overdue"
}
],
"recovery": [
{
"windowId": "<string>",
"phase": "prepare",
"state": "<string>",
"attempt": 0,
"nextRetryAt": "<string>",
"error": "<string>"
}
],
"cleanupFailed": true,
"progress": {
"asOf": "<string>",
"title": "<string>",
"description": "<string>",
"total": 4503599627370495,
"counts": {
"waiting": 4503599627370495,
"preparing": 4503599627370495,
"prepared": 4503599627370495,
"live": 4503599627370495,
"ending": 4503599627370495,
"ended": 4503599627370495,
"cancelled": 4503599627370495,
"failed": 4503599627370495
},
"issues": [
{
"offerId": "<string>",
"name": "<string>",
"error": "<string>"
}
],
"scheduleIssues": [
{
"windowId": "<string>",
"phase": "prepare",
"kind": "overdue",
"name": "<string>",
"message": "<string>"
}
],
"blockers": [
"<string>"
],
"nextWindow": {
"id": "<string>",
"name": "<string>",
"preparesAt": "<string>",
"startsAt": "<string>",
"endsAt": "<string>"
}
}
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Path Parameters
Query Parameters
Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token.
Maximum string length:
120Response
Campaign detail: plan, revision, executions, audit, schedule, and progress.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Issues that block approving or running the current plan.
Issues that block approving the proposed live change.
Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes