Price lists
How to use the Rules Engine in conjunction with price lists and set up price rules
Example
curl -g -X PATCH \
'https://yourdomain.commercelayer.io/api/price_lists/vLrWRCDzBE' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "price_lists",
"id": "vLrWRCDzBE",
"attributes": {
"rules": {
"rules": [
{
"name": "10% Discount on price greater than 10000 cents",
"conditions": [
{
"field": "price.amount_cents",
"matcher": "gt",
"value": 10000
}
],
"actions": [
{
"type": "percentage",
"selector": "price"
"value": 0.1
}
]
}
]
}
}
}
}Available actions
PercentageFixed priceFixed amountCheck and validation
Examples
Checking the price list's prices
Checking a single price
Use cases
Price listsLast updated