Validate Promotions
curl --request POST \
--url https://omnicommerce.ai/api/v1/promotions/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promotionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({promotionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://omnicommerce.ai/api/v1/promotions/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/promotions/validate"
payload = { "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>"
],
"validatedAt": "<string>",
"results": [
{
"index": 4503599627370495,
"success": true,
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
],
"promotionId": "<string>",
"productIds": [
"<string>"
]
}
]
}Promotions
Validate Promotions
Read-only validation of 1–50 saved promotion IDs or proposed definitions and product IDs. Reports marketplace terms, connected-store targeting and qualifying-product issues per target. Publishing still revalidates current state and can encounter marketplace API rejections.
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
POST
/
api
/
v1
/
promotions
/
validate
Validate Promotions
curl --request POST \
--url https://omnicommerce.ai/api/v1/promotions/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promotionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({promotionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://omnicommerce.ai/api/v1/promotions/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/promotions/validate"
payload = { "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>"
],
"validatedAt": "<string>",
"results": [
{
"index": 4503599627370495,
"success": true,
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
],
"promotionId": "<string>",
"productIds": [
"<string>"
]
}
]
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Body
application/json
- Option 1
- Option 2
Required 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 - 120Response
Canonical operation result. Inspect aggregate and per-target success and marketplace delivery evidence.