Tags
Tags are a part of the segmentation engine. Tags can be used to manually, or in this case, programmatically group members to a specific partition.
The tag model
The tag model contains the info about a specific tag.
Properties
- Name
tag
- Type
- string
- Description
The human readable variant of the tag label.
- Name
external_reference
- Type
- string
- Description
A identifier provided by the implementing party.
- Name
uuid
- Type
- string
- Description
The WalletApp identifier for a tag.
- Name
created_at
- Type
- timestamp
- Description
The timestamp of creation.
- Name
updated_at
- Type
- timestamp
- Description
The timestamp of the last update.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Note
Because a user can have access to multiple organizations we require a organization_id to be passed by most requests. We will also return an organization reference in each response.
List all tags
This endpoint returns a list of all the tags the currently authenticated user has access to.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.get
- Type
- string
- Description
The scope required to access this endpoint.
Request
curl -X GET https://api.walletapp.co/tags
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"success": true,
"data": [
{
"tag": "<tag>",
"external_reference": "<external_reference>",
"uuid": "<uuid>",
"created_at": "<timestamp>",
"updated_at": "<timestamp>",
"brand_id": "<brand_id>"
},
...
]
}
Create a tag
This endpoint allows you to create a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
brand_id
- Type
- string|Required
- Description
The id of the brand the tag is attached to.
- Name
external_reference
- Type
- string|Required
- Description
The reference provided by the implementing party.
- Name
tag
- Type
- string|Required
- Description
The human readable variant of the tag label.
Request
curl -X POST https://api.walletapp.co/tags
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<brand_id>",
"external_reference": "<external_reference>",
"tag": "<tag>"
}'
Response
{
"success": true,
"data": {
"tag": "<tag>",
"external_reference": "<external_reference>",
"uuid": "<uuid>",
"created_at": "<timestamp>",
"updated_at": "<timestamp>",
"brand_id": "<brand_id>"
}
}
Update a tag
This endpoint allows you to update a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The id of the tag to update.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
- Name
external_reference
- Type
- string
- Description
The reference provided by the implementing party.
- Name
tag
- Type
- string
- Description
The identifier of the organization the product should be created for.
Request
curl -X PUT https://api.walletapp.co/tags
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<brand_id>",
"external_reference": "<external_reference>",
"tag": "<tag>"
}'
Response
{
"success": true,
"data": {
"tag": "<tag>",
"external_reference": "<external_reference>",
"uuid": "<uuid>",
"created_at": "<timestamp>",
"updated_at": "<timestamp>",
"brand_id": "<brand_id>"
}
}
Delete a tag
This endpoint allows you to delete a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The id of the tag to update.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Request
curl -X DELETE https://api.walletapp.co/tags
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<brand_id>",
"tag_id": "<tag_id>"
}'
Response
{
"success": true,
"message": "Tag removed"
}
Add a pass to a tag
This endpoint allows you to add a pass to a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
pass_code
- Type
- string|Required
- Description
The pass that needs to be added to the tag.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Request
curl -X POST https://api.walletapp.co/tags/passes
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"pass_code": "<code>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"message": "Pass added to tag"
}
Get passes
Get a list of all the passes for a specific tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.get
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
brand_id
- Type
- string|Required
- Description
The id of the brand the tag is attached to.
Request
curl -X GET https://api.walletapp.co/tags/passes
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"data": [
{
"pass_code": "<pass_code>"
}
]
}
Remove a pass from a tag
This endpoint allows you to remoe a pass from a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
pass_code
- Type
- string|Required
- Description
The pass that needs to be added to the tag.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Request
curl -X DELETE https://api.walletapp.co/tags/passes
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"pass_code": "<code>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"message": "Pass removed from tag"
}
Add a member to a tag
This endpoint allows you to add a member to a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
member_id
- Type
- string|Required
- Description
The member_id that needs to be added to the tag.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Request
curl -X POST https://api.walletapp.co/tags/members
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"member_id": "<uuid>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"message": "Member added to tag"
}
Get members
Get a list of all the members for a specific tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.get
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
brand_id
- Type
- string|Required
- Description
The id of the brand the tag is attached to.
Request
curl -X GET https://api.walletapp.co/tags/members
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"data": [
{
"identifier": "<member_id>",
"email": "<email>"
}
]
}
Remove a member from a tag
This endpoint allows you to remoe a member from a tag.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
tags.store
- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
tag_id
- Type
- string|Required
- Description
The uuid or the external_reference of the tag.
- Name
member_id
- Type
- string|Required
- Description
The member_id that needs to be added to the tag.
- Name
brand_id
- Type
- string
- Description
The id of the brand the tag is attached to.
Request
curl -X DELETE https://api.walletapp.co/tags/members
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
"brand_id": "<uuid>",
"member_id": "<uuid>",
"tag_id": "<uuid>"
}'
Response
{
"success": true,
"message": "Member removed from tag"
}