# Overview

# Authentication

# Generate API key-pair

First, you need to generate Client ID and a Client Secret from your platform back-office, in Shop settings > General settings under the API tab.

# HTTP requests

All requests you send to the API must have an http header X-Client-Id containing the Client ID and another header named X-Client-Secret that contains the Client Secret. If the headers are missing or incorrect, a 401 error will be returned.

Make sure to replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your key-pair previously generated.

# Response Format

Responses are returned in JSON.

GET methods requesting lists return a pagination object and a data object. This data object contains all items fetched. When requesting GET for a single item, then object is directly returned.

When using POST or PUT methods to create or update an item, the object created or updated is directly returned, without pagination or list.

Finaly, DELETE methods return an empty response, so you have to check the HTTP code:

  • 204 code is used when result is OK
  • 4xx codes are used when an error is triggered

# Pagination

All GET methods requesting lists can be paginated.

This pagination take two parameters:

  • page argument is the number of the page to get
  • per_page is the number of the items per page (default value is 50, maximum 100).

# Parameters

Name Details
page Number of the page to get
per_page Number of items per page

# Response

Name Details
total The total number of items returned by the query
current_page The page being returned
last_page The number of pages required to list all items
next_page_url The url of the next page
prev_page_url The url of the previous page
from The index of the first item returned on the current page
to The index of the last item returned on the current pag

# Example

# Filters

Coming soon...