Shops

All shops an be activated as a webshop, webshops come in 2 flavors, quickhops and normal shops, quickshops are webshops without the extra UI elements like filter, also quickshops do not have a cart. They are ideal to iframe into a website. Normal webshops have all shops features that you expect from a full fledged webshop.

The shop model

The sponsoroffer model contains the information about an offer itself. The following properties are available:

Properties

  • Name
    name
    Type
    string
    Description

    The name of the brand.

  • Name
    identifier
    Type
    string
    Description

    Unique identifier for the brand.

  • Name
    logo
    Type
    string|url
    Description

    A valid url to the logo of the brand.

  • Name
    quickshop
    Type
    boolean
    Description

    whether the brand is a quickshop or not.

  • Name
    webshop
    Type
    boolean
    Description

    whether the brand is a webshop or not.

  • Name
    primary_color
    Type
    string
    Description

    The primary color of the brand.

  • Name
    second_color
    Type
    string
    Description

    The secondary color of the brand.

  • Name
    third_color
    Type
    string
    Description

    An third color mainly used for styling buttons.

  • Name
    organization
    Type
    object
    Description

    An object containing the organization the brand belongs to, contains: ['name', 'identifier'].


GET/shops

List all shops

This endpoint return a list of all the shops that have been activated as either a webshop or a quickshop.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.get
    Type
    string
    Description

    The scope required to access this endpoint.

Request

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

Response

{
    "message": "Request successful", ,
    "data": [
        {
            "name": "<brand_name>",
            "logo": "<logo_url>",
            "identifier": "<identifier>",
            "quickshop": true,
            "webshop": true,
            "primary_color": "#ffffff",
            "second_color": "#000000",
            "third_color": "#000000",
            "organization": {
                "name": "<organization_name>",
                "identifier": "<organization_id>"
            }
        },
        ...
    ],
}

GET/shops/:identifier

Inspect a shop

The endpoint allows you to fetch a single shop by its identifier.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The id of the brand you want to inspect.

Request

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

Response

{
  "message": "Request successful", ,
  "data": {
      "identifier": "<brand_id>",
      "name": "<brand_name>",
      "enable_quick_shop": 1,
      "webshop": 1,
      "logo": "<brand_logo>",
      "webshop_primary_color": "#ff0000",
      "webshop_secondary_color": "#ff0000",
      "webshop_button_color": "#ff0000",
      "contact_phone": "+31612341234",
      "contact_email": "dev@example.com",
      "facebook": true,
      "instagram": true,
      "linkedin": true,
      "facebook_url": "https://facebook.com",
      "instagram_url": "https://instagram.com",
      "linkedin_url": "https://linkedin.com",
      "site": true,
      "website_url": "https://walletapp.co",
      "domain_settings": "https://api.walletapp.co/shops/:identifier/domains",
      "payment_settings": "https://api.walletapp.co/shops/:identifier/payments"
  }
}

PUT/shops/:identifier

Update a shop

The endpoint allows you to modify a brand

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The id of the brand you want to update.

Request body

  • Name
    webshop_primary_color
    Type
    string
    Description

    The primary color of the webshop.

  • Name
    webshop_secondary_color
    Type
    string
    Description

    The secondary color on the webshop.

  • Name
    webshop_button_color
    Type
    string
    Description

    The color of the buttons on the webshop.

  • Name
    contact_email
    Type
    string
    Description

    A contact email adres for support

  • Name
    contact_phone
    Type
    string
    Description

    A contact phone number for support.

  • Name
    facebook
    Type
    boolean
    Description

    whether or not to show the facebook button on the webshop.

  • Name
    instagram
    Type
    boolean
    Description

    whether or not to show the instagram button on the webshop.

  • Name
    linkedin
    Type
    boolean
    Description

    whether or not to show the linkedin button on the webshop.

  • Name
    site
    Type
    boolean
    Description

    whether or not to show the website button on the webshop.

  • Name
    facebook_url
    Type
    string
    Description

    The url to the facebook page.

  • Name
    instagram_url
    Type
    string
    Description

    The url to the instagram page.

  • Name
    linkedin_url
    Type
    string
    Description

    The url to the linkedin page.

  • Name
    website_url
    Type
    string
    Description

    The url to the website.

Request

PUT
/shops/:identifier
curl -X PUT https://api.walletapp.co/shops/:identifier
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
-d '{
    "webshop_primary_color":"#ff0000",
    "webshop_secondary_color":"#ff0000",
    "webshop_button_color":"#ff0000",
    "contact_phone":"+31612341234",
    "contact_email":"dev@example.com",
    "facebook": true,
    "instagram": true,
    "linkedin": true,
    "site": true,
    "facebook_url":"https://facebook.com",
    "instagram_url":"https://instagram.com",
    "linkedin_url":"https://linkedin.com",
    "website_url":"https://walletapp.co"
}'

Response

{
  "message": "Request successful", ,
  "data": {
      "identifier": "<brand_id>",
      "name": "<brand_name>",
      "enable_quick_shop": 1,
      "webshop": 1,
      "logo": "<brand_logo>",
      "webshop_primary_color": "#ff0000",
      "webshop_secondary_color": "#ff0000",
      "webshop_button_color": "#ff0000",
      "contact_phone": "+31612341234",
      "contact_email": "dev@example.com",
      "facebook": true,
      "instagram": true,
      "linkedin": true,
      "facebook_url": "https://facebook.com",
      "instagram_url": "https://instagram.com",
      "linkedin_url": "https://linkedin.com",
      "site": true,
      "website_url": "https://walletapp.co"
  }
}

PATCH/shops/:identifier/quickshop

Enable a quickshop

This endpoint enables a brand to be configured as a quickshop.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the brand.

Request

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

Response

{
    "message": "Request successful", , 
    "data": "Quickshop has been enabled"
}

DELETE/shops/:identifier/quickshop

Disable a quickshop

This endpoint disables a brand to be configured as a quickshop.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the brand.

Request

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

Response

{
    "message": "Request successful", , 
    "data": "Quickshop has been disabled"
}

PATCH/shops/:identifier/webshop

Enable a webshop

This endpoint enables a brand to be configured as a webshop.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the brand.

Request

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

Response

{
    "message": "Request successful", , 
    "data": "Webshop has been enabled"
}

DELETE/shops/:identifier/webshop

Disable a webshop

This endpoint disables a brand to be configured as a webshop.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.update
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifier of the brand.

Request

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

Response

{
    "message": "Request successful", , 
    "data": "Webshop has been disabled"
}