Passes

Passes are a way to provide your users with a digital representation of a physical product. This can be a coupon, a storecard or a prepaidcard.


GET/passes

Inspect pass with email

Search for a pass using a members email address for a specific brand.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Query parameters

  • Name
    email
    Type
    string|Required
    Description

    The email address of the member.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    pass_code
    Type
    string|Required
    Description

    The code of the pass.

Request

GET
/passes
curl -X GET https://api.walletapp.co/passes 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "email": "<email>", 
    "pass_code": "<pass_id||qr_code>"
}'

Response

{
    "success": true,
    "data": {
        "brand_id": "<brand_id>",
        "code": "<code>",
        "created_at": "<timestamp>",
        "updated_at": "<timestamp>",
        "demo": 0,
        "redeemed": 0,
        "active": 1,
        "expired": 0,
        "blocked": 0,
        "reminder_send": 0,
        "expiration_date": "<timestamp>",
        "start_date": null,
        "reminder_date": null,
        "parsed_historical": 0,
        "coupon": {
            "identifier": "<identifier>",
            "price": "<coupon shop price>",
            "points": "<coupon shop points>",
            "external_reference": "<reference>"
        }, 
        "storecard": {
            "identifier": "<identifier>",
            "points": "<points>",
            "balance": "<balance>",
        }
    }
}

GET/search/pass

Inspect passes

Search for a pass only using the pass code.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    search.pass
    Type
    string
    Description

    The scope required to access this endpoint.

Query parameters

  • Name
    pass_code
    Type
    string|Required
    Description

    The code of the pass.

Request

GET
/search/pass
curl -X GET https://api.walletapp.co/search/pass 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "pass_code": "<pass_id||qr_code>"
}'

Response

{
    "success": true,
    "data": [
        {
            "created_at": "<timestamp>",
            "updated_at": "<timestamp>",
            "expiration_date": "<timestamp>",
            "downloaded": 1,
            "start_date": "<timestamp>",
            "batch_reference": null,
            "reminder_date": null,
            "download_lat": null,
            "user_name": "<username>",
            "member_id": "<member_id>",
            "download_long": null,
            "pass_code": "<pass_code>",
            "status": "active",
            "brand": {
                "name": "<name>",
                "identifier": "<UUID>"
            },
            "coupon": {
                "title": "<title>",
                "identifier": "<UUID>",
                "price": 0,
                "points": 0,
                "external_reference": "<external_reference>"
            }
        }
    ]
}

PUT/passes

Modify a pass

Modify the expiration date or the status of a pass.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Query parameters

  • Name
    email
    Type
    string|Required
    Description

    The email address of the member.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    pass_code
    Type
    string|Required
    Description

    The code of the pass.

  • Name
    expiration_date
    Type
    timestamp|Required
    Description

    The new expiration date of the pass.

  • Name
    status
    Type
    string|Required
    Description

    The new status of a pass. Can be ['active', 'expired', 'redeemed', 'blocked']

Request

PUT
/passes
curl -X PUT https://api.walletapp.co/passes 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "email": "<email>", 
    "pass_code": "<pass_id||qr_code>",
    "expiration_date": "<timestamp>",
    "status": "<status>"
}'

Response

{
    "success": true,
    "message": "Pass updated successfully",
    "transaction_id": "<uuid>"
}

DELETE/passes

Remove a pass

Remove a pass from a member.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Query parameters

  • Name
    email
    Type
    string|Required
    Description

    The email address of the member.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    pass_code
    Type
    string|Required
    Description

    The code of the pass.

Request

DELETE
/passes
curl -X DELETE https://api.walletapp.co/passes 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "email": "<email>", 
    "pass_code": "<pass_id||qr_code>"
}'

Response

{
    "success": true,
    "message": "Pass removed"
}

POST/passes

Email a pass

Send a specific coupon pass to a member.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Body parameters

  • Name
    email
    Type
    string|Required
    Description

    The email address of the member.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    coupon_id
    Type
    string|Required
    Description

    The id of the coupon to send.

  • Name
    status
    Type
    string|Required
    Description

    The status of the pass. Can be: ['active', 'blocked', 'expired', 'redeemed']

  • Name
    pass_title
    Type
    string
    Description

    A custom title to display on this pass.

  • Name
    expiration_date
    Type
    string
    Description

    The expiration date of the pass.

Request

POST
/passes
curl -X POST https://api.walletapp.co/passes 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    'email': '<email>',
    'brand_id': '<brand_id>',
    'coupon_id': '<coupon_id>',
    'expiration_date': '<expiration_date>',
    'pass_title': '<pass_title>',
    'status': 'active'
}'

Response

{
    "success": true,
    "message": "Email has been send"
}

POST/passes/url

This endpoint generates a new pass and returns the url to the download page.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Body parameters

  • Name
    email
    Type
    string|Required
    Description

    The email address of the member.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    coupon_id
    Type
    string|Required
    Description

    The id of the coupon to send.

  • Name
    status
    Type
    string|Required
    Description

    The status of the pass. Can be: ['active', 'blocked', 'expired', 'redeemed']

  • Name
    pass_title
    Type
    string
    Description

    A custom title to display on this pass.

  • Name
    expiration_date
    Type
    string
    Description

    The expiration date of the pass.

Request

POST
/passes/url
curl -X POST https://api.walletapp.co/passes/url 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    'email': '<email>',
    'brand_id': '<brand_id>',
    'coupon_id': '<coupon_id>',
    'expiration_date': '<expiration_date>',
    'pass_title': '<pass_title>',
    'status': 'active'
}'

Response

{
    "success": true,
    "url": "my.walletapp.co/pass/<pass_code>"
}

POST/passes/scan/storecard

Modify points balance

This api allows you to modify the amount of points on a storecard.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    passes.get
    Type
    string
    Description

    The scope required to access this endpoint.

Body parameters

  • Name
    points
    Type
    integer|Required
    Description

    A postive or negative integer to add or subtract from the current balance.

  • Name
    brand_id
    Type
    string|Required
    Description

    The UUID of the brand.

  • Name
    pass_code
    Type
    string|Required
    Description

    The pass code of the pass to modify.

  • Name
    external_reference
    Type
    string
    Description

    The external reference of the transaction.

Request

POST
/passes/scan/storecard
curl -X POST https://api.walletapp.co/passes/scan/storecard 
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d "{
    'points': 1,
    'brand_id': '<brand_id>',
    'pass_code': '<pass_code>',
    'external_reference': '<external_reference>'
}"

Response

{
    "success": true,
    "message": "Pass updated",
    "transaction_id": "<transaction uuid>"
}