Generic Redemption APIs

Here is the skeleton of APIs, Xoxoday requires, whilst communicating with your point system.

Xoxoday can support varying API designs with few restrictions.

  1. Should be REST APIs.

  2. Content-type should be JSON.

  3. Should be HTTPS

Use these API Skeletons to design your APIs.

Fetch Redemption Point Balance

Xoxoday will use this API to fetch a user’s points from your point system.

Request:

Method

URL

GET/POST

https://<3rd-party-api-url-for-fetch-points>

Params

Values

unique_id*

auth_token*

Unique identifier of a user

Some authorization value to successfully allow the request from xoxoday to your system. Authorization can be but not limited to hash, Basic auth, Bearer token

* Key name can be different, there’s no restriction

Request Body:

{
"unique_id":"DB123",
"auth_token":"0fe121f67cb0b90ef39fd83380bf1e12310912c86f4d7d5bfed3f3198e531b4f8d8af179b68361da28d0bc0353ce45ac7c374aa9c51dfb54c6705571f5ab8fe8"
}

Sample Response:

Status: 200 OK 
Body: 
{ 
   "status":"1",
   "points_info":{ 
      "points_received":"2000",
      "points_redeemed":"1300",
      "points_available":"700"
   }
}

* This is just a sample response, it can vary according to your API design.

Update Redemption Transaction

Xoxoday will use this API to update a user’s points in your point system.

Request:

Method

URL

POST/PUT/PATCH

https://<3rd-party-api-url-for-update-points>

Params

Values

unique_id*

auth_token*

total_points_redeemed*

total_points_added*

Unique identifier of a user

Some authorization value to successfully allow the request from Xoxoday to your system. Authorization can be but not limited to hash, Basic auth, Bearer token, etc.

* Key name can be different, there’s no restriction

Request Body:

{ 
"unique_id":"TTEO32S99ERCL",
"auth_token":"0fe121f67cb0b90ef39fd83380bf1e12310912c86f4d7d5bfed3f3198e531b4f8d8af179b68361da28d0bc0353ce45ac7c374aa9c51dfb54c6705571f5ab8fe8",
"total_points_redeemed":"129",
"total_points_added":null,
"extra": { 
 "order_id": "AB1890082790",
 "amount": "129",
 "products": [
{
 "id": "123456",
"name": "product name",
"price": 29
},...
] 
}
}

Sample Response:

Status: 200 OK

Body:

{ 
   "status":"1",
   "message":"Successfully updated"
}

* This is just a sample response, it can vary according to your API design.

Last updated