Leads

Leads are the one of the main ways people can sign up to your brands, and are the first step in the customer journey. You can use the leads endpoint to manage leads programmatically.

The lead model

The lead model contains info about its current configuration.

Properties

  • Name
    identifier
    Type
    string
    Description

    Unique identifier for the brand.

  • Name
    mail
    Type
    object
    Description

    The mail template that is attached to the lead, contains: ["identifier", "title"]

  • Name
    coupon
    Type
    object
    Description

    The coupon that is attached to the lead, contains: ["identifier", "title"]

  • Name
    storecard
    Type
    object
    Description

    The storecard that is attached to the lead, contains: ["identifier", "title"]

  • Name
    brand
    Type
    object
    Description

    The brand that is attached to the lead, contains: ["identifier", "name"]

  • Name
    short_name
    Type
    string
    Description

    The short name provided for the lead. is the part after the / in the url.

  • Name
    title
    Type
    string
    Description

    The title of the lead.

  • Name
    sub_title
    Type
    string
    Description

    The subtitle of the lead.

  • Name
    primary_color
    Type
    string
    Description

    A Hexa decimal color code for the primary color of the lead.

  • Name
    secondary_color
    Type
    string
    Description

    A Hexa decimal color code for the secondary color of the lead.

  • Name
    third_color
    Type
    string
    Description

    A Hexa decimal color code for the accent colors of the lead.

  • Name
    ask_phone
    Type
    boolean
    Description

    whether or not to ask for a members phone number.

  • Name
    ask_licenseplate
    Type
    boolean
    Description

    whether or not to ask for a members licenseplate number.

  • Name
    ask_pass_id
    Type
    boolean
    Description

    whether or not to ask for a pass code that the member wants to use.

  • Name
    ask_birthday
    Type
    boolean
    Description

    whether or not to ask for a members birthday.

  • Name
    iframe
    Type
    boolean
    Description

    whether or not the lead should be in iframe mode. Removes all access styling. Makes it better integratable in other websites.


GET/leads

Get a list of leads

This endpoint returns a list of leads.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    leads.delete
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the lead.

Request

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

Response

{
    "message": "Request successful",
    "data": [
        {
            "identifier": "<UUID>",
            "mail": {
                "identifier": "<UUID>",
                "title": "<title>"
            },
            "brand": {
                "name": "<brand_name>",
                "identifier": "<brand_identifier>"
            },
            "redirect_url": "https://www.google.com",
            "short_name": "<short_name>",
            "title": "<title>",
            "sub_title": "<subtitle>",
            "primary_color": "#ffffff",
            "secondary_color": "#ff0000",
            "third_color": "#ffffff",
            "ask_phone": 0,
            "ask_licenseplate": 0,
            "ask_pass_id": 0,
            "ask_birthday": 0,
            "iframe": 0,
            "coupon": {
                "identifier": "<UUID>",
                "title": "<product_title>"
            },
            "storecard": {
                "identifier": "<UUID>",
                "title": "<product_title>"
            }
        },
        ...
    ]
}

POST/leads

Store a lead

This endpoint is used to create a new lead.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    leads.store
    Type
    string
    Description

    The scope required to access this endpoint.

Request body

  • Name
    brand_id
    Type
    string|Required
    Description

    The brand identifier.

  • Name
    short_name
    Type
    string|Required
    Description

    The short name of the landing page.

  • Name
    title
    Type
    string|Required
    Description

    The title of the landing page.

  • Name
    sub_title
    Type
    string|Required
    Description

    The sub title of the landing page.

  • Name
    primary_color
    Type
    string|Required
    Description

    A hex color code.

  • Name
    secondary_color
    Type
    string|Required
    Description

    A hex color code.

  • Name
    third_color
    Type
    string|Required
    Description

    A hex color code.

  • Name
    ask_phone
    Type
    boolean|Required
    Description

    Whether or not to ask for the phone number.

  • Name
    ask_licenseplate
    Type
    boolean|Required
    Description

    Whether or not to ask for the license plate.

  • Name
    ask_postcode
    Type
    boolean|Required
    Description

    Whether or not to ask for the postcode.

  • Name
    iframe
    Type
    boolean|Required
    Description

    Whether or not to use an iframe.

  • Name
    ask_pass_id
    Type
    boolean|Required
    Description

    whether or not to ask for a pass code.

  • Name
    ask_birthday
    Type
    boolean
    Description

    Whether or not to ask for the birthday.

  • Name
    storecard_id
    Type
    string
    Description

    The storecard identifier.

  • Name
    coupon_id
    Type
    string
    Description

    The coupon identifier.

  • Name
    mail_id
    Type
    string
    Description

    The mail identifier.

  • Name
    redirect_url
    Type
    string|url
    Description

    The redirect url.

Request

POST
/leads
curl -X POST https://api.walletapp.co/leads
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "brand_id":"<brand_id>",
    "short_name":"<short_name>",
    "title":"<title>",
    "sub_title":"<subtitle>",
    "storecard_id":"<storecard_id>",
    "coupon_id":"<coupon_id>",
    "mail_id": "<mail_id>",
    "primary_color":"#ff00ff",
    "secondary_color":"#ff0000",
    "third_color":"#0000ff",
    "ask_phone": 1,
    "ask_licenseplate": 1,
    "ask_postcode": 1,
    "ask_pass_id": 1,
    "ask_birthday": 1,
    "iframe": 1,
    "redirect_url":"https://wwww.google.com"
}'

Response

{
     "message": "Request succesful",
    "message": "Lead created"
}

GET/leads/:identifier

Fetch a lead

Fetch a specific lead.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    leads.get
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the lead.

Request

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

Response

{
    "message": "Request successful",
    "data": {
        "identifier": "<UUID>",
        "mail": {
            "identifier": "<UUID>",
            "title": "<title>"
        },
        "redirect_url": "https://www.google.com",
        "short_name": "<short_name>",
        "title": "<title>",
        "sub_title": "<subtitle>",
        "primary_color": "#ffffff",
        "secondary_color": "#ff0000",
        "third_color": "#ffffff",
        "ask_phone": 0,
        "ask_licenseplate": 0,
        "ask_pass_id": 0,
        "ask_birthday": 0,
        "iframe": 0,
        "coupon": {
            "identifier": "<UUID>",
            "title": "<product_title>"
        },
        "storecard": {
            "identifier": "<UUID>",
            "title": "<product_title>"
        },
            "brand": {
            "name": "<brand_name>",
            "identifier": "<brand_identifier>"
        },
    }
}

PUT/leads/:identifier

Update a lead

This endpoint is used to update a lead.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    leads.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the lead you want to edit.

Request body

  • Name
    short_name
    Type
    string
    Description

    The short name of the landing page.

  • Name
    title
    Type
    string
    Description

    The title of the landing page.

  • Name
    sub_title
    Type
    string
    Description

    The sub title of the landing page.

  • Name
    primary_color
    Type
    string
    Description

    A hex color code.

  • Name
    secondary_color
    Type
    string
    Description

    A hex color code.

  • Name
    third_color
    Type
    string
    Description

    A hex color code.

  • Name
    ask_phone
    Type
    boolean
    Description

    Whether or not to ask for the phone number.

  • Name
    ask_licenseplate
    Type
    boolean
    Description

    Whether or not to ask for the license plate.

  • Name
    ask_postcode
    Type
    boolean
    Description

    Whether or not to ask for the postcode.

  • Name
    iframe
    Type
    boolean
    Description

    Whether or not to use an iframe.

  • Name
    ask_pass_id
    Type
    boolean
    Description

    whether or not to ask for a pass code.

  • Name
    ask_birthday
    Type
    boolean
    Description

    Whether or not to ask for the birthday.

  • Name
    storecard_id
    Type
    string
    Description

    The storecard identifier.

  • Name
    coupon_id
    Type
    string
    Description

    The coupon identifier.

  • Name
    mail_id
    Type
    string
    Description

    The mail identifier.

  • Name
    redirect_url
    Type
    string|url
    Description

    The redirect url.

Request

PUT
/leads/:identifier
curl -X PUT https://api.walletapp.co/leads/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "short_name":"<short_name>",
    "title":"<title>",
    "sub_title":"<subtitle>",
    "storecard_id":"<storecard_id>",
    "coupon_id":"<coupon_id>",
    "mail_id": "<mail_id>",
    "primary_color":"#ff00ff",
    "secondary_color":"#ff0000",
    "third_color":"#0000ff",
    "ask_phone": 1,
    "ask_licenseplate": 1,
    "ask_postcode": 1,
    "ask_pass_id": 1,
    "ask_birthday": 1,
    "iframe": 1,
    "redirect_url":"https://wwww.google.com"
}'

Response

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

DELETE/leads/:identifier

Archive a lead

Archive a specific lead.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    leads.delete
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the lead.

Request

DELETE
/leads/:identifier
curl -X DELETE https://api.walletapp.co/leads/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

{
    "message": "Request successful", 
    "data": "Lead deleted"
}