Storecards
Storecards are just like coupons a core concept of the wallet app platform. Member balance and points will be stored on a storecard. A storecard can be used to save points and can be used to pay for products.
The storecard model
The storecard model contains the information about a storecard itself. It also contains info on how it should be displayed in the apple wallet. The following properties are available:
Properties
- Name
title
- Type
- string
- Description
The title of the storecard.
- Name
subtitle
- Type
- string
- Description
The subtitle of the storecard.
- Name
organization
- Type
- object
- Description
The organization object that belongs to the storecard, contains:
['identifier', 'name']
- Name
thumbnail_url
- Type
- string|url
- Description
A valid url to the thumbnail image of a storecard.
- Name
primary_color
- Type
- string
- Description
The primary color of the storecard.
- Name
text_color
- Type
- string
- Description
The text color of the storecard.
- Name
balance_label
- Type
- string
- Description
Currency type that should be displayed on the storecard while in the wallet.
- Name
date_label
- Type
- string
- Description
Label that should be displayed for the passes expiration_date on the storecard while in the wallet (if provided).
- Name
description
- Type
- string
- Description
The description of the storecard.
- Name
expires_at
- Type
- timestamp
- Description
The expiration date of the storecard.
- Name
identifier
- Type
- string
- Description
The unique identifier of the storecard.
- Name
image
- Type
- string|url
- Description
The image of the storecard.
- Name
location_label
- Type
- string
- Description
Label that should be displayed for the passes location on the storecard while in the wallet (if provided).
- Name
name_label
- Type
- string
- Description
Label that should be displayed for the passes name on the storecard while in the wallet (if provided).
- Name
points_label
- Type
- string
- Description
Label that should be displayed for the passes points on the storecard while in the wallet (if provided).
- Name
show_balance
- Type
- boolean
- Description
Should the balance be displayed on the storecard while in the wallet.
- Name
show_brand
- Type
- boolean
- Description
Should the location (brand) be displayed on the storecard while in the wallet.
- Name
show_name
- Type
- boolean
- Description
Should the name be displayed on the storecard while in the wallet.
- Name
show_points
- Type
- boolean
- Description
Should the points be displayed on the storecard while in the wallet.
- Name
show_start_date
- Type
- boolean
- Description
Should the start date be displayed on the storecard while in the wallet.
- Name
show_status
- Type
- boolean
- Description
Should the status be displayed on the storecard while in the wallet.
- Name
show_subtitle
- Type
- boolean
- Description
Should the subtitle be displayed on the storecard while in the wallet.
- Name
show_title
- Type
- boolean
- Description
Should the title be displayed on the storecard while in the wallet.
- Name
status_label
- Type
- string
- Description
Label that should be displayed for the passes status on the storecard while in the wallet (if provided).
Note
Because a user can have access to multiple organizations we require a organization_id to be provided for most requests. We will also return an organization reference in each response.
List all storecards
This endpoint returns a list of all the storecards the currently authenticated user has access to.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.get
- Type
- string
- Description
The scope required to access this endpoint.
Request
curl -X GET https://api.walletapp.co/storecards
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": [
{
"balance_label": "Euro",
"date_label": null,
"description": null,
"expires_at": null,
"identifier": "<storecard_id>",
"image": "<image_url>",
"location_label": "vestiging",
"name_label": "Name",
"organization": {
"name": "<organization_name>",
"identifier": "<organization_identifier>"
},
"points_label": "Points",
"primary_color": null,
"show_balance": 0,
"show_brand": 0,
"show_name": 1,
"show_points": 1,
"show_start_date": 0,
"show_subtitle": 0,
"show_title": 1,
"status_label": "Member",
"subtitle": "<subtitle>",
"text_color": null,
"title": "<title>"
},
...
]
}
Create a storecard
This endpoint allows you to create a storecard.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
title
- Type
- string|Required
- Description
The title of the storecard.
- Name
subtitle
- Type
- string|Required
- Description
The subtitle of the storecard.
- Name
organization_id
- Type
- string|Required
- Description
The organization id the storecard should be created for.
- Name
sponsor_url
- Type
- string|Required
- Description
The webshop description of a storecard.
- Name
description
- Type
- string
- Description
The description of the storecard.
- Name
thumbnail_url
- Type
- string|url
- Description
A valid url to the thumbnail image of a storecard.
- Name
primary_color
- Type
- string
- Description
A Hexadecimal color code for the primary color of the storecard (background color for the apple wallet pass).
- Name
text_color
- Type
- string
- Description
A Hexadecimal color code for the text color of the storecard (text color for the apple wallet pass).
Request
curl -X POST https://api.walletapp.co/storecards
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"balance_label": "Euro",
"date_label": "<date_label>",
"description": "<description>",
"expires_at": "01-01-2022",
"location_label": "vestiging",
"name_label": "Name",
"organization_id": "<organization_id>",
"points_label": "Points",
"primary_color": "#ff00ff",
"show_balance": 1,
"show_brand": 1,
"show_name": 1,
"show_points": 1,
"show_start_date": 1,
"show_subtitle": 1,
"show_title": 1,
"status_label": "API LABEL",
"subtitle": "<subtitle>",
"text_color": "#FF22FF",
"title": "<title>"
}'
Response
{
"message": "Request successful",
"data": {
"balance_label": "Euro",
"date_label": null,
"description": "<description>",
"expires_at": "<expiration_date>",
"identifier": "<identifier>",
"image": null,
"location_label": "vestiging",
"name_label": "Name",
"organization": {
"name": "<organization_name>",
"identifier": "<organization_identifier>"
},
"points_label": "Points",
"primary_color": "#ff00ff",
"show_balance": 0,
"show_brand": 1,
"show_name": 1,
"show_points": 1,
"show_start_date": 0,
"show_subtitle": 1,
"show_title": 1,
"status_label": "API LABEL",
"subtitle": "<subtitle>",
"text_color": "#FF22FF",
"title": "<title>"
}
}
Inspect a storecard
The endpoint allows you to fetch a storecard by its identifier.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.get
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The id of the storecard you want to update.
Request
curl -X GET https://api.walletapp.co/storecards/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": {
"balance_label": "Euro",
"date_label": null,
"description": "<description>",
"expires_at": "<expiration_date>",
"identifier": "<identifier>",
"image": null,
"location_label": "vestiging",
"name_label": "Name",
"organization": {
"name": "<organization_name>",
"identifier": "<organization_identifier>"
},
"points_label": "Points",
"primary_color": "#ff00ff",
"show_balance": 0,
"show_brand": 1,
"show_name": 1,
"show_points": 1,
"show_start_date": 0,
"show_subtitle": 1,
"show_title": 1,
"status_label": "API LABEL",
"subtitle": "<subtitle>",
"text_color": "#FF22FF",
"title": "<title>"
}
}
Update a storecard
This endpoint allows you to create a storecard.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.update
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The id of the storecard you want to update.
Request body
- Name
title
- Type
- string
- Description
The title of the storecard.
- Name
subtitle
- Type
- string
- Description
The subtitle of the storecard.
- Name
organization_id
- Type
- string
- Description
The organization id the storecard should be created for.
- Name
sponsor_url
- Type
- string
- Description
The webshop description of a storecard.
- Name
description
- Type
- string
- Description
The description of the storecard.
- Name
thumbnail_url
- Type
- string|url
- Description
A valid url to the thumbnail image of a storecard.
- Name
primary_color
- Type
- string
- Description
A Hexadecimal color code for the primary color of the storecard (background color for the apple wallet pass).
- Name
text_color
- Type
- string
- Description
A Hexadecimal color code for the text color of the storecard (text color for the apple wallet pass).
Request
curl -X PUT https://api.walletapp.co/storecards
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"balance_label": "Euro",
"date_label": "<date_label>",
"description": "<description>",
"expires_at": "01-01-2022",
"location_label": "vestiging",
"name_label": "Name",
"organization_id": "<organization_id>",
"points_label": "Points",
"primary_color": "#ff00ff",
"show_balance": 1,
"show_brand": 1,
"show_name": 1,
"show_points": 1,
"show_start_date": 1,
"show_subtitle": 1,
"show_title": 1,
"status_label": "API LABEL",
"subtitle": "<subtitle>",
"text_color": "#FF22FF",
"title": "<title>"
}'
Response
{
"message": "Request successful",
"data": {
"balance_label": "Euro",
"date_label": null,
"description": "<description>",
"expires_at": "<expiration_date>",
"identifier": "<identifier>",
"image": null,
"location_label": "vestiging",
"name_label": "Name",
"organization": {
"name": "<organization_name>",
"identifier": "<organization_identifier>"
},
"points_label": "Points",
"primary_color": "#ff00ff",
"show_balance": 0,
"show_brand": 1,
"show_name": 1,
"show_points": 1,
"show_start_date": 0,
"show_subtitle": 1,
"show_title": 1,
"status_label": "API LABEL",
"subtitle": "<subtitle>",
"text_color": "#FF22FF",
"title": "<title>"
}
}
Delete a storecard
The endpoint allows you to delete a storecard.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.delete
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The id of the storecard you want to update.
Request
curl -X delete https://api.walletapp.co/storecards/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": "Storecard archived",
}
Restore a storecard
The endpoint allows you to restore a storecard.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
storecards.delete
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The id of the storecard you want to update.
Request
curl -X PATCH https://api.walletapp.co/storecards/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": "Storecard restored",
}