This API provides users with the ability to retrieve store cash offers, transactions, wallet information, and to effectively manage coupons, referrals, and tier information.
Authentication
To access the API, you must include an API key in your request headers.
Header:
Authorization: Bearer YOUR_API_KEY
Accept: application/json
wpcb: yes
How to generate Webplanex Wallet APIs key?
1. Log in to your WebplanexWallet admin area.
2. Go to Integrations > Webplanex Wallet APIs.
3. Click on "Get Token" button to generate token for store.
Base URL
All API endpoints are accessible via the following base URL:
https://cashback.webplanex.com/
Endpoints
1. Get Offers
Endpoint: /api/offers?shop={{shopify store url}}&customer={{shopify customer id}}
Method: GET
Description: Retrieve a list of all available store cash offers.
Response:
200 OK
{
"currency": "Rs.",
"status": 200,
"message": "Success",
"data": {
"0": {
"id": 1,
"name": "Total purchase",
"apply_on": "",
"quantity": 0,
"description": "Get 20% store cash on minimum total purchase of Rs.1.",
"type": 4,
"created_at": "2023-12-07T12:03:27.000000Z",
"updated_at": "2024-06-20T06:07:49.000000Z",
"show_link_attr": "style=\"text-decoration: none;\"",
"show_description": "Get 20% store cash on minimum total purchase of Rs.1.",
"getOfferTypeName": "Total Purchase"
},
"1": {
"id": 2,
"name": "Collection offer test",
"apply_on": "collection",
"quantity": 0,
"description": "<a href=\"/collections/hydrogen\">Collection offer test Hydrogen</a>",
"type": 0,
"created_at": "2023-12-26T10:19:12.000000Z",
"updated_at": "2024-07-11T04:06:59.000000Z",
"show_link_attr": "",
"show_description": "<a href=\"/collections/hydrogen\">Collection offer test Hydrogen</a>",
"getOfferTypeName": "Store cash on Products OR Collections"
},
"path": "https://cashback.webplanex.com/api/offers",
"per_page": 10,
"next_cursor": null,
"next_page_url": null,
"prev_cursor": null,
"prev_page_url": null
}
}
2. Get Coupons
Endpoint: /api/coupons?shop={{shopify store url}}
Method: GET
Description: Retrieve a list of all available coupons.
Response:
200 OK
{
"status": 200,
"message": "Success",
"data": {
"123": {
"code": "xcodecodetset",
"value_type": "percentage",
"value": 1,
"coupon_starts_at": "07 Aug 2024",
"coupon_ends_at": "14 Aug 2024",
"append_type": "%",
"final_value": "1%",
"details": [
"1% Discount on Collection Accessories",
"All customers",
"Active from 07 Aug 2024"
]
},
"456": {
"code": "zcodecodetst",
"value_type": "percentage",
"value": 1,
"coupon_starts_at": "07 Aug 2024",
"coupon_ends_at": "14 Aug 2024",
"append_type": "%",
"final_value": "1%",
"details": [
"1% Discount on Collection Accessories",
"All customers",
"Active from 07 Aug 2024"
]
}
}
}
3. Generate Referral Link
Endpoint: /api/referrals?shop={{shopify store url}}
Method: POST
Description: Generate Referral Link
Request Body:
{
"customer_id": "{{shopify customer id}}"
}
Response:
200 OK
{
"status": 200,
"message": "Success"
}
4. Get Referral Link
Endpoint: /api/referrals/{{shopify customer id}}?shop={{shopify store url}}
Method: GET
Description: Retrieve a referral link
Response:
200 OK
{
"status": 200,
"message": "Success",
"data": {
"referral_url": "https://xyz.com/d296ef"
}
}
5. Get Customer Wallet
Endpoint: /api/customerwallet/{{shopify customer id}}?shop={{shopify store url}}
Method: GET
Description: Retrieve a my wallet information
Response:
200 OK
{
"status": 200,
"message": "Success",
"data": {
"currency": "Rs.",
"balance": [
{
"cash_balance": 155.78
}
],
"email_preferences_url": "https://cashback.webplanex.com/mail_preferences/easdfakdf",
"transactions": {
"0": {
"transaction": "Store Cash Balance Adjustment By Store Admin Expired",
"date": "26 June 2024",
"used": "-",
"earned": "Rs. 2 Expired",
"total": "-"
},
"1": {
"transaction": "Store Cash Balance Adjustment By Store Admin ",
"date": "26 June 2024",
"used": "-",
"earned": "Rs. 0 Deducted",
"total": "-"
},
"path": "https://cashback.webplanex.com/api/customerwallet/123",
"per_page": 10,
"next_cursor": null,
"next_page_url": null,
"prev_cursor": null,
"prev_page_url": null
},
"assigned_tiers": [],
"store_credit_balance": {
"amount": "30.05",
"currencyCode": "INR"
},
"store_credit_transactions": [
{
"__typename": "StoreCreditAccountCreditTransaction",
"id": "gid://shopify/StoreCreditAccountCreditTransaction/896532769",
"amount": {
"amount": "5.0",
"currencyCode": "INR"
},
"balanceAfterTransaction": {
"amount": "30.05",
"currencyCode": "INR"
},
"expiresAt": null,
"createdAt": "2024-10-24T05:35:36Z"
},
]
}
}
6. Get Tiers
Endpoint: /api/tiers?shop={{shopify store url}}
Method: GET
Description: Retrieve a tier levels
Response:
200 OK
{
"status": 200,
"message": "Success",
"data": [
{
"currency": "Rs.",
"background_color": "#C77B30",
"text_color": null,
"image": "https://cashback.webplanex.com/front_assets/general/medal.png",
"title": "Bronze",
"cashback_value": "0Rs.",
"max_cashback_amount": "N/A",
"eligible_purchase_amount": 0,
"retain_level": "N/A"
}
]
}
7. Create Coupon
Endpoint: /api/coupons?shop={{shopify store url}}
Method: POST
Description: Create coupon code
Request Body:
{
"customer_id": "{{shopify customer id}}",
"amount":"1.00"
}
Response:
200 OK
{
"status": 200,
"message": "Success",
"coupon_code": "codecode123"
}