Bulk endpoints

We provide multiple APIS to perform massive bulk operations on your data. This is usefull for when you want to create massive amounts of coupons, update storecards with new saldos or import members to brands.

Note

Their are multiple endpoints where we cannot delivery synchronous responses. This is due to the fact that we have to process the data in the background. This means that you will receive a 200 Accepted response. This means that the request is being processed and you will receive a response when the request is done. This can take a while depending on the amount of data you are trying to process. We will notify your backend with a http POST request. You can provide a webhook_url for these requests where you want to be notified. The webhook call will always be formatted like the following:

Succes webhook

{
    "status": "success",
    "batch_id": "<batch_id>",
    "link": "<link_where_results_can_be_fetched>"
}

or

Failed webhook

{
    "status": "failed",
    "batch_id": "<batch_id>",
    "error": "<error_message>"
}

The link provided in the webhook will be the correctly formatted link to fetch the results of the batch. This are the same as the status calls for a specific batch type.


POST/bulk/coupons

Bulk coupon create

This endpoint allows you to create coupon passes in bulk, the status page will contain the download urls for the created passes once finished.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    coupons.store
    Type
    string
    Description

    The scope required to access this endpoint.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    coupon_id
    Type
    string|Required
    Description

    The identifier of the coupon that needs to be used for this request.

  • Name
    webhook_url
    Type
    string|Required
    Description

    The endpoint where you want to be notified when the batch is finished.

  • Name
    users
    Type
    array|Required
    Description

    The users for whom you want to create a coupon pass. contains the following properties: [identifier, qr_code, expiration_date, pass_title]

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The user identifier for whom you want to create a coupon pass.

  • Name
    users.*.qr_code
    Type
    string|Optional
    Description

    The qr code that needs to be used for this coupon pass.

  • Name
    users.*.expiration_date
    Type
    date|Optional
    Description

    The expiration date for this coupon pass.

  • Name
    users.*.pass_title
    Type
    string|Optional
    Description

    The title for this coupon pass.

Request

POST
/bulk/coupons
curl -X POST https://api.walletapp.co/bulk/coupons
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "coupon_id": "<coupon_id>", 
    "webhook_url":"<your_endpoints>",
    "users": [
        {
            "identifier": "<member_id>",
            "qr_code": "<qr_code>",
            "expiration_date": "<expiration_date>",
            "pass_title": "<custom_tilte>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": {
        "webhook_url": "<your_endpoint>",
        "batch_id": "<unique_batch_id>",
        "queued": [
            "<member_id>"
        ],
        "not_found": [
            "<member_id>"
        ]
    }
}

GET/webhooks/coupons/:id

Bulk coupon status

This is the status page where you can check the status of a bulk request manually. We will also provide the results on this page.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    coupons.get
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameter

  • Name
    batch_id
    Type
    string|Required
    Description

    The unique batch_id that was provided in the response of the bulk request.

Request

GET
/webhooks/coupons/:batch_id
curl -X GET https://api.walletapp.co/webhooks/coupons/:batch_id
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

    {
    "message": "Request successful",
    "data": {
        "requested_at": "<request_date>",
        "started_processing_at": "<timestamp>",
        "finished_processing_at": "<timestamp>",
        "status": "<status>",
        "passes": [
            {
                "qr_code": "<qr_code>",
                "walletapp_code": "<walletapp_id>",
                "identifier": "<member_id>",
                "download_link": "<download_page_link>"
            }
        ]
    }
}

POST/bulk/storecards

Bulk storecard create

This endpoint allows you to create storecard passes in bulk, the status page will contain the download urls for the created passes once finished.

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.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    storecard_id
    Type
    string|Required
    Description

    The identifier of the storecard that needs to be used for this request.

  • Name
    webhook_url
    Type
    string|Required
    Description

    The endpoint where you want to be notified when the batch is finished.

  • Name
    users
    Type
    array|Required
    Description

    The users for whom you want to create a storecard pass. contains the following properties: [identifier, qr_code, pass_title]

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The user identifier for whom you want to create a storecard pass.

  • Name
    users.*.qr_code
    Type
    string|Optional
    Description

    The qr code that needs to be used for this storecard pass.

  • Name
    users.*.pass_title
    Type
    string|Optional
    Description

    The title for this storecard pass.

Request

POST
/bulk/storecards
curl -X POST https://api.walletapp.co/bulk/storecards
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "storecard_id": "<storecard_id>", 
    "webhook_url":"<your_endpoints>",
    "users": [
        {
            "identifier": "<member_id>",
            "qr_code": "<qr_code>",
            "pass_title": "<custom_tilte>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": {
        "webhook_url": "<your_endpoint>",
        "batch_id": "<unique_batch_id>",
        "queued": [
            "<member_id>"
        ],
        "not_found": [
            "<member_id>"
        ]
    }
}

GET/webhooks/storecards/:id

Bulk storecard status

This is the status page where you can check the status of a bulk request manually. We will also provide the results on this page.

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 parameter

  • Name
    batch_id
    Type
    string|Required
    Description

    The unique batch_id that was provided in the response of the bulk request.

Request

GET
/webhooks/storecards/:batch_id
curl -X GET https://api.walletapp.co/webhooks/storecards/:batch_id
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

    {
    "message": "Request successful",
    "data": {
        "requested_at": "<request_date>",
        "started_processing_at": "<timestamp>",
        "finished_processing_at": "<timestamp>",
        "status": "<status>",
        "passes": [
            {
                "qr_code": "<qr_code>",
                "walletapp_code": "<walletapp_id>",
                "identifier": "<member_id>",
                "download_link": "<download_page_link>"
            }
        ]
    }
}

POST/bulk/points

Bulk points update

This endpoint allows you to update the points on passes in bulk, the status page will contain the download urls for the updated passes once finished.

Note

This endpoint will update the points on the pass. If the qr_code is left empty we will update the first storecard that matches the member identifier for the specific brand. If the user does not have storecard, this call will not create one.

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.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    storecard_id
    Type
    string|Required
    Description

    The identifier of the storecard that needs to be used for this request.

  • Name
    webhook_url
    Type
    string|Required
    Description

    The endpoint where you want to be notified when the batch is finished.

  • Name
    users
    Type
    array|Required
    Description

    The users for whom you want to create a storecard pass. contains the following properties: [identifier, qr_code, points]

  • Name
    users.*.points
    Type
    string|Required
    Description

    The amount of points to add or subtract from the pass.

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The user identifier for whom you want to create a storecard pass.

  • Name
    users.*.qr_code
    Type
    string|Optional
    Description

    The qr code that needs to be used for this storecard pass.

Request

POST
/bulk/points
curl -X POST https://api.walletapp.co/bulk/points
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "storecard_id": "<storecard_id>", 
    "webhook_url":"<your_endpoints>",
    "users": [
        {
            "identifier": "<member_id>",
            "qr_code": "<qr_code>",
            "points": "<points>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": {
        "webhook_url": "<your_endpoint>",
        "batch_id": "<unique_batch_id>",
        "queued": [
            "<member_id>"
        ],
        "not_found": [
            "<member_id>"
        ]
    }
}

GET/webhooks/points/:id

Bulk points update status

This is the status page where you can check the status of a bulk request manually. We will also provide the results on this page.

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 parameter

  • Name
    batch_id
    Type
    string|Required
    Description

    The unique batch_id that was provided in the response of the bulk request.

Request

GET
/webhooks/points/:batch_id
curl -X GET https://api.walletapp.co/webhooks/points/:batch_id
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

    {
    "message": "Request successful",
    "data": {
        "requested_at": "<request_date>",
        "started_processing_at": "<timestamp>",
        "finished_processing_at": "<timestamp>",
        "status": "<status>",
        "passes": [
            {
                "qr_code": "<qr_code>",
                "walletapp_code": "<walletapp_id>",
                "identifier": "<member_id>",
                "download_link": "<download_page_link>"
            }
        ]
    }
}

POST/bulk/signups

Bulk signup members

This endpoint will alllow you to signup members in bulk for a specific brand.

Note

This endpoint performs a signup event. Member data will not be updated using this call. Only if a member is create for the first time in the Wallet App eco-system the provided first_name an last_name will applied.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    members.store
    Type
    string
    Description

    The scope required to access this endpoint.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    users
    Type
    array|Required
    Description

    The user you want to signup, the array should contain objects with the following keys: [identifier, first_name, last_name, email, unsubscribed]

  • Name
    users.*.email
    Type
    string|Required
    Description

    The members email address.

  • Name
    users.*.first_name
    Type
    string|Optional
    Description

    The members first name.

  • Name
    users.*.last_name
    Type
    string|Optional
    Description

    The members last name.

  • Name
    users.*.unsubscribed
    Type
    boolean|Optional
    Description

    Whether or not the member is unsubscribed for marketing mailings. provide false if you want to send the member marketing mailings.

  • Name
    users.*.subscribed_at
    Type
    dateTime|Optional
    Description

    When to user first signed up. Provide a timestamp in the format YYYY-MM-DD HH:MM:SS.

Request

POST
/bulk/signups
curl -X POST https://api.walletapp.co/bulk/signups
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "users": [
        {
            "email": "<email>",
            "first_name": "<first_name>",
            "last_name": "<last_name>",
            "unsubscribed": "<unsubscribed>",
            "subscribed_at": "<timestamp>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": "Members imported"
}

PUT/bulk/members

Bulk member update

This endpoint will allow you to update the details of members in bulk.

Note

Note this endpoint will perform a update event. Member data will not be newly created using this call.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    members.store
    Type
    string
    Description

    The scope required to access this endpoint.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    users
    Type
    array|Required
    Description

    The user you want to update, the array can contain objects with the following keys: [identifier, first_name, last_name, phone_number, birth_day, street, house_number, postcode, city, country]

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The UUID of the member you want to update.

  • Name
    users.*.first_name
    Type
    string|Optional
    Description

    The members first name.

  • Name
    users.*.last_name
    Type
    string|Optional
    Description

    The members last name.

  • Name
    users.*.phone_number
    Type
    string|Optional
    Description

    The members phone number.

  • Name
    users.*.birth_day
    Type
    string|Optional
    Description

    The members birth day.

  • Name
    users.*.street
    Type
    string|Optional
    Description

    The members street name.

  • Name
    users.*.house_number
    Type
    string|Optional
    Description

    The members house number.

  • Name
    users.*.postcode
    Type
    string|Optional
    Description

    The members postcode.

  • Name
    users.*.city
    Type
    string|Optional
    Description

    The members city.

  • Name
    users.*.country
    Type
    string|Optional
    Description

    The members country.

Request

PUT
/bulk/members
curl -X PUT https://api.walletapp.co/bulk/members
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "users": [
        {
            "identifier": "<identifier>",
            "first_name": "<first_name>",
            "last_name": "<last_name>",
            "phone_number": "<phone_number>",
            "birth_day": "<birth_day>",
            "street": "<street>",
            "house_number": "<house_number>",
            "postcode": "<postcode>",
            "city": "<city>",
            "country": "<country>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": "Members updated"
}

POST/bulk/licenseplates

Bulk add Licenseplates

This endpoint will allow you to add Licenseplates in bulk to multiple users

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    lpr.store
    Type
    string
    Description

    The scope required to access this endpoint.

body parameters

  • Name
    users
    Type
    array|Required
    Description

    The users for whom you want to add licenseplates. contains the following properties: [identifier, licenseplates]

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The user identifier for whom you want to create a coupon pass.

  • Name
    users.*.licenseplates
    Type
    array|Optional
    Description

    Contains a list of licenseplates for this user.

Request

POST
/bulk/licenseplates
curl -X POST https://api.walletapp.co/bulk/licenseplates
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
      "users": [
        {
            "identifier": "<member_id>",
            "licenseplates":[
                "<licenseplates>"
            ],
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": "Licenseplates added"
}

POST/bulk/passes

Bulk updates and create passes

Allows the creation and update of passes with points and custom params.

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.

body parameters

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand id to get the members for.

  • Name
    storecard_id
    Type
    string|Required
    Description

    The UUID of the storecard that needs to be used.

  • Name
    users.*.identifier
    Type
    string|Required
    Description

    The Identifier of the user that needs to be used

  • Name
    users.*.points
    Type
    integer|Required
    Description

    The points of the pass. Can be negative or postive

  • Name
    users.*.pass_code
    Type
    string|Optional
    Description

    The qrcode of the pass

  • Name
    users.*.start_date
    Type
    boolean|Optional
    Description

    The start date on the pass

Request

POST
/bulk/signups
curl -X POST https://api.walletapp.co/bulk/signups
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id": "<brand_id>",
    "storecard_id": "<storecard_id>",
    "users": [
        {
            "identifier": "<member_id>",
            "points": "<integer>",
            "pass_code": "<qr_code>",
            "start_date": "<date>"
        }
    ]
}'

Response

{
    "message": "Request successful",
    "data": "Passes updated"
}