Documentation

 Back to top

PARTNERS API

Tapbuy provides plugins to sync with the main e-commerce platforms (Magento, Prestashop…). This documentation expose the API methods needed to sync Tapbuy e-commerce system with any custom e-commerce platforms.

Endpoint

https://{webservice-domain}/:api_endpoint

  • Technical information
    • supported protocol: https
    • exchange formats: json
    • encoding: UTF-8

Guides

Pagination

All top-level API resources have support for bulk fetches via “list” API methods. For instance you can list products or list customers. These list API methods share a common structure, taking at least these three parameters: limit, offset, and total.

  • Attributes

    • limit: 10 (number) - A limit on the number of items to be returned, between 1 and 100, default is 25.
    • offset: 0 (number) - The offset from the first item to list from.
    • total: 2 (number) - The total number of items that could be returned.
  • Pagination json format

    {
      "limit": 10,
      "offset": 0,
      "total": 2,
      "items":
        [
          {
            "id": 1,
            "description": "first item"
          },
          {
            "id": 2,
            "description": "second item"
          }
        ]
    }

Error

Use conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with Tapbuy servers (these are rare).

Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully (e.g., an order is declined), we return a 402 error code.

  • HTTP status code summary

    • 200 - OK: Everything worked as expected.
    • 400 - Bad Request: The request was unacceptable, often due to missing a required parameter.
    • 401 - Unauthorized: No valid API key provided.
    • 402 - Request: Failed The parameters were valid but the request failed.
    • 404 - Not Found: The requested resource doesn’t exist.
    • 409 - Conflict: The request conflicts with another request (perhaps due to using the same idempotent key).
    • 429 - Too Many Requests: Too many requests hit the API too quickly.
    • 500, 502, 503, 504 - Server Errors: Something went wrong on Tapbuy end.
  • Tapbuy error code summary

    • XXX - A Webservice status code
  • Tapbuy error json format

    {
      "code": 100,
      "message": "Connection error, the server is not responding.",
      "errors":
        [
          {
            "code": 1,
            "message": "An error occured"
          }
        ]
    }
  • Handling errors

    Our API libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.

Authentication

The retailer API must use OAuth to authorize Tapbuy to access to their API. Provide us client_id and client_secret.

Tokens

Get an Access Token
POST/oauth/token

Returns an access_token which is passed along as a header with all future requests to authenticate the user. You must provide the Authorization: Basic {access_token} or Authorization: Bearer {access_token} header in all other requests. All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Tapbuy clients who want to use the API must get an access_token with the following grant_type:

  • client_credentials: (string) - gets an access_token for a Basic Authorization

  • password: (string) - gets an access_token for an Authorization with a Bearer access_token, optional attributes email/password are needed to get a Bearer access_token

  • refresh_token: (string) - provide a refresh_token to renew a Bearer access_token

The client_id and client_secret provided to Tapbuy will be used to build a basic_auth_header:

basic_auth_header = "Authorization: Basic " + Base64.encode(client_id + “:” client_secret)

Example URI

POST https://webservice.any/oauth/token
Request
HideShow
Headers
Authorization: Basic {basic_auth_header}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "abc123",
  "token_type": "bearer",
  "expires_in": 7776000,
  "created_at": 1457385291,
  "refresh_token": "cba321"
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "meta": {},
  "errors": [
    {
      "status": 422,
      "code": "invalid_credentials",
      "title": "Invalid credentials"
    }
  ]
}

Products

Resources to describe real or digital goods.

Product list

Product list
GET/products

Retrieves a list of Product objects.

Example URI

GET https://webservice.any/products
URI Parameters
HideShow
limit
number (optional) 
offset
number (optional) 
filters
array (optional) Example: id_product[]=123

To get only specific products, filters must include pagination parameters (limit, offset)

Request
HideShow
Headers
Authorization: Basic {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Stock information

Stock information
GET/products/:id/stock

Returns stock unit available.

Example URI

GET https://webservice.any/products/:id/stock
URI Parameters
HideShow
id
string (required) Example: AB12

The product identifier (id, url hash, …)

combination_id
string (optional) Example: 23

Product combination id

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "stock": 100
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "stock": {
      "type": "number",
      "description": "Available in stock"
    }
  }
}

Similar products

Similar products
GET/products/:id/similar

(Optionnal METHOD) Returns product information (title, price, image, attributes…).

Example URI

GET https://webservice.any/products/:id/similar
URI Parameters
HideShow
id
string (required) Example: AB12

The product identifier (id, url hash, …)

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Product import

Product import
GET/products/import

Launches a full products import for the authentificated retailer. Import specific product references using the optional parameter “references”, use a coma separator to import several references at once.

Example URI

GET https://webservice.any/products/import
URI Parameters
HideShow
references
string (optional) Example: PQDF1234,PQDF1235
Request
HideShow
Headers
Authorization: Basic {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true
}

Customers

Create customer

Create customer
POST/customers

Create a customer and returns customer data.

Example URI

POST https://webservice.any/customers
URI Parameters
HideShow
email
string (required) Example: elon@teslamotors.com
firstname
string (required) Example: elon
lastname
string (required) Example: musk
gender
string (optional) Example: m
password
string (optional) Example: vivaeads
address1
string (required) Example: `19 Bd Poissoniere
address2
string (optional) Example: WAI BNP Paribas
post_code
string (required) Example: 75002
iso_code
string (required) Example: FR
phone_number
number (required) Example: 0623456789
billing_address1
string (optional) Example: `19 Bd Poissoniere
billing_address2
string (optional) Example: WAI BNP Paribas
billing_post_code
string (optional) Example: 75002
billing_iso_code
string (optional) Example: FRA
billing_phone_number
number (optional) Example: `0623456789`,
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "abc123",
  "email": "elon@teslamotors.com",
  "firstname": "Elon",
  "lastname": "Musk",
  "phone": 623456789,
  "shipping_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "billing_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Customer identifier"
    },
    "email": {
      "type": "string",
      "description": "The email of the customer"
    },
    "firstname": {
      "type": "string",
      "description": "The firstname of the customer"
    },
    "lastname": {
      "type": "string",
      "description": "The lastname of the customer"
    },
    "phone": {
      "type": "number",
      "description": "Phone number"
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The main address of the customer"
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The billing address of the customer (if different than shipping)"
    }
  },
  "required": [
    "id",
    "email",
    "firstname",
    "lastname",
    "phone"
  ]
}

Edit customer

Edit customer
PUT/customers/:id

Edit customer information nd returns customer data.

Example URI

PUT https://webservice.any/customers/:id
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "abc123",
  "email": "elon@teslamotors.com",
  "firstname": "Elon",
  "lastname": "Musk",
  "phone": 623456789,
  "shipping_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "billing_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Customer identifier"
    },
    "email": {
      "type": "string",
      "description": "The email of the customer"
    },
    "firstname": {
      "type": "string",
      "description": "The firstname of the customer"
    },
    "lastname": {
      "type": "string",
      "description": "The lastname of the customer"
    },
    "phone": {
      "type": "number",
      "description": "Phone number"
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The main address of the customer"
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The billing address of the customer (if different than shipping)"
    }
  },
  "required": [
    "id",
    "email",
    "firstname",
    "lastname",
    "phone"
  ]
}

Forgotten password

Forgotten password
POST/customer/:id/forgotten-password

Initiate the forgotten password process (send the email to customer)

Example URI

POST https://webservice.any/customer/:id/forgotten-password
Request
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true
}

Log customer

Log customer
GET/customers/login

Logs the customer in, updates the access_token grant_type and retrieves customer data.

Example URI

GET https://webservice.any/customers/login
Request
HideShow
Headers
Authorization: Basic {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "abc123",
  "email": "elon@teslamotors.com",
  "firstname": "Elon",
  "lastname": "Musk",
  "phone": 623456789,
  "shipping_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "billing_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "access_token": "abc123",
  "token_type": "bearer",
  "expired_in": 7776000,
  "created_at": 1457385291,
  "refresh_token": "cba321"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Customer identifier"
    },
    "email": {
      "type": "string",
      "description": "The email of the customer"
    },
    "firstname": {
      "type": "string",
      "description": "The firstname of the customer"
    },
    "lastname": {
      "type": "string",
      "description": "The lastname of the customer"
    },
    "phone": {
      "type": "number",
      "description": "Phone number"
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The main address of the customer"
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The billing address of the customer (if different than shipping)"
    },
    "access_token": {
      "type": "string"
    },
    "token_type": {
      "type": "string"
    },
    "expired_in": {
      "type": "number"
    },
    "created_at": {
      "type": "number"
    },
    "refresh_token": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "email",
    "firstname",
    "lastname",
    "phone"
  ]
}

Retrieve customer

Retrieve customer
GET/customers/:id

Retrieve customer data.

Example URI

GET https://webservice.any/customers/:id
URI Parameters
HideShow
id
string (optional) Example: abc123

The customer identifier

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "abc123",
  "email": "elon@teslamotors.com",
  "firstname": "Elon",
  "lastname": "Musk",
  "phone": 623456789,
  "shipping_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "billing_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Customer identifier"
    },
    "email": {
      "type": "string",
      "description": "The email of the customer"
    },
    "firstname": {
      "type": "string",
      "description": "The firstname of the customer"
    },
    "lastname": {
      "type": "string",
      "description": "The lastname of the customer"
    },
    "phone": {
      "type": "number",
      "description": "Phone number"
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The main address of the customer"
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The billing address of the customer (if different than shipping)"
    }
  },
  "required": [
    "id",
    "email",
    "firstname",
    "lastname",
    "phone"
  ]
}

Email autocompletion

Email autocompletion
GET/customers/email-autocompletion

Returns customer email addresses matching the string passed (search within retailer customers members).

Example URI

GET https://webservice.any/customers/email-autocompletion
URI Parameters
HideShow
email
string (optional) Example: elon@t

The customer email address (even if incomplete)

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": "abc123",
      "email": "elon@teslamotors.com",
      "firstname": "Elon"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Get customer addresses

Get customer addresses
GET/customers/:id/addresses

Returns customer addresses.

Example URI

GET https://webservice.any/customers/:id/addresses
URI Parameters
HideShow
id
number (optional) Example: 11

Customer id

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Update customer address

Update customer address
PUT/customers/:id/addresses/:id_address

Update given customer address.

Example URI

PUT https://webservice.any/customers/:id/addresses/:id_address
URI Parameters
HideShow
id_address
number (required) Example: 22

Address id

id
number (required) Example: 11

Customer id

address1
string (required) Example: 10 rue de Paris

Address address1

address2
string (optional) Example: batiment B

Address address2

firstname
string (required) Example: Jean

Address firstname

lastname
string (required) Example: Valjean

Address lastname

post_code
string (required) Example: 75000

Address postcode

city
string (required) Example: Paris

Address city

phone_number
string (required) Example: +33699887744

Address phone

iso_code: `FR` (string) - Country iso_code
string (required) 
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
Add given customer address
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json

Checkout

Carriers

Carriers
GET/cart/:id/carriers

Get available carrier list for a given cart

Example URI

GET https://webservice.any/cart/:id/carriers
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "ups",
  "name": "UPS",
  "delay": "2 days",
  "ranges": [
    {
      "id": 12,
      "type": "price",
      "delimiter1": 0,
      "delimiter2": 500,
      "price": 5,
      "tax_rate": 20,
      "zones": [
        {
          "id": 3,
          "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
          "name": "France"
        }
      ]
    }
  ],
  "free_delivery": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Carrier identifier"
    },
    "name": {
      "type": "string",
      "description": "Carrier name"
    },
    "delay": {
      "type": "string",
      "description": "Average delivery delay"
    },
    "ranges": {
      "type": "array",
      "description": "Carrier ranges"
    },
    "free_delivery": {
      "type": "boolean",
      "description": "Carrier is free ?"
    }
  },
  "required": [
    "id",
    "name",
    "delay",
    "ranges",
    "free_delivery"
  ]
}

Find a point of sale

Find a point of sale
GET/point-of-sale

Get nearest point of sale (in distance), or retrieve all point of sales.

Example URI

GET https://webservice.any/point-of-sale
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": 3,
      "name": "Super store",
      "address": {
        "id": 0,
        "firstname": "elon",
        "lastname": "musk",
        "company": "musk",
        "address1": "1, infinite loop steet",
        "address2": "``",
        "post_code": "75002",
        "city": "Paris",
        "iso_code": "FR",
        "phone_number": 623456789,
        "delivery_instruction": "go to first floor"
      },
      "lat": "1.23",
      "lng": "1.23",
      "post_code": "75018",
      "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
      "hours": {
        "monday": "09:00 - 18:00",
        "tuesday": "09:00 - 18:00",
        "wednesday": "09:00 - 18:00",
        "thursday": "09:00 - 18:00",
        "friday": "09:00 - 18:00",
        "saturday": "09:00 - 18:00",
        "sunday": "09:00 - 18:00"
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Cart vouchers

Cart vouchers
GET/vouchers

Get a list of available vouchers.

Example URI

GET https://webservice.any/vouchers
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Payment option list

Payment option list
GET/payment-options

Get a list of available payment methods for the retailer.

Example URI

GET https://webservice.any/payment-options
Request
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "items": [
    {
      "type": "paypal",
      "credit_card_datas": {
        "bank_name": "Société générale",
        "bank_iban": "FRKK BBBB BGGG GGCC CCCC CCCC CLL",
        "bank_swift": "FRJIKOLOMP",
        "pspid": "mypspid",
        "signature": "HDJSDS456456464SDS",
        "signature_encrypr": "SHA1"
      },
      "paypal_datas": {
        "mode": "live",
        "username": "paypal-elonmusk@tesla.io",
        "password": "SQSFS54DDAA",
        "signature": "AAKKDSLDKSLDSDS444DSSDSDSDSDS"
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "items": {
      "type": "array"
    }
  }
}

Orders

Create an order

Create an order
POST/order

Create an order returns order data. This method must check product availability and price accuracy.

Example URI

POST https://webservice.any/order
URI Parameters
HideShow
products
Product (required) 
delivery_address
CustomerAddress (required) 
billing_address: (CustomerAddress, optional) - If null, billing_address is delivery_address
string (required) 
shipping_method
string (required) Example: ups
shipping_option
string (optional) Example: 1

shipping option id

payment_method
string (required) Example: `ogone`,
customer
Customer (required) 

Customer data to create the account

vouchers
array[Voucher] (required) 

Used vouchers

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json

Retrieve Order

Retrieve Order
GET/order/:id

Returns order data.

Example URI

GET https://webservice.any/order/:id
Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "abc123",
  "email": "elon@teslamotors.com",
  "shipping_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "billing_address": {
    "id": 0,
    "firstname": "elon",
    "lastname": "musk",
    "company": "musk",
    "address1": "1, infinite loop steet",
    "address2": "``",
    "post_code": "75002",
    "city": "Paris",
    "iso_code": "FR",
    "phone_number": 623456789,
    "delivery_instruction": "go to first floor"
  },
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Customer identifier"
    },
    "email": {
      "type": "string",
      "description": "The email of the customer"
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The main address of the customer"
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Address identifier"
        },
        "firstname": {
          "type": "string",
          "description": "Firstname"
        },
        "lastname": {
          "type": "string",
          "description": "Lastname"
        },
        "company": {
          "type": "string",
          "description": "Lastname"
        },
        "address1": {
          "type": "string",
          "description": "Address 1"
        },
        "address2": {
          "type": "string",
          "description": "Address 2"
        },
        "post_code": {
          "type": "string",
          "description": "Post code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "iso_code": {
          "type": "string",
          "description": "Country iso code"
        },
        "phone_number": {
          "type": "number",
          "description": "Phone number"
        },
        "delivery_instruction": {
          "type": "string",
          "description": "Delivery instruction"
        }
      },
      "required": [
        "id",
        "firstname",
        "lastname",
        "address1",
        "post_code",
        "city",
        "iso_code",
        "phone_number"
      ],
      "description": "The billing address of the customer (if different than shipping)"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ]
    },
    "products": {
      "type": "array",
      "description": "Ordered products"
    },
    "vouchers": {
      "type": "array",
      "description": "Used vouchers"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "Customer data to create the account"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "id",
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Get order status

Get order status
GET/order/:id/validation-status

Gets the status of an order. Use the order id from /cart/validate method.

Current available states are:

  • order_pending : the payment step is not complete yet

  • order_validated : same as order_pending

  • payment_processed : the payment is ok

  • retailer_error : an error occured from the retailer side

  • order_sent : the order items have been shipped

Example URI

GET https://webservice.any/order/:id/validation-status
URI Parameters
HideShow
id
number (required) Example: 123

Order id

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "order_status": "payment_processed"
}

Cart

Get cart detail

Get cart detail
GET/cart/:id

Gets the detailed information of current cart.

Example URI

GET https://webservice.any/cart/:id
URI Parameters
HideShow
id
number (optional) Example: 2455

Product id

Response  200
HideShow
Headers
Authorization: Bearer {access_token}
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Add product to cart

Add product to cart
POST/cart/:id/add-to-cart

Add product to cart on current customer’s cart

Example URI

POST https://webservice.any/cart/:id/add-to-cart
URI Parameters
HideShow
product_id
number (required) Example: 12

product id

combination_id
number (optional) Example: 12

combination id

quantity
number (optional) Example: 12

quantity to add

Request
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Update cart product quantity

Update cart product quantity
POST/cart/:id/update-product-quantity

Updates a product quantity in the current cart

Example URI

POST https://webservice.any/cart/:id/update-product-quantity
URI Parameters
HideShow
id
number (required) Example: 2455

Cart id

product_id
number (required) Example: 2455

Product id

combination_id
number (optional) Example: 3214

combination id

quantity
number (required) Example: 2

The new quantity for the product

Headers
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Remove a product from cart

Remove a product from cart
DELETE/cart/:id/remove-product/:product_id/:combination_id

Removes a product from a cart.

Example URI

DELETE https://webservice.any/cart/:id/remove-product/:product_id/:combination_id
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

product_id
number (required) Example: 34

Product id

combination_id
number (optional) Example: 44

combination id

Headers
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Select address for a Cart

Select address for a Cart
POST/cart/:id/select-address

Selects an address as billing / shipping / both for current cart, returns updated current cart.

Example URI

POST https://webservice.any/cart/:id/select-address
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

id_address
number (required) Example: 12

Address id

type
string (required) Example: billing

Address type

Headers
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Select carrier for a Cart

Select carrier for a Cart
POST/cart/:id/select-carrier

Selects carrier for current cart.

Example URI

POST https://webservice.any/cart/:id/select-carrier
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

carrier_id
number (required) Example: 67

Carrier id

Headers
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Select Point of Sales

Select Point of Sales
POST/cart/:id/select-points-of-sale

Selects store for current cart.

Example URI

POST https://webservice.any/cart/:id/select-points-of-sale
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

pos_id
number (required) Example: 10

Point of sale id

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Select relay

Select relay
POST/cart/:id/select-relay

Selects relay for current cart.

Example URI

POST https://webservice.any/cart/:id/select-relay
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

relay_id
string (required) Example: abc123

Relay id

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Add voucher to a cart

Add voucher to a cart
POST/cart/:id/add-voucher

Add a voucher to a cart.

Example URI

POST https://webservice.any/cart/:id/add-voucher
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

code
string (required) Example: DISCOUNT20

Voucher code

Request
string (required) 
Headers
string (required) 

Authorization: Bearer {access_token}

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Remove voucher

Remove voucher
DELETE/cart/:id/remove-voucher/:id_voucher

Removes a voucher from current cart

Example URI

DELETE https://webservice.any/cart/:id/remove-voucher/:id_voucher
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

id_voucher
number (required) Example: 10

Voucher id

Request  Logged in customer
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "guest_id": 1,
  "customer": {
    "id": "abc123",
    "email": "elon@teslamotors.com",
    "firstname": "Elon",
    "lastname": "Musk",
    "phone": 623456789,
    "shipping_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "billing_address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    }
  },
  "products": [
    {
      "id": "abc123",
      "name": "Awesome shirt",
      "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
      "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
      "category": "Fashion",
      "brand_name": "FashionShirt",
      "images": [
        {
          "url": "https://product.url/img.png"
        }
      ],
      "url": "https://product.url",
      "attributes_combination": [
        {
          "combination_id": 23,
          "attributes": [
            {
              "name": "color",
              "id": "blue",
              "display_name": "Blue",
              "values": [
                {
                  "id": "blue",
                  "display_name": "Blue",
                  "is_default": true
                }
              ]
            }
          ],
          "is_default": true,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "weight": 12,
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ]
        }
      ],
      "weight": 12,
      "price": 120,
      "quantity": 10,
      "reference": "Product Reference",
      "special_price": 100,
      "special_from_date": "2016-07-01 09:00:00",
      "special_to_date": "2016-07-08 23:59:59",
      "ean": 1234567891234,
      "tax_rate": 20
    }
  ],
  "vouchers": [
    {
      "id": 1,
      "type": "amount",
      "amount": 100,
      "code": "REBATE20",
      "free_shipping": false,
      "conditions": [
        {
          "id": 1,
          "type": "customer",
          "type_id: `11` (number) - Condition type id (customer_id, carrier_id or voucher_id)": "Hello, world!"
        }
      ],
      "date_start": "2016-10-01 00:00:00",
      "date_end": "2016-10-30 23:59:59",
      "minimum_amount": 10,
      "quantity": 100,
      "quantity_per_user": 1,
      "action": "order",
      "action_products": [
        {
          "id": "abc123",
          "name": "Awesome shirt",
          "short_description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
          "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p><p>Aliquam erat volutpat.</p>",
          "category": "Fashion",
          "brand_name": "FashionShirt",
          "images": [
            {
              "url": "https://product.url/img.png"
            }
          ],
          "url": "https://product.url",
          "attributes_combination": [
            {
              "combination_id": 23,
              "attributes": [
                {
                  "name": "color",
                  "id": "blue",
                  "display_name": "Blue",
                  "values": [
                    {
                      "id": "blue",
                      "display_name": "Blue",
                      "is_default": true
                    }
                  ]
                }
              ],
              "is_default": true,
              "price": 120,
              "quantity": 10,
              "reference": "Product Reference",
              "weight": 12,
              "special_price": 100,
              "special_from_date": "2016-07-01 09:00:00",
              "special_to_date": "2016-07-08 23:59:59",
              "ean": 1234567891234,
              "images": [
                {
                  "url": "https://product.url/img.png"
                }
              ]
            }
          ],
          "weight": 12,
          "price": 120,
          "quantity": 10,
          "reference": "Product Reference",
          "special_price": 100,
          "special_from_date": "2016-07-01 09:00:00",
          "special_to_date": "2016-07-08 23:59:59",
          "ean": 1234567891234,
          "tax_rate": 20
        }
      ]
    }
  ],
  "delivery": "Hello, world!",
  "carrier": {
    "id": "ups",
    "name": "UPS",
    "delay": "2 days",
    "ranges": [
      {
        "id": 12,
        "type": "price",
        "delimiter1": 0,
        "delimiter2": 500,
        "price": 5,
        "tax_rate": 20,
        "zones": [
          {
            "id": 3,
            "iso_code: `FR` (string, required) - Zone iso_code": "Hello, world!",
            "name": "France"
          }
        ]
      }
    ],
    "free_delivery": false
  },
  "point_of_sale": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "relay": {
    "id": 3,
    "name": "Super store",
    "address": {
      "id": 0,
      "firstname": "elon",
      "lastname": "musk",
      "company": "musk",
      "address1": "1, infinite loop steet",
      "address2": "``",
      "post_code": "75002",
      "city": "Paris",
      "iso_code": "FR",
      "phone_number": 623456789,
      "delivery_instruction": "go to first floor"
    },
    "lat": "1.23",
    "lng": "1.23",
    "post_code": "75018",
    "iso_code: `FRA` -  Zone iso_code": "Hello, world!",
    "hours": {
      "monday": "09:00 - 18:00",
      "tuesday": "09:00 - 18:00",
      "wednesday": "09:00 - 18:00",
      "thursday": "09:00 - 18:00",
      "friday": "09:00 - 18:00",
      "saturday": "09:00 - 18:00",
      "sunday": "09:00 - 18:00"
    }
  },
  "total_products": 1,
  "total_shipping": 1,
  "total_vouchers": 1,
  "total": 1,
  "currency": "EUR"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guest_id": {
      "type": "number",
      "description": "User identifier to use in guest mode (with Tapbuy-Guest-Id request header)"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer identifier"
        },
        "email": {
          "type": "string",
          "description": "The email of the customer"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the customer"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the customer"
        },
        "phone": {
          "type": "number",
          "description": "Phone number"
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The main address of the customer"
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "The billing address of the customer (if different than shipping)"
        }
      },
      "required": [
        "id",
        "email",
        "firstname",
        "lastname",
        "phone"
      ],
      "description": "The customer associated to cart"
    },
    "products": {
      "type": "array",
      "description": "Cart products"
    },
    "vouchers": {
      "type": "array",
      "description": "Cart vouchers"
    },
    "delivery": {
      "type": "string"
    },
    "carrier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Carrier identifier"
        },
        "name": {
          "type": "string",
          "description": "Carrier name"
        },
        "delay": {
          "type": "string",
          "description": "Average delivery delay"
        },
        "ranges": {
          "type": "array",
          "description": "Carrier ranges"
        },
        "free_delivery": {
          "type": "boolean",
          "description": "Carrier is free ?"
        }
      },
      "required": [
        "id",
        "name",
        "delay",
        "ranges",
        "free_delivery"
      ],
      "description": "Selected carrier"
    },
    "point_of_sale": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected point of sale"
    },
    "relay": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Point of sale id"
        },
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Address identifier"
            },
            "firstname": {
              "type": "string",
              "description": "Firstname"
            },
            "lastname": {
              "type": "string",
              "description": "Lastname"
            },
            "company": {
              "type": "string",
              "description": "Lastname"
            },
            "address1": {
              "type": "string",
              "description": "Address 1"
            },
            "address2": {
              "type": "string",
              "description": "Address 2"
            },
            "post_code": {
              "type": "string",
              "description": "Post code"
            },
            "city": {
              "type": "string",
              "description": "City name"
            },
            "iso_code": {
              "type": "string",
              "description": "Country iso code"
            },
            "phone_number": {
              "type": "number",
              "description": "Phone number"
            },
            "delivery_instruction": {
              "type": "string",
              "description": "Delivery instruction"
            }
          },
          "required": [
            "id",
            "firstname",
            "lastname",
            "address1",
            "post_code",
            "city",
            "iso_code",
            "phone_number"
          ],
          "description": "Point of sales address"
        },
        "lat": {
          "type": "string",
          "description": "latitude"
        },
        "lng": {
          "type": "string",
          "description": "longitude"
        },
        "post_code": {
          "type": "string",
          "description": "Postal code"
        },
        "iso_code: `FRA` -  Zone iso_code": {
          "type": "string"
        },
        "hours": {
          "type": "object",
          "properties": {
            "monday": {
              "type": "string",
              "description": "Hours for monday"
            },
            "tuesday": {
              "type": "string",
              "description": "Hours for tuesday"
            },
            "wednesday": {
              "type": "string",
              "description": "Hours for wednesday"
            },
            "thursday": {
              "type": "string",
              "description": "Hours for thursday"
            },
            "friday": {
              "type": "string",
              "description": "Hours for friday"
            },
            "saturday": {
              "type": "string",
              "description": "Hours for saturday"
            },
            "sunday": {
              "type": "string",
              "description": "Hours for sunday"
            }
          },
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "description": "opening hours"
        }
      },
      "required": [
        "name"
      ],
      "description": "Selected relay"
    },
    "total_products": {
      "type": "number",
      "description": "Product total cost"
    },
    "total_shipping": {
      "type": "number",
      "description": "Shipping total cost"
    },
    "total_vouchers": {
      "type": "number",
      "description": "Voucher total price"
    },
    "total": {
      "type": "number",
      "description": "Cart total cost"
    },
    "currency": {
      "type": "string",
      "description": "Currency code"
    }
  },
  "required": [
    "total_products",
    "total_shipping",
    "total_vouchers",
    "total",
    "currency"
  ]
}

Validate cart

Validate cart
POST/cart/:id/validate

Validates a cart: checks cart product availability, price matching and handle cart rules. Returns the secured payment page URL (URL to load or redirect to, for the payment process), and the cart ID to use to get its validation status.

Example URI

POST https://webservice.any/cart/:id/validate
URI Parameters
HideShow
id
number (required) Example: 123

Cart id

payment_method
string (required) Example: creditcard

Payment method

redirect_url
string (optional) Example: https://my-site.com/payment-result

Url where the payment result will be posted

Request
HideShow
Headers
Authorization: Bearer {access_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "cart_id": 10,
  "payment_url": "https://www.paypal.com"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cart_id": {
      "type": "number",
      "description": "Cart id, used to get its status"
    },
    "payment_url": {
      "type": "string",
      "description": "URL to load for payment process"
    }
  }
}

Your application has been submited. We'll get back to you shortly.
The Tapbuy Team

Login

Best,

The Tapbuy Team

Close