Webhook that triggers when a new product is created
Webhook that triggers when a new product is created
{ "ID": "4bd2e7fc-d6c8-4966-a111-4c1db26d3606", "Outlet": "Outlet1", "Number": "B1.23.02.00004", "Date": "2023-02-17T00:00:00", "Payment": "Paid", "DueDate": "0001-01-01T00:00:00", "Tag": "Normal", "SalesType": "Normal", "Customer": { "Name": "ari2", "Mobile": "081916296998", "ID": "1b90d0ed-84ff-4e30-bded-13414ea3ea77" }, "Gross": 90000, "Sales": 90000, "Payments": [ { … } ] }
{ "reward": 9000 }
This webhook is triggered when the user inputs a promotional coupon from the SELL page. This is a synchronous API that requires a response.
Property | Type | Description |
---|---|---|
Type | String | Promotion Coupon Type |
Amount | Number | Total discount percentage or amount given |
status | String | Status of promotion coupon |
expiredAt | DateTime | Expiry date of promotion coupon |
Example Responses:
Response-1 (Percentage) |
---|
{ "Type": "percentageDiscount", "Amount": 50, "status": "activated", "expiredAt": "2023-03-19T16:59:59.999Z" } |
Response-2 (Value) |
---|
{ "Type": "value", "Amount": 100000, "status": "activated", "expiredAt": "2023-03-19T16:59:59.999Z" } |
Response-3 (400 Bad Request) |
---|
{ "status": "used", "expiredAt": "2023-03-19T16:59:59.999Z", "Message": "Coupon 29466091 has been used" } |
{ "Key": "1234", "Outlet": "Outlet1", "Customer": { "Email": "hendry@dealpos.com", "Phone": "81234567844" } }
{ "Type": "percentageDiscount", "Amount": 50, "status": "activated", "expiredAt": "2023-03-19T16:59:59.999Z" }