curl --request POST \
--url https://omnicommerce.sg/api/v1/products/cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"sku": "TLVBGLX83220",
"costPrice": 578,
"costPriceCurrency": "USD"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({updates: [{sku: 'TLVBGLX83220', costPrice: 578, costPriceCurrency: 'USD'}]})
};
fetch('https://omnicommerce.sg/api/v1/products/cost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/products/cost"
payload = { "updates": [
{
"sku": "TLVBGLX83220",
"costPrice": 578,
"costPriceCurrency": "USD"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Batch Update Product Cost
Set catalog cost price and currency for one or more products. Cost is Omni-only and never syncs to marketplaces.
Each update targets productId or sku (Omni products.sku). Provide costPrice with costPriceCurrency when the source amount is not in the product selling currency. If costPriceFxRate is omitted and the currencies differ, Omni quotes FX via the canonical FX service and stores the rate on the product.
Authorization
Requires catalog:write. organizationId comes from the credential; the body cannot select an organization.
Limits
updates is required, 1–200 items. Duplicate product IDs fail after the first occurrence. costPrice: null clears cost and FX.
curl --request POST \
--url https://omnicommerce.sg/api/v1/products/cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"sku": "TLVBGLX83220",
"costPrice": 578,
"costPriceCurrency": "USD"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({updates: [{sku: 'TLVBGLX83220', costPrice: 578, costPriceCurrency: 'USD'}]})
};
fetch('https://omnicommerce.sg/api/v1/products/cost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/products/cost"
payload = { "updates": [
{
"sku": "TLVBGLX83220",
"costPrice": 578,
"costPriceCurrency": "USD"
}
] }
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.
Body
1 - 200 elementsShow child attributes
Show child attributes
Response
Batch processed. Top-level success is true only when every update succeeded.