Loyalty

Loyalty consists of two stages.

Adding points, redeeming points.  

  • The adding points stage should use the Sale Webhooks.  
  • The Redeeming points consist of two stages ( Verify Code, Redeem Code)

The developer should configure his loyalty URL for each Redemption stage in his app dashboard.

POSRocket provides five types of redemption:

  1. Free items 
  2. Buy one get one free 
  3. But one gets many free
  4. Discount Per Item(fixed/percentage) 
  5. Discount Per Sale(fixed/percentage)

POSRocket will use these URL's to send a POST request to them. 

Here are the requests and responses related to loyalty: 

1.Verify Code:

POST URL: The developer should configure it in the app dashboard

POST Body: 

"code": "WOHOO", "location_id": "131e22c1-074b-4358-a7bd-a20dbf67a64e", "register_id": "2d77f5d4-e673-4059-9928-1e65149fca71", "customer_id": "61fdda3f-b56d-4756-9818-06f68bb80a8a" }

POST Response: 

There will be different response per redemption type which will be one of the following: 

  • Free Item:

{ "action": "FREE_ITEMS", 

"item": [ { "variation_id": "cd9f7bf1-cb9f-404f-97f2-cf73384dff8e" }, { "variation_id": "a3a2a1f5-d1f2-417d-9259-c7468fa7f8b6" } ] }

  • Percentage Discount Per Item: 

"action": "DISCOUNT_PER_ITEM", 

"discount": { "name": "integration", "type": "PERCENTAGE", "rate": 10 }, "item": [ { "variation_id": "cd9f7bf1-cb9f-404f-97f2-cf73384dff8e" } ] }

  • Fixed Discount Per Item: 

{ "action": "DISCOUNT_PER_ITEM", "discount": { "name": "integration", "type": "FIXED", "amount": 1000, "after_tax": true }, "item": [ { "variation_id": "cd9f7bf1-cb9f-404f-97f2-cf73384dff8e" } ] }

  • Percentage Discount Per Sale: 

{"action": "DISCOUNT_PER_SALE","discount": {"name": "integration","type": "PERCENTAGE","rate": 10}}

  • Fixed Discount Per Sale: 

{"action": "DISCOUNT_PER_SALE","discount": {"name": "integration","type": "FIXED", "amount": 1000, "after_tax":true}}

  • Buy one get Many Free 

"action": "BUY_ONE_GET_MANY", 

"item": [ { "variation_id": "a3a2a1f5-d1f2-417d-9259-c7468fa7f8b6" }, { "variation_id": "89cda9ef-b232-42ab-b086-7e1cce429fc4" } ], "depends_on": "cd9f7bf1-cb9f-404f-97f2-cf73384dff8e" }

 

2. Redeem Code: 

POST URL: The developer should configure it in the app dashboard

POST Body:

{ "code": "WOHOO", "location_id": "131e22c1-074b-4358-a7bd-a20dbf67a64e", "register_id": "2d77f5d4-e673-4059-9928-1e65149fca71", "customer_id": "61fdda3f-b56d-4756-9818-06f68bb80a8a" }

POST Request: 

{ "status": "REDEEMED" }