Update Price Book Rule
curl --request PATCH \
--url https://omnicommerce.sg/api/v1/price-books/{ruleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"marginValue": 12.5,
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({marginValue: 12.5, enabled: true})
};
fetch('https://omnicommerce.sg/api/v1/price-books/{ruleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/price-books/{ruleId}"
payload = {
"marginValue": 12.5,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"rule": {}
}Price Books
Update Price Book Rule
Update store, country, markup, buyer formula, rounding, currency, or enabled flag for a price book rule. Platform cannot be changed; create a new rule instead. Requires price_books:write.
PATCH
/
api
/
v1
/
price-books
/
{ruleId}
Update Price Book Rule
curl --request PATCH \
--url https://omnicommerce.sg/api/v1/price-books/{ruleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"marginValue": 12.5,
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({marginValue: 12.5, enabled: true})
};
fetch('https://omnicommerce.sg/api/v1/price-books/{ruleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/price-books/{ruleId}"
payload = {
"marginValue": 12.5,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"rule": {}
}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
Maximum string length:
120Maximum string length:
200Maximum string length:
80Required range:
0 <= x <= 500Available options:
none, currency_minor, nearest_0_05, nearest_1 Required string length:
3Buyer formula. price is the catalog price. Null clears the formula and markup percent applies again.
Maximum string length:
500Response
Price book rule updated.