Check Reward
POST
{{YOUR_END_POINT}}This webhook is triggered when the user inputs a Promotional Coupon from the POS App.
You are able to customize a button with the success callback, the URL within the button will act as a GET request with all the parameters.
Request:
Property | Type | Description |
---|---|---|
reward_code | String | Promotion reward Code |
business_refrence | String | Business Name |
Example Response:
1- Valid response: [2xx OK]
{
"data":{
"type": "1:for order,2:for product",
"is_percentage": "boolean",
"customer_number": "",
"discount_amount": "",
"max_discount_amount": "0:unlimit",
"allowed_products": [
{
"product_id": "",
"quantity": ""
}
],
"button": {
"label": {
"ar": "string",
"en": "string"
},
"url": "",
"close_modal": "boolean"
}
},
"errors": []
}
2- Invalid responde [400 BAD REQUEST]
{
"data":[], // optional
"message": "Reward 1234 has been used", // either message or errors
"errors": ["merchant doesn't exist"]
}
Request
Body Params application/json
reward_code
string
required
business_refrence
string
required
Example
{
"reward_code": "",
"business_refrence": ""
}
Responses
Valid Response(200)
Invalid response(400)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
data
object
required
type
string
required
is_percentage
string
required
customer_number
string
required
discount_amount
string
required
max_discount_amount
string
required
allowed_products
array [object {2}]
required
button
object
required
errors
array[string]
required
ExampleValid Response
{
"data": {
"type": "1:for order,2:for product",
"is_percentage": "boolean",
"customer_number": "",
"discount_amount": "",
"max_discount_amount": "0:unlimit",
"allowed_products": [
{
"product_id": "",
"quantity": ""
}
],
"button": {
"label": {
"ar": "string",
"en": "string"
},
"url": "",
"close_modal": "boolean"
}
},
"errors": []
}
Modified at 9 months ago