applyPriceRules
WRITEApply price rules.
POST /api/v1/sales/applyPriceRules
curl -X POST '<your-host>/api/v1/sales/applyPriceRules' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"startingPrice": 0,
"matchedRules": []
}'Response
{
"finalPrice": 0,
"appendedTrace": [
{
"step": "string",
"source": "string",
"amount": 0,
"adjustment": 0,
"ruleId": "string"
}
]
}Parameters
ParameterType
Input schema
schema
{
"type": "object",
"properties": {
"startingPrice": {
"type": "number"
},
"matchedRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"ruleType": {
"type": "string"
},
"amountType": {
"type": "string"
},
"amount": {
"type": "number"
},
"priority": {
"type": "number"
}
},
"required": [
"id",
"name",
"ruleType",
"amountType",
"amount",
"priority"
]
}
}
},
"required": [
"startingPrice",
"matchedRules"
]
}