Devices
Devices are refered to as scanners in the dashboard. They are used to scan QR codes. They are also used to scan the members card.
The device model
The device model contains info about its current configuration.
Properties
- Name
name
- Type
- string
- Description
The name of the device.
- Name
identifier
- Type
- string
- Description
Unique identifier for the brand.
- Name
external_device_id
- Type
- string
- Description
Your identifier or unique reference to the device.
- Name
add_multiplier
- Type
- integer
- Description
The multiplier for adding points to a storecard. Defaults to 1.
- Name
subtract_multiplier
- Type
- integer
- Description
The multiplier for subtracting points from a storecard. Defaults to 1.
- Name
pin
- Type
- string
- Description
The authentication token used to login to the device.
- Name
location
- Type
- object
- Description
The location that is attached to the location, contains:
["identifier", "address"]
Get a list of devices
This endpoint returns a list of devices.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.get
- Type
- string
- Description
The scope required to access this endpoint.
Request
curl -X GET https://api.walletapp.co/devices
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": [
{
"name": "<device_name>",
"identifier": "<uuid>",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1,
"pin": "1234",
"location": {
"identifier": "<uuid>",
"address": "<address>"
}
},
...
]
}
Store a device
This endpoint is used to create a new device.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
name
- Type
- string|Required
- Description
The name of the device.
- Name
location_id
- Type
- string|Required
- Description
The location identifier.
- Name
external_device_id
- Type
- string|Required
- Description
A unique identifier for the device.
- Name
pin
- Type
- string|Required
- Description
An authentication token used to sign in to the device.
- Name
add_multiplier
- Type
- integer
- Description
If a storecard is scanned what the amount of points scanned should be multiplied by.
- Name
subtract_multiplier
- Type
- integer
- Description
If a storecard is scanned what the amount of points scanned should be multiplied by.
Request
curl -X POST https://api.walletapp.co/devices
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"name": "<device_name>",
"location_id": "<location_id>",
"pin": "1234",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1
}'
Response
{
"message": "Request successful",
"data": {
"name": "<device_name>",
"identifier": "<uuid>",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1,
"pin": "1234",
"location": {
"identifier": "<uuid>",
"address": "<address>"
}
}
}
Fetch a device
Fetch a specific device.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.get
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The identifier of the device.
Request
curl -X GET https://api.walletapp.co/devices/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"data": {
"name": "<device_name>",
"identifier": "<uuid>",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1,
"pin": "1234",
"location": {
"identifier": "<uuid>",
"address": "<address>"
}
}
}
Update a device
This endpoint is used to update a device.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.put
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The identifier of the device.
Request body
- Name
name
- Type
- string
- Description
The name of the device.
- Name
location_id
- Type
- string
- Description
The location identifier.
- Name
external_device_id
- Type
- string
- Description
A unique identifier for the device.
- Name
pin
- Type
- string|Required
- Description
An authentication token used to sign in to the device.
- Name
add_multiplier
- Type
- integer
- Description
If a storecard is scanned what the amount of points scanned should be multiplied by.
- Name
subtract_multiplier
- Type
- integer
- Description
If a storecard is scanned what the amount of points scanned should be multiplied by.
Request
curl -X PUT https://api.walletapp.co/devices/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"name": "<device_name>",
"location_id": "<location_id>",
"pin": "1234",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1
}'
Response
{
"message": "Request successful",
"data": {
"name": "<device_name>",
"identifier": "<uuid>",
"external_device_id": "<external_device_id>",
"add_multiplier": 1,
"subtract_multiplier": 1,
"pin": "1234",
"location": {
"identifier": "<uuid>",
"address": "<address>"
}
}
}
Archive a device
Archive a specific device.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.get
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The identifier of the device.
Request
curl -X DELETE https://api.walletapp.co/devices/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"message": "Device deleted"
}
Restore a device
Restore a specific device.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
devices.get
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The identifier of the device.
Request
curl -X PATCH https://api.walletapp.co/devices/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"message": "Device restore"
}
Pass info
Get the info of a barcode.
This API requires a Device Token. These tokens are generated in the dashboard by navigating to "Scanners" and clicking the key icon.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
scanners.get
- Type
- string
- Description
The scope required to access this endpoint.
Query parameters
- Name
code
- Type
- string
- Description
The qr code on the pass
Response
- Name
pass_identifier
- Type
- string
- Description
The QR code of the pass.
- Name
pass_type
- Type
- string
- Description
The type of the bar, currently only supports 'discount'
- Name
user_identifier
- Type
- string
- Description
The identifier of the user that owns the pass.
- Name
user_first_name
- Type
- string
- Description
The first name of the user that owns the pass.
- Name
pass_title
- Type
- string
- Description
The title of the pass.
- Name
pass_subtitle
- Type
- string
- Description
The subtitle of the pass.
- Name
reference
- Type
- string
- Description
The reference provided by the third party vendor or integrator.
Request
curl -X GET https://api.walletapp.co/devices/scan/info?code=<code>
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"pass_identifier": "<pass_id>",
"pass_type": "<type|(discount)>",
"pass_installed": "<boolean>",
"user_identifier": "<string>",
"user_first_name": "<string>",
"pass_title": "<string>",
"pass_subtitle": "<string>",
"reference": "<string>"
}
Redeem a pass
Redeem the pass for a location
This API requires a Device Token. These tokens are generated in the dashboard by navigating to "Scanners" and clicking the key icon.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
scanners.post
- Type
- string
- Description
The scope required to access this endpoint.
Query parameters
- Name
code
- Type
- string
- Description
The qr code on the pass
Response
- Name
pass_identifier
- Type
- string
- Description
The QR code of the pass.
- Name
pass_type
- Type
- string
- Description
The type of the bar, currently only supports 'discount'
- Name
user_identifier
- Type
- string
- Description
The identifier of the user that owns the pass.
- Name
user_first_name
- Type
- string
- Description
The first name of the user that owns the pass.
- Name
pass_title
- Type
- string
- Description
The title of the pass.
- Name
pass_subtitle
- Type
- string
- Description
The subtitle of the pass.
- Name
reference
- Type
- string
- Description
The reference provided by the third party vendor or integrator.
Request
curl -X POST https://api.walletapp.co/devices/scan
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{"code": "<code>"}'
Response
{
"pass_identifier": "<pass_id>",
"pass_type": "<type|(discount)>",
"pass_installed": "<boolean>",
"user_identifier": "<string>",
"user_first_name": "<string>",
"pass_title": "<string>",
"pass_subtitle": "<string>",
"reference": "<string>"
}