Assign Products to Promotion
curl --request POST \
--url https://omnicommerce.sg/api/v1/promotions/{promotionId}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productIds": [
"f831911c-ba05-4c83-9a03-e026e0aaf102"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productIds: ['f831911c-ba05-4c83-9a03-e026e0aaf102']})
};
fetch('https://omnicommerce.sg/api/v1/promotions/{promotionId}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/promotions/{promotionId}/products"
payload = { "productIds": ["f831911c-ba05-4c83-9a03-e026e0aaf102"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Promotions
Assign Products to Promotion
Assign one or more products to a promotion. Creates pending marketplace sync rows; call sync after assign. Requires promotions:write.
POST
/
api
/
v1
/
promotions
/
{promotionId}
/
products
Assign Products to Promotion
curl --request POST \
--url https://omnicommerce.sg/api/v1/promotions/{promotionId}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productIds": [
"f831911c-ba05-4c83-9a03-e026e0aaf102"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productIds: ['f831911c-ba05-4c83-9a03-e026e0aaf102']})
};
fetch('https://omnicommerce.sg/api/v1/promotions/{promotionId}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/promotions/{promotionId}/products"
payload = { "productIds": ["f831911c-ba05-4c83-9a03-e026e0aaf102"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}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:
120Body
application/json
Required array length:
1 - 200 elementsMaximum string length:
120Maximum string length:
120Required range:
0 <= x <= 1000Optional per-product discount for product discounts and flash sales. Uses the campaign discount type. Null restores the shared discount. Shopee and TikTok publish the resulting price. Lazada vouchers and Shopify fail sync while any product has its own discount.
Maximum array length:
200Show child attributes
Show child attributes
Response
Products assigned.
The response is of type object.