Discount Restriction API
For more details about this API usage check our API documentation
Introduction
The Discount Restriction API has endpoints for adding, getting, updating, and deleting discount restrictions
Preparation
- Have an authenticated token from the authentication service, this token should be used as an authorization
bearer token
header for every request done in this API (more information about the authorization service here).
Retrieve all restrictions
This endpoint is for getting all discount restriction that are created.
To get all discount reasons, make GET request to /discountrestrictions
. As a response,
you will get a list of discount restriction.
Example response:
Create restriction
To create a new discount restriction, make a POST request to /discountrestrictions
. You need to provide a body with refDataName
,
refDataValue
and reason
.
Example request body:
As a response you will get the new created discount restriction.
Example response:
Delete restriction
To delete a existing discount restriction, make a DELETE request to /discountrestrictions/{refDataName}/{refDataValue}
.
Make sure you are providing a valid refDataName
and refDataValue
.