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.


GET/tags

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

GET
/tags
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>"
        },
        ...
    ]
}

POST/tags

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

POST
/tags
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>"
    }
}

PUT/tags

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

PUT
/tags
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/tags

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

DELETE
/tags
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"
}

POST/tags/passes

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

POST
/tags/passes
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/tags/passes

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

GET
/tags/passes
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>"
        }
    ]
}

DELETE/tags/passes

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

DELETE
/tags/passes
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"
}

POST/tags/members

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

POST
/tags/members
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/tags/members

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

GET
/tags/members
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>"
        }
    ]
}

DELETE/tags/members

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

DELETE
/tags/members
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"
}