check_discount_id [DEPRECATED] Use check_discount_ids instead.discount_id.check_discount_id [DEPRECATED] Use check_discount_ids instead.check_item_id is provided, the discount applies to that specific item.check_item_id is omitted, the discount applies to the entire check.discount_id or check_item_id (if provided) is not found, an error will be returned and no discounts will be applied.parent_id fallback for discount_id.check_discount_id [DEPRECATED] Use check_discount_ids instead.| Parameter | Default | Description | Required |
|---|---|---|---|
| discount_id | discount id | ||
| amount | discount amount | REQUIRED |
curl --location 'https://api.simpra.app/apps/api/v1/checks//check_discounts' \
--header 'Simpra-Access-Token: <api-key>' \
--header 'Content-Type: application\json' \
--data '{
"amount": 10,
"discount_id": "316441fb-9643-4857-855b-cc56a9d0b1ae",
"discounts": [
{
"discount_id": "550e8400-e29b-41d4-a716-446655440000",
"value": 10,
"check_item_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
},
{
"discount_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"value": 5
}
]
}'{
"check_discount_id": "c2cb6f75-88c1-4ab6-99af-a9d6b7822993",
"check_discount_ids": [
"c2cb6f75-88c1-4ab6-99af-a9d6b7822993"
]
}