Promotions
Promotions codes are a core concept for the Wallet App platform, codes are used as a one time use code that can be redeemed for free service in the real world. Codes can be created and managed through the API.
Create a promotions code
The coupon model is related to genrated a new promotions and activate code for specific user.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Request body
- Name
promotion_id
- Type
- integer
- Description
The promotion id it's belongs to promotion
- Name
location_id
- Type
- integer
- Description
The location id it's belongs to location
- Name
activation_date
- Type
- string
- Description
The code activation date
- Name
first_name
- Type
- string
- Description
The first name for create as user
- Name
last_name
- Type
- string
- Description
The last name for create as user
- Name
email
- Type
- string
- Description
The email used for communication purposes
Request
curl -X POST https://api.walletapp.co/promotions/requestActivatedCode
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"promotion_id":"<uuid>",
"location_id":"<identifier>",
"activation_date":"<activation_date>",
"first_name":"<first_name>",
"last_name":"<last_name>",
"email":"<email>",
}'
Response
{
"message": "Promotion code activated successfully",
"data": {
"code": "<code>",
"expiration_date": "<expiration_date>",
"first_name": "<first_name>",
"last_name": "<last_name>",
"email": "<email>",
"url": "<url>"
}
}
All redeemed a code list
The endpoint allows you to fetch a promotion codes by its identifier.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Route parameters
- Name
identifier
- Type
- string
- Description
The id of the promotion you want get data.
Request
curl -X GET https://api.walletapp.co/promotions/requestUnactivatedCode/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Redeemed Codes fetched successfully",
"result": {
"data": "[<Code List>]"
}
}
Get brands list as per promotion
The endpoint allows you to fetch a brands list as promotions by its promotion_id.
Required headers
This API requires a Device Token. These tokens are generated in the dashboard by navigating to "Scanners" and clicking the key icon.
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Request body
- Name
organization_identifier
- Type
- string
- Description
The organization identifier it's belongs to promotion
- Name
promotion_identifier
- Type
- string
- Description
The promotion identifier it's belongs to promotion
Request
curl -X GET https://api.walletapp.co/promotion/getBrandsList
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"organization_identifier":"<organization_identifier>",
"promotion_identifier":"<promotion_identifier>"
}'
Response
{
"success": true,
"message": "Data fetch successfully",
"data": {
"id": <promotion_id>,
"organization_id": <organization_id>,
"title": <title>,
"reference": <reference>,
"description":<description>,
"start_date":<start_date>,
"end_date":<end_date>,
"brands": [
<brands list>
"locations": [
<locations list>
"locationTime": {
<locationTime>
},
"locationLabels": {
<locationLabels>
}
"products": {
<products>
}
]
],
"pivot": {
"promotion_id": <promotion_id>,
"brand_id": <brand_id>,
"description": <description>,
"link": <link>,
"premium": <premium>
}
}
}