Introduction

To get access to this api you will need to have the api-module activated. Head in your account to https://backoffice.retaildesk.com/apps/my/create to create an client. Some request will return paginated results. Please use the provided urls to request the next set of data.

This documentation aims to provide all the information you need to work with our API.

Rate limiting

Every request to the API counts towards a general limit of 60 requests per minute per OAuth client. Some endpoints have an additional, stricter limit; this is listed at the endpoint (for example reports/summary: 1 request per 10 minutes). A request counts towards all limits that apply to it, so the most restrictive one determines when you are blocked.

When a limit is exceeded the API responds with 429 Too Many Requests. Wait until the limit resets before sending new requests.

Rate limit headers

Header Sent on Description
X-RateLimit-Limit every response Maximum number of requests in the current window.
X-RateLimit-Remaining every response Requests left in the current window.
Retry-After 429 responses Seconds to wait before retrying.
X-RateLimit-Reset 429 responses Unix timestamp at which you can retry.

When multiple limits apply, the headers describe the limit with the fewest remaining requests.

Reading the headers

$response = Http::withToken($accessToken)
    ->acceptJson()
    ->get('https://api.retaildesk.com/v1/transactions/sales');

$limit = (int) $response->header('X-RateLimit-Limit');
$remaining = (int) $response->header('X-RateLimit-Remaining');

if ($response->status() === 429) {
    // Wait the number of seconds the API asks for, then retry.
    sleep((int) $response->header('Retry-After'));
}
const response = await fetch('https://api.retaildesk.com/v1/transactions/sales', {
    headers: { Authorization: `Bearer ${accessToken}`, Accept: 'application/json' },
});

const limit = Number(response.headers.get('X-RateLimit-Limit'));
const remaining = Number(response.headers.get('X-RateLimit-Remaining'));

if (response.status === 429) {
    const retryAfter = Number(response.headers.get('Retry-After'));
    await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
}

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

1. Create Client

First create client id + secret in the app-center. https://backoffice.retaildesk.com/apps.

2. Request authorization code

redirect to: https://api.retaildesk.com/oauth/authorize?client_id=<client_id&redirect_uri=<redirect_uri>&response_type=code&scope=<scope>&state=<your_state>

Scopes are per resource: {resource}:read for GET requests and {resource}:write for POST/PUT/PATCH/DELETE, e.g. scope=products:read stock:read stock:write. Available resources: sales, cash_mutations, logging, customers, revenue_reports, catalogue_reports, stock_reports, products, stock, categories, taxgroups, turnovergroups, suppliers, brands, warehouses, registers, price_levels, promotions, webhooks, coupons. The old group scopes (catalogue, transactions, reports, customers, coupons) are deprecated; request the per-resource scopes instead.

Once a client has been created, you may use your client ID and secret to request an authorization code and access token from Retaildesk. First, the your application should make a redirect request to your /oauth/authorize route.

3. Redirect and verify
If the user approves the authorization request, they will be redirected back to your redirect url. Your app should first verify the state parameter against the value that was stored prior to the redirect.

4. Request Access code

(4) POST oauth/token
    [
        'grant_type' => 'authorization_code',
        'client_id' => 'client-id',
        'client_secret' => 'client-secret',
        'redirect_uri' => 'http://third-party-app.com/callback',
        'code' => 'code',    
    ]  

If the state parameter matches then the consumer should issue a POST request to your application to request an access token. The request should include the authorization code that was issued by your application when the user approved the authorization request. This /oauth/token route will return a JSON response containing access_token, refresh_token, and expires_in attributes. The expires_in attribute contains the number of seconds until the access token expires.

5. Refreshing tokens

 (5) POST oauth/token
    [
        'grant_type' => 'refresh_token',
        'refresh_token' => 'the-refresh-token',
        'client_id' => 'client-id',
        'client_secret' => 'client-secret',
        'scope' => 'sales:read products:read revenue_reports:read',    
    ]     

You will need to refresh the access tokens with the refresh token that was provided to you when the access token was issued.

6. Passing the access token

(6) $response = Http::withHeaders([
    'Accept' => 'application/json',
    'Authorization' => 'Bearer '.$accessToken,
])->get('https://api.retaildesk.com/v1/endpoint');

When calling routes that are protected, your application's API consumers should specify their access token as a Bearer token in the Authorization header of their request. For example, when using the Guzzle HTTP library:

Categories

APIs for managing categories

Request a list of categories

GET
https://api.retaildesk.com
/v1/categories
requires authentication

Required scope: categories:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "Apple Macbooks",
     "parent_id" : null,
     "default_tax_id" : 1,
     "default_turnover_group" : 1,
     "default_stock" : true,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a single category

GET
https://api.retaildesk.com
/v1/categories/{id}
requires authentication

Required scope: categories:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the category.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/categories/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "Apple Macbooks",
     "parent_id" : null,
     "default_tax_id" : 1,
     "default_turnover_group" : 1,
     "default_stock" : true,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Brands

APIs for managing brands

Request a list of brands.

GET
https://api.retaildesk.com
/v1/brands
requires authentication

Required scope: brands:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/brands" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "Apple INC",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new brand

POST
https://api.retaildesk.com
/v1/brands
requires authentication

Required scope: brands:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/brands" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"nostrum\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single brand

GET
https://api.retaildesk.com
/v1/brands/{id}
requires authentication

Required scope: brands:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the brand.

Example:
1164
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/brands/1164" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "Apple INC",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Update a brand

PUT
PATCH
https://api.retaildesk.com
/v1/brands/{id}
requires authentication

Required scope: brands:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the brand.

Example:
1164

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/brands/1164" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"laborum\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a brand

DELETE
https://api.retaildesk.com
/v1/brands/{id}
requires authentication

Required scope: brands:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the brand.

Example:
1164
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/brands/1164" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Suppliers

APIs for managing suppliers

Request a list of suppliers

GET
https://api.retaildesk.com
/v1/suppliers
requires authentication

Required scope: suppliers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/suppliers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "Apple wholesale",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new supplier

POST
https://api.retaildesk.com
/v1/suppliers
requires authentication

Required scope: suppliers:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/suppliers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"quis\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single supplier

GET
https://api.retaildesk.com
/v1/suppliers/{id}
requires authentication

Required scope: suppliers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the supplier.

Example:
1049
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/suppliers/1049" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "Apple wholesale",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Update a supplier

PUT
PATCH
https://api.retaildesk.com
/v1/suppliers/{id}
requires authentication

Required scope: suppliers:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the supplier.

Example:
1049

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/suppliers/1049" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"illo\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a supplier

DELETE
https://api.retaildesk.com
/v1/suppliers/{id}
requires authentication

Required scope: suppliers:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the supplier.

Example:
1049
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/suppliers/1049" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Reports

APIs for managing generating reports

Request a summary of revenue

GET
https://api.retaildesk.com
/v1/reports/summary
requires authentication

Request limit 1 request a minute

Required scope: revenue_reports:read. See Authenticating requests.

Rate limits: 1 request per 10 minutes and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get summary from (Unix timestamp)

Example:
14
date_end
integer
required

date to get summary to (Unix timestamp)

Example:
4
register_id
integer
required

integer of register_id

Example:
13

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/summary?date_start=14&date_end=4&register_id=13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 7,
    \"date_end\": 10,
    \"register_id\": 6
}"
Example response:
data :
 {
     "revenue_excluding_tax":82644,
     "tax":17356,
     "revenue_including_tax":10000,
     "tax_groups":[
         {"name":"BTW 21","over":82644,"amount":17356}
     ],
     "count_sales":2,
     "avg_spend":5000,
     "payment_methods":[
         {"payment_type_id":1,"name":"cash","qty":2,"amount":10000}
     ],
     "mutation_methods":[
         {"payment_type_id":3,"name":"Give_away_action","qty":4,"amount":8818}
     ],
     "revenue_per_category":[
        {"name":"Jeans","qty":2,"revenue_excluding_tax":82644,"revenue_including_tax":10000}
     ],"
     revenue_per_turnover_group":[
         {"name":"Revenue clothes","qty":2,"revenue_excluding_tax":82644,"revenue_including_tax":10000},
     ]
 }

Request a list of cashier_balances

GET
https://api.retaildesk.com
/v1/reports/cashier_balance
requires authentication

Required scope: revenue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get cashier_balances from (Unix timestamp)

Example:
14
date_end
integer
required

date to get cashier_balances to (Unix timestamp)

Example:
9
registers
integer[]
required

array of strings with register_id(s)

Example:
[8]

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/cashier_balance?date_start=14&date_end=9&registers[]=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 14,
    \"date_end\": 19,
    \"registers\": [
        5
    ]
}"
Example response:
data : [
     {
         "type":"Telling",
         "amount":100000,
         "diff":250
     }
]

Request a summary of revenue per product

GET
https://api.retaildesk.com
/v1/reports/catalogue/products
requires authentication

Required scope: catalogue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get products from (Unix timestamp)

Example:
13
date_end
integer
required

date to get products to (Unix timestamp)

Example:
2
registers
integer[]

array of strings with register_id(s)

Example:
[15]
category_id
integer

filter on category_id

Example:
4
turnover_group_id
integer

filter on turnover_group_id

Example:
8
brand_id
integer

filter on brand_id,

Example:
1
supplier_id
integer

filter on supplier_id

Example:
17

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/catalogue/products?date_start=13&date_end=2&registers[]=15&category_id=4&turnover_group_id=8&brand_id=1&supplier_id=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 16,
    \"date_end\": 1,
    \"registers\": [
        11
    ],
    \"category_id\": 16,
    \"turnover_group_id\": 15,
    \"supplier_id\": 4,
    \"brand_id\": 18
}"
Example response:
data :[
 {
     "id":4327,
     "name":"Lorem ipsum dolor sit amet",
     "supplier_id":0,
     "brand_id":"1",
     "category_id":58,
     "turnover_group_id":0,
     "qty_sold":35,
     "revenue_including_tax":617463,
     "tax":107163,
     "revenue_excluding_tax":510299
 }
]

Request a summary of revenue per category

GET
https://api.retaildesk.com
/v1/reports/catalogue/categories
requires authentication

Required scope: catalogue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get categories from (Unix timestamp)

Example:
18
date_end
integer
required

date to get categories to (Unix timestamp)

Example:
15
registers
integer[]

array of strings with register_id(s)

Example:
[19]

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/catalogue/categories?date_start=18&date_end=15&registers[]=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 9,
    \"date_end\": 9,
    \"registers\": [
        4
    ]
}"
Example response:
data :[
 {
     "id":1,
     "name":"Jeans",
     "qty_sold":35,
     "revenue_including_tax":617463,
     "tax":107163,
     "revenue_excluding_tax":510299
 }
]

Request a summary of revenue per brand

GET
https://api.retaildesk.com
/v1/reports/catalogue/brands
requires authentication

Required scope: catalogue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get brands from (Unix timestamp)

Example:
18
date_end
integer
required

date to get brands to (Unix timestamp)

Example:
7
registers
integer[]

array of strings with register_id(s)

Example:
[11]

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/catalogue/brands?date_start=18&date_end=7&registers[]=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 11,
    \"date_end\": 7,
    \"registers\": [
        15
    ]
}"
Example response:
data :[
 {
     "id":1,
     "name":"Super Jeans INC",
     "qty_sold":35,
     "revenue_including_tax":617463,
     "tax":107163,
     "revenue_excluding_tax":510299
 }
]

Request a summary of revenue per supplier

GET
https://api.retaildesk.com
/v1/reports/catalogue/suppliers
requires authentication

Required scope: catalogue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get suppliers from (Unix timestamp)

Example:
20
date_end
integer
required

date to get suppliers to (Unix timestamp)

Example:
3
registers
integer[]

array of strings with register_id(s)

Example:
[20]

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/catalogue/suppliers?date_start=20&date_end=3&registers[]=20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 11,
    \"date_end\": 14,
    \"registers\": [
        11
    ]
}"
Example response:
data :[
 {
     "id":1,
     "name":"Jeans Wholesale",
     "qty_sold":35,
     "revenue_including_tax":617463,
     "tax":107163,
     "revenue_excluding_tax":510299
 }
]

Request a summary of revenue per turnover_group

GET
https://api.retaildesk.com
/v1/reports/catalogue/turnover_groups
requires authentication

Required scope: catalogue_reports:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer
required

date to get turnover_groups from (Unix timestamp)

Example:
3
date_end
integer
required

date to get turnover_groups to (Unix timestamp)

Example:
12
registers
integer[]

array of strings with register_id(s)

Example:
[15]

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/catalogue/turnover_groups?date_start=3&date_end=12&registers[]=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 19,
    \"date_end\": 19,
    \"registers\": [
        17
    ]
}"
Example response:
data :[
 {
     "id":1,
     "name":"Revenue Jeans",
     "qty_sold":35,
     "revenue_including_tax":617463,
     "tax":107163,
     "revenue_excluding_tax":510299
 }
]

Request a stock value report

GET
https://api.retaildesk.com
/v1/reports/stock/value
requires authentication

Request limit 1 request a minute

Required scope: stock_reports:read. See Authenticating requests.

Rate limits: 1 request per 10 minutes and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

warehouse_id
integer
required

integer warehouse_id

Example:
5
type
string
required

string one of: category|turnoverGroup|product|supplier|brand

Example:
suscipit
stock_date
integer

date to get stock value on (yyyy-mm-dd 2021-01-01) default: today

Example:
7

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/reports/stock/value?warehouse_id=5&type=suscipit&stock_date=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"warehouse_id\": 18,
    \"type\": \"eaque\",
    \"stock_date\": \"sapiente\"
}"
Example response:
data :[
     {
         "id":58,
         "name":"Heren",
         "stock":10,
         "buy_value":0,
         "sell_value":5000
     }
]

Webhooks

APIs for managing webhooks

Webhooks will be called max 5 times.

Webhook Signature

Each webhook request includes a Signature header used to verify its authenticity. The signature is created by computing an HMAC-SHA256 hash of the raw request body using your webhook secret as the key. The resulting hexadecimal string is placed in the request header, for example:

Signature: 645be98cddb9c37807bd5b7f5c839c2b6f1b1482e603d3c94fe9e30694dde4e8

To verify a webhook:

  1. Read the raw request body exactly as received (before JSON decoding).
  2. Compute the HMAC-SHA256 of this body using your webhook secret.
  3. Compare your computed hash to the value in the Signature header. If they match, the webhook is authentic and the payload has not been modified.

Request a list of Webhooks

GET
https://api.retaildesk.com
/v1/webhooks
requires authentication

Required scope: webhooks:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "topic": "products.created",
     "url": "https://example.com/webhook",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new webhook

POST
https://api.retaildesk.com
/v1/webhooks
requires authentication

Required scope: webhooks:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"topic\": \"non\",
    \"url\": \"http:\\/\\/jast.com\\/quis-saepe-ut-omnis.html\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a webhook

DELETE
https://api.retaildesk.com
/v1/webhooks/{id}
requires authentication

Required scope: webhooks:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the webhook.

Example:
natus
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/webhooks/natus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Warehouses

APIs for managing warehouses

Request a list of warehouses

GET
https://api.retaildesk.com
/v1/warehouses
requires authentication

Required scope: warehouses:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/warehouses" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "price_level_id" : 1,
     "name": "Amsterdam",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a single warehouse

GET
https://api.retaildesk.com
/v1/warehouses/{id}
requires authentication

Required scope: warehouses:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the warehouse.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/warehouses/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "price_level_id" : 1,
     "name": "Amsterdam",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Transactions

APIs for managing fetching transactions

Request a list of sales

GET
https://api.retaildesk.com
/v1/transactions/sales
requires authentication

Rate limit: max 20 per minute

Required scope: sales:read. See Authenticating requests.

Rate limits: 20 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
string
required

integer date to get transactions from (Unix timestamp)

Example:
cumque
date_end
string
required

integer date to get transactions to (Unix timestamp)

Example:
maxime
register_id
string
required

integer id of register

Example:
dicta
customer_id
integer

id of customer

Example:
11
turnover_groups
string

comma separeted list of integers: filter lines based on turnovergroup ids

Example:
1,2
excluded_turnover_groups
string

comma separeted list of integers: filter lines based on excluded turnovergroup ids

Example:
1,2
perPage
integer

results per page (max 2500, default 25)

Example:
19

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/sales?date_start=cumque&date_end=maxime&register_id=dicta&customer_id=11&turnover_groups=1%2C2&excluded_turnover_groups=1%2C2&perPage=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 12,
    \"date_end\": 7,
    \"register_id\": 9,
    \"customer_id\": 18
}"
Example response:
data :[
 {
     "id": 1,
     "number": "01115",
     "register_id": 1,
     "warehouse_id": 1,
     "customer" : {
         "id" : 13,
         "company_name" : "Example company",
         ..
     },
     "lines" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "turnover_group_id" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "product_sku" : "SKU of the product",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "discount_price" : null,
             "discount_price_ex" : null,
             "comment" : null,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "payments" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "payment_type": "card",
             "pspMethod" : "visa",
             "amount" : 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "name" : "receipt comment",
     "total" : 1500,
     "sub_total": 1240,
     "vat" : 260,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a list of sale_lines

GET
https://api.retaildesk.com
/v1/transactions/lines
requires authentication

Rate limit: 20 per minute

Required scope: sales:read. See Authenticating requests.

Rate limits: 20 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
string
required

integer date to get lines from (Unix timestamp)

Example:
quo
date_end
string
required

integer date to get lines to (Unix timestamp)

Example:
corporis
register_id
string
required

integer id of register

Example:
in
perPage
integer

results per page (optional, max 200, default 25)

Example:
6

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/lines?date_start=quo&date_end=corporis&register_id=in&perPage=6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 17,
    \"date_end\": 12,
    \"register_id\": 10
}"
Example response:
data :[

        {
             "id" : 1,
             "sale_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "turnover_group_id" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "discount_price" : null,
             "comment" : null,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
]

Request a list of sale_payments

GET
https://api.retaildesk.com
/v1/transactions/payments
requires authentication

Rate Limit: 20 per minute

Required scope: sales:read. See Authenticating requests.

Rate limits: 20 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
string
required

integer date to get payments from (Unix timestamp)

Example:
est
date_end
string
required

integer date to get payments to (Unix timestamp)

Example:
laboriosam
register_id
string
required

integer id of register

Example:
repudiandae
perPage
integer

results per page (optional, max 200, default 25)

Example:
9

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/payments?date_start=est&date_end=laboriosam&register_id=repudiandae&perPage=9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 15,
    \"date_end\": 6,
    \"register_id\": 19
}"
Example response:
data :[
         {
             "id" : 1,
             "sale_id" : 1,
             "payment_type": "card",
             "amount" : 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
]

Request a single sale by number

GET
https://api.retaildesk.com
/v1/transactions/sales/number/{number}
requires authentication

Required scope: sales:read. See Authenticating requests.

Rate limits: 10 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

number
string
required

The number.

Example:
06
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/sales/number/06" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "number": "01115",
     "register_id": 1,
     "warehouse_id": 1,
     "customer" : {
         "id" : 13,
         "company_name" : "Example company",
         ..
     },
     "lines" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "turnover_group_id" : 1,
             "qty" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "product_sku" : "SKU of the product",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "discount_price" : null,
             "comment" : null,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "payments" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "payment_type": "card",
             "pspMethod" : "visa",
             "amount" : 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "name" : "receipt comment",
     "total" : 1500,
     "sub_total": 1240,
     "vat" : 260,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Request a single sale by id

GET
https://api.retaildesk.com
/v1/transactions/sales/{id}
requires authentication

Required scope: sales:read. See Authenticating requests.

Rate limits: 10 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the sale.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/sales/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "number": "01115",
     "register_id": 1,
     "warehouse_id": 1,
     "lines" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "turnover_group_id" : 1,
             "qty" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "discount_price" : null,
             "comment" : null,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "payments" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "payment_type": "card",
             "pspMethod" : "visa",
             "amount" : 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "name" : "receipt comment",
     "total" : 1500,
     "sub_total": 1240,
     "tax" : 260,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Request a list of open sales

GET
https://api.retaildesk.com
/v1/transactions/open_sales
requires authentication

Required scope: sales:read. See Authenticating requests.

Rate limits: 10 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer

date to get transactions from (Unix timestamp)

Example:
10
date_end
integer

date to get transactions to (Unix timestamp)

Example:
18
register_id
integer

id of register

Example:
13
perPage
integer

results per page (optional, max 200, default 25)

Example:
16

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/open_sales?date_start=10&date_end=18&register_id=13&perPage=16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 4,
    \"date_end\": 7,
    \"register_id\": 5
}"
Example response:
data :[
 {
     "id": 1,
     "number": null,
     "register_id": 1,
     "warehouse_id": 1,
     "lines" : [
         {
             "id" : 1,
             "sale_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "turnover_group_id" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "discount_price" : null,
             "comment" : null,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "payments" : null,
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "name" : "receipt comment",
     "total" : 1500,
     "sub_total": 1240,
     "tax" : 260,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a list of mutations

GET
https://api.retaildesk.com
/v1/transactions/mutations
requires authentication

Required scope: cash_mutations:read. See Authenticating requests.

Rate limits: 10 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer

date to get transactions from (Unix timestamp)

Example:
17
date_end
integer

date to get transactions to (Unix timestamp)

Example:
2
register_id
integer

id of register

Example:
17
perPage
integer

results per page (optional, max 200, default 25)

Example:
18

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/mutations?date_start=17&date_end=2&register_id=17&perPage=18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 15,
    \"date_end\": 13,
    \"register_id\": 6
}"
Example response:
data :[
 {
     "id": 1,
     "number": "01115",
     "register_id": 1,
     "warehouse_id": 1,
     "lines" : [
         {
             "id" : 1,
             "mutation_id" : 1,
             "category_id" : 1,
             "product_id" : 1,
             "product_name" : "Product name at the time of the sale",
             "product_category_name" : "Category name at the time of the sale",
             "product_buy_price" : "Buy price at the time of the sale",
             "vat_value" : "vat value at the time of the sale",
             "vat_name" : "vat name at the time of the sale",
             "price": 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "payments" : [
         {
             "id" : 1,
             "mutation_id" : 1,
             "payment_type": "warranty",
             "amount" : 1500,
             "created_at": "2021-09-28 18:06:59",
             "updated_at": "2021-10-25 19:42:41"
         }
     ],
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "total" : 1500,
     "sub_total": 1240,
     "tax" : 260,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a list of logging entries

GET
https://api.retaildesk.com
/v1/transactions/logging
requires authentication

Required scope: logging:read. See Authenticating requests.

Rate limits: 10 requests per minute and 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

date_start
integer

date to get logging from (Unix timestamp)

Example:
12
date_end
integer

date to get logging to (Unix timestamp)

Example:
6
register_id
string
required

integer id of register

Example:
aut
type
string

logging type. One of: all, logged_in, logged_out, decrease_qty, delete_proforma_sale, delete_sale_line, delete_sale_line_reversal, add_total_discount, remove_total_discount, credit_sale, refund_sale_line, add_line_discount, remove_line_discount, invoice_date, change_invoice, change_invoice_payments, lines-discount-percentage, lines-remove-discount, lines-discount-amount, lines-edit-price, open_drawer, comment_sale_line, scan_promotion, merge_sale, move_row, print_copy_receipt

Example:
excepturi
perPage
integer

results per page (optional, max 200, default 25)

Example:
18

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/transactions/logging?date_start=12&date_end=6&register_id=aut&type=excepturi&perPage=18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": 2,
    \"date_end\": 10,
    \"register_id\": 6,
    \"type\": \"doloremque\"
}"
Example response:
data :[
 {
     "id": 1,
     "register_id": 1,
     "employee" : {
         "firstname" : "Jan",
         "lastname" : "de vries",
         "email" : "[email protected]",
         ..
     },
     "type": "delete_sale_line",
     "type_label": "Verwijderen verkoopregel",
     "reason": null,
     "data": {},
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-09-28 18:06:59"
 }
]

Registers

APIs for managing Registers

Request a list of registers

GET
https://api.retaildesk.com
/v1/registers
requires authentication

Required scope: registers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/registers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "warehouse_id": 1,
     "name": "Register 1",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a single register

GET
https://api.retaildesk.com
/v1/registers/{id}
requires authentication

Required scope: registers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the register.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/registers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "warehouse_id": 1,
     "name": "Register 1",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Products

APIs for managing products

Request a list of products

GET
https://api.retaildesk.com
/v1/products
requires authentication

Required scope: products:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

category_id
integer

filter products by category_id

Example:
3
supplier_id
integer

filter products by supplier_id

Example:
14
turnover_group_id
integer

filter products by turnover_group_id

Example:
11
taxgroup_id
integer

filter products by taxgroup_id

Example:
15
SKU
string

filter products by SKU

Example:
quod
stock_date
integer

filter products by stock changed since (Unix timestamp)

Example:
20
change_date
integer

filter products by changed since (Unix timestamp)

Example:
5
perPage
integer

results per page (max 250, default 25)

Example:
19

Body Parameters

Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/products?category_id=3&supplier_id=14&turnover_group_id=11&taxgroup_id=15&SKU=quod&stock_date=20&change_date=5&perPage=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"stock_date\": 20,
    \"change_date\": 15
}"
Example response:
data :[
 {
     "id": 11,
     "name": "Apple Macbook Pro 14inch 256GB",
     "type": "simple",
     "parent_id": 0,
     "SKU": "MCBP-14-256",
     "barcodes": [{
         "id" : 1,
         "barcode" : "8754563658987",
         ..
     }],
     "tax_group": {
         "id" : 1,
         "name" : "VAT 21",
         "value" : 21.0,
         ..
     },
     "turnover_group": {
         "id" : 1,
         "name" : "Revenue hardware",
         ..
     },
     "main_category" : {
         "id" : 45,
         "name" : "Notebooks",
         ..
     },
     "alias_categories" : [46, 55],
     "supplier" : {
         "id" : 22,
         "name" : "Apple wholesale",
         ..
     },
     "brand" : {
         "id" : 2,
         "name" : "Apple Inc",
         ..
     },
     "variable_price" : false,
     "refund_product" : false,
     "sell_price" : 224900,
     "product_price_levels" : [
         {
             "id" : 1,
             "price_level":
                 {price_level..},
             "value": 254900
             ..
         }
     ],
     "buy_price" : 150000,
     "manage_stock" : true,
     "product_stock" : [
         {
             "id" : 1,
             "warehouse":
                 {warehouse..},
             "stock": 12
             ..
         }
     ],
     "variation_options": [
         {
             "option_id": 1,
             "option_name": "15 inch",
             "attribute_id": 1,
             "attribute_name": "Maat",
             "created_at": "2024-01-24T14:45:02.000000Z",
             "updated_at": "2024-01-24T14:45:02.000000Z"
         },
         {
             "option_id": 3,
             "option_name": "Space gray",
             "attribute_id": 2,
             "attribute_name": "Kleur",
             "created_at": "2023-09-26T14:12:38.000000Z",
             "updated_at": "2023-09-26T14:12:38.000000Z"
         }
     ],
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new product

POST
https://api.retaildesk.com
/v1/products
requires authentication

Required scope: products:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/products" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 9,
    \"name\": \"qui\",
    \"SKU\": \"repellendus\",
    \"barcodes\": [
        \"saepe\"
    ],
    \"tax_group_id\": 6,
    \"turnover_group_id\": 2,
    \"main_category_id\": 12,
    \"category_aliases\": [
        18
    ],
    \"supplier_id\": 6,
    \"brand_id\": 10,
    \"variable_price\": false,
    \"refund_product\": false,
    \"sell_price\": 2,
    \"buy_price\": 7,
    \"manage_stock\": false
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single product

GET
https://api.retaildesk.com
/v1/products/{id}
requires authentication

Required scope: products:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/products/1606" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 11,
     "parent_id":0,
     "name": "Apple Macbook Pro 14inch 256GB",
     "type": "simple",
     "SKU": "MCBP-14-256",
     "barcodes": [{
         "id" : 1,
         "barcode" : "8754563658987",
         ..
     }],
     "tax_group": {
         "id" : 1,
         "name" : "VAT 21",
         "value" : 21.0,
         ..
     },
     "turnover_group": {
         "id" : 1,
         "name" : "Revenue hardware",
         ..
     },
     "main_category" : {
         "id" : 45,
         "name" : "Notebooks",
         ..
     },
     "alias_categories" : [46, 55],
     "supplier" : {
         "id" : 22,
         "name" : "Apple wholesale",
         ..
     },
     "brand" : {
         "id" : 2,
         "name" : "Apple Inc",
         ..
     },
     "variable_price" : false,
     "refund_product" : false,
     "sell_price" : 224900,
     "product_price_levels" : [
         {
             "id" : 1,
             "price_level":
                 {price_level..},
             "value": 254900
             ..
         }
     ],
     "buy_price" : 150000,
     "manage_stock" : true,
     "product_stock" : [
         {
             "id" : 1,
             "warehouse":
                 {warehouse..},
             "stock": 12
             ..
         }
     ],
     "variation_options": [
         {
             "option_id": 61,
             "option_name": "15 inch",
             "attribute_id": 1,
             "attribute_name": "Maat",
             "created_at": "2024-01-24T14:45:02.000000Z",
             "updated_at": "2024-01-24T14:45:02.000000Z"
         },
         {
             "option_id": 56,
             "option_name": "Space gray",
             "attribute_id": 3,
             "attribute_name": "Kleur",
             "created_at": "2023-09-26T14:12:38.000000Z",
             "updated_at": "2023-09-26T14:12:38.000000Z"
         }
     ],
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Update a product

PUT
PATCH
https://api.retaildesk.com
/v1/products/{id}
requires authentication

Required scope: products:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/products/1606" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"atque\",
    \"SKU\": \"ut\",
    \"barcodes\": [
        \"modi\"
    ],
    \"tax_group_id\": 13,
    \"turnover_group_id\": 9,
    \"main_category_id\": 19,
    \"category_aliases\": [
        19
    ],
    \"supplier_id\": 16,
    \"brand_id\": 8,
    \"variable_price\": true,
    \"refund_product\": false,
    \"sell_price\": 6,
    \"buy_price\": 14,
    \"manage_stock\": false
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a product

DELETE
https://api.retaildesk.com
/v1/products/{id}
requires authentication

Required scope: products:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/products/1606" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a list of product_price_levels

GET
https://api.retaildesk.com
/v1/products/{id}/price_levels
requires authentication

Required scope: products:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/products/1606/price_levels" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "price_level": {
         "id" : 12,
         "name" : "standard",
         "created_at": "2021-09-28 18:06:59",
         "updated_at": "2021-10-25 19:42:41"
     },
     "value": 12599,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new product_price_level

POST
https://api.retaildesk.com
/v1/products/{id}/price_levels
requires authentication

Required scope: products:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/products/1606/price_levels" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"value\": 6,
    \"price_level_id\": 9
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a product_price_level

DELETE
https://api.retaildesk.com
/v1/products/{id}/price_levels/{price_level_id}
requires authentication

Required scope: products:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
price_level_id
string
required

The ID of the price level.

Example:
241
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/products/1606/price_levels/241" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a list of product_stock

GET
https://api.retaildesk.com
/v1/products/{id}/stock
requires authentication

Required scope: stock:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/products/1606/stock" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "warehouse": {
         "id" : 12,
         "name" : "Amsterdam",
         "created_at": "2021-09-28 18:06:59",
         "updated_at": "2021-10-25 19:42:41"
     },
     "stock": 12,
     "minimum_stock": 5,
     "desired_stock": 10,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new product_stock

POST
https://api.retaildesk.com
/v1/products/{id}/stock
requires authentication

Required scope: stock:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/products/1606/stock" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"stock\": 15,
    \"minimum_stock\": 10,
    \"desired_stock\": 12,
    \"warehouse_id\": 11
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Update product_stock

PUT
PATCH
https://api.retaildesk.com
/v1/products/{id}/stock
requires authentication

Required scope: stock:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/products/1606/stock" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"warehouse_id\": 16,
    \"stock\": 10,
    \"minimum_stock\": 15,
    \"desired_stock\": 11
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a product_stock

DELETE
https://api.retaildesk.com
/v1/products/{id}/stock/{stock_id}
requires authentication

Required scope: stock:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the product.

Example:
1606
stock_id
string
required

The ID of the stock.

Example:
73
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/products/1606/stock/73" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Taxgroups

APIs for managing Taxgroups

Request a list of taxgroups

GET
https://api.retaildesk.com
/v1/taxgroups
requires authentication

Required scope: taxgroups:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/taxgroups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "BTW 21",
     "value": 21.0,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a single taxgroup

GET
https://api.retaildesk.com
/v1/taxgroups/{id}
requires authentication

Required scope: taxgroups:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the taxgroup.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/taxgroups/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "BTW 21",
     "value": 21.0,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

PriceLevels

APIs for managing price_levels

Request a list of price_levels

GET
https://api.retaildesk.com
/v1/price_levels
requires authentication

Required scope: price_levels:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/price_levels" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "standard",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new price_level

POST
https://api.retaildesk.com
/v1/price_levels
requires authentication

Required scope: price_levels:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/price_levels" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"qui\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single price_level

GET
https://api.retaildesk.com
/v1/price_levels/{id}
requires authentication

Required scope: price_levels:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the price level.

Example:
maiores
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/price_levels/maiores" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "Standard",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Update a price_level

PUT
PATCH
https://api.retaildesk.com
/v1/price_levels/{id}
requires authentication

Required scope: price_levels:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the price level.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/price_levels/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"harum\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a price_level

DELETE
https://api.retaildesk.com
/v1/price_levels/{id}
requires authentication

Required scope: price_levels:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the price level.

Example:
12
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/price_levels/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Resource not found"
}

Customers

APIs for customers

Request a list of customers

GET
https://api.retaildesk.com
/v1/customers
requires authentication

Required scope: customers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

perPage
integer

results per page (max 250, default 25)*

Example:
20
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/customers?perPage=20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "company_name": "Example company",
     "coc_number": "1525125125",
     "vat_id": "NL123123B01",
     "name": "Jan de Vries",
     "email": "[email protected]",
     "address": "Dropstraat 1",
     "postal": "1010 AB",
     "city": "Amsterdam",
     "phone": "0331234567",
     "rfid": "00001",
     "rfid_balance": "4900",
     "loyalty_points": "150",
     "rfid_points_balance": "150",
     "birthdate": "1990-05-21",
     "newsletter": true,
     "note": "Note about customer",
     "customer_number": "1234",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new customer

POST
https://api.retaildesk.com
/v1/customers
requires authentication

Required scope: customers:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/customers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"animi\",
    \"company_name\": \"qui\",
    \"coc_number\": \"ut\",
    \"vat_id\": \"quam\",
    \"email\": \"[email protected]\",
    \"address\": \"ducimus\",
    \"postal\": \"error\",
    \"city\": \"aut\",
    \"phone\": \"cumque\",
    \"note\": \"dolorem\",
    \"customer_number\": \"quia\",
    \"rfid\": \"ut\",
    \"rfid_points_balance\": 15,
    \"birthdate\": \"est\",
    \"newsletter\": true
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single customer

GET
https://api.retaildesk.com
/v1/customers/{id}
requires authentication

Required scope: customers:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the customer.

Example:
1
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/customers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "company_name": "Example company",
     "coc_number": "1525125125",
     "vat_id": "NL123123B01",
     "name": "Jan de Vries",
     "email": "[email protected]",
     "address": "Dropstraat 1",
     "postal": "1010 AB",
     "city": "Amsterdam",
     "phone": "0331234567",
     "rfid": "00001",
     "rfid_balance": "4900",
     "loyalty_points": "150",
     "rfid_points_balance": "150",
     "birthdate": "1990-05-21",
     "newsletter": true,
     "note": "Note about customer",
     "customer_number": "1234",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }

Update a customer

PUT
PATCH
https://api.retaildesk.com
/v1/customers/{id}
requires authentication

Required scope: customers:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the customer.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/customers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"incidunt\",
    \"company_name\": \"omnis\",
    \"coc_number\": \"fugit\",
    \"vat_id\": \"recusandae\",
    \"email\": \"[email protected]\",
    \"address\": \"et\",
    \"postal\": \"cupiditate\",
    \"city\": \"similique\",
    \"phone\": \"autem\",
    \"note\": \"reprehenderit\",
    \"customer_number\": \"quia\",
    \"rfid\": \"assumenda\",
    \"rfid_points_balance\": 18,
    \"birthdate\": \"assumenda\",
    \"newsletter\": true
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Coupons

APIs for managing coupons (gift cards / vouchers)

Request a list of coupons

GET
https://api.retaildesk.com
/v1/coupons
requires authentication

Required scope: coupons:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

perPage
integer

results per page (max 250, default 25)*

Example:
14
archived
boolean

filter on archived state

Example:
true
customer_id
integer

filter on linked customer

Example:
12
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/coupons?perPage=14&archived=1&customer_id=12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "number": "123456789",
     "description": "Cadeaubon",
     "type": "card",
     "customer_id": null,
     "minimum_order_amount": 0,
     "value": 2500,
     "start": null,
     "end": null,
     "claimed": 0,
     "archived": 0,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Create a new coupon

POST
https://api.retaildesk.com
/v1/coupons
requires authentication

Required scope: coupons:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/coupons" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"number\": \"voluptatem\",
    \"description\": \"Magnam atque sint magnam optio ullam officiis illum.\",
    \"type\": \"et\",
    \"customer_id\": 19,
    \"minimum_order_amount\": 16,
    \"value\": 12,
    \"start\": \"rerum\",
    \"end\": \"molestias\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single coupon

GET
https://api.retaildesk.com
/v1/coupons/{id}
requires authentication

Required scope: coupons:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the coupon.

Example:
1052
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/coupons/1052" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Update a coupon

PUT
PATCH
https://api.retaildesk.com
/v1/coupons/{id}
requires authentication

Required scope: coupons:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the coupon.

Example:
1052

Body Parameters

Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/coupons/1052" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"number\": \"qui\",
    \"description\": \"Quia veniam dolores minima labore sit.\",
    \"customer_id\": 18,
    \"minimum_order_amount\": 10,
    \"start\": \"maxime\",
    \"end\": \"sit\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a coupon

DELETE
https://api.retaildesk.com
/v1/coupons/{id}
requires authentication

Required scope: coupons:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the coupon.

Example:
1052
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/coupons/1052" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request the mutation history of a coupon

GET
https://api.retaildesk.com
/v1/coupons/{id}/mutations
requires authentication

Required scope: coupons:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the coupon.

Example:
1052

Query Parameters

perPage
integer

results per page (max 250, default 25)*

Example:
17
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/coupons/1052/mutations?perPage=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "coupon_id": 1,
     "type": "edit",
     "mutation": 2500,
     "meta": null,
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-09-28 18:06:59"
 }
]

Increase or decrease the balance of a coupon

POST
https://api.retaildesk.com
/v1/coupons/{id}/mutations
requires authentication

Required scope: coupons:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the coupon.

Example:
1052

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/coupons/1052/mutations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mutation\": 14,
    \"meta\": []
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}
{
    "message": "Insufficient balance",
    "balance": 500,
    "mutation": -600
}

Promotions

APIs for managing promotions. A promotion can be limited to specific customers with customer_ids, and to a number of uses with qty_left (e.g. 1 for a single use promotion). Every closed sale using the promotion lowers qty_left by 1, when it reaches 0 the promotion is archived.

With a barcode the promotion only applies after that code is scanned or entered, without one it applies automatically to every matching product.

Promotion types

The meaning of value, at_amount and effective_amount depends on the type. Amounts in euros, not cents.

type Name value at_amount effective_amount Example
0 Fixed price New price per product (€) - - value 5: every product costs € 5
1 Discount % Discount per product (%) - - value 10: 10% off every product
2 Discount € (product) Discount per product (€) Minimum product price (€), 0 for none - value 2, at_amount 10: € 2 off every product of € 10 or more
14 Discount € (combined) Discount on the total of the matching products (€), once Minimum total of the matching products (€), 0 for none - value 5, at_amount 25: € 5 off when the matching products total € 25 or more
3 Combination (cheapest product) Discount % on the cheapest products, 100 for free Products to buy Products discounted at_amount 2, effective_amount 1, value 100: 2 + 1 free, the cheapest is free
7 Combination (total) Discount %, 100 for free Products to buy Products discounted at_amount 2, effective_amount 1, value 100: 2 + 1 free, the discount of one product is spread over all three
4 Tiered € New price per product (€) Number of products after which the price applies - value 8, at_amount 2: from the 3rd product all products cost € 8
9 Tiered % Discount per product (%) Number of products after which the discount applies - value 20, at_amount 2: from the 3rd product 20% off all products
5 Mix & Match € Total price of the set (€) Products per set - value 10, at_amount 3: any 3 products for € 10
11 Mix & Match % Discount on the set (%) Products per set - value 25, at_amount 3: any 3 products 25% off
17 Mix & Match (fixed discount €) Discount on the set (€) Products per set - value 5, at_amount 3: € 5 off any 3 products
8 Mix & Match (unique products) € Total price of the set (€) Different products per set - As 5, but each set has to consist of different products
12 Mix & Match (unique products) % Discount on the set (%) Different products per set - As 11, but each set has to consist of different products
16 Mix & Match (unique products, fixed discount €) Discount on the set (€) Different products per set - As 17, but each set has to consist of different products
10 Mix & Match (unique category) € Total price of the set (€) Products from different categories per set - As 5, but each set has to consist of products from different categories
13 Mix & Match (unique category) % Discount on the set (%) Products from different categories per set - As 11, but each set has to consist of products from different categories
15 Mix & Match (unique category, fixed discount €) Discount on the set (€) Products from different categories per set - As 17, but each set has to consist of products from different categories
6 Stacked discount Discount step per extra product (%) - Maximum discount (%) value 5, effective_amount 20: 2 products 5% off, 3 products 10% off, ... up to 20%

Request a list of promotions

GET
https://api.retaildesk.com
/v1/promotions
requires authentication

Required scope: promotions:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

perPage
integer

results per page (max 250, default 25)*

Example:
15
archived
boolean

filter on archived state (default 0)

Example:
false
customer_id
integer

filter on promotions linked to this customer

Example:
10
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/promotions?perPage=15&archived=&customer_id=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "10% korting",
     "type": 1,
     "value": 10,
     "at_amount": 0,
     "effective_amount": 0,
     "barcode": "WELKOM10",
     "qty_left": 1,
     "over_promotions": false,
     "requires_customer": true,
     "min_order_amount": null,
     "customer_ids": [12],
     "products": [],
     "ex_products": [],
     "categories": [],
     "ex_categories": [],
     "brands": [],
     "ex_brands": [],
     "suppliers": [],
     "ex_suppliers": [],
     "turnover_groups": [],
     "ex_turnover_groups": [],
     "warehouses": [1],
     "sale_channels": [],
     "start": null,
     "end": null,
     "start_time": "00:00:00",
     "end_time": "23:59:00",
     "days": "1,2,3,4,5,6,7",
     "archived": 0,
     "created_at": "2026-10-27 10:00:00",
     "updated_at": "2026-10-27 10:00:00"
 }
]

Create a new promotion

POST
https://api.retaildesk.com
/v1/promotions
requires authentication

Required scope: promotions:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.retaildesk.com/v1/promotions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"id\",
    \"type\": 7,
    \"value\": 119.68655918,
    \"at_amount\": 13,
    \"effective_amount\": 4,
    \"barcode\": \"eos\",
    \"qty_left\": 1,
    \"customer_ids\": [
        8
    ],
    \"requires_customer\": true,
    \"over_promotions\": false,
    \"min_order_amount\": 56655.4272467,
    \"sale_channels\": [
        \"in\"
    ],
    \"start\": \"quia\",
    \"end\": \"dolores\",
    \"start_time\": \"alias\",
    \"end_time\": \"ut\",
    \"days\": \"molestiae\",
    \"warehouses\": [
        15
    ],
    \"products\": [
        13
    ],
    \"ex_products\": [
        15
    ],
    \"categories\": [
        11
    ],
    \"ex_categories\": [
        5
    ],
    \"brands\": [
        17
    ],
    \"ex_brands\": [
        18
    ],
    \"suppliers\": [
        7
    ],
    \"ex_suppliers\": [
        11
    ],
    \"turnover_groups\": [
        5
    ],
    \"ex_turnover_groups\": [
        8
    ]
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Request a single promotion

GET
https://api.retaildesk.com
/v1/promotions/{id}
requires authentication

Required scope: promotions:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the promotion.

Example:
5011
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/promotions/5011" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Update a promotion

PUT
PATCH
https://api.retaildesk.com
/v1/promotions/{id}
requires authentication

Accepts the same fields as create, omitted fields are left unchanged. customer_ids replaces the linked customers, an empty array unlinks all.

Required scope: promotions:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the promotion.

Example:
5011
Example request:
curl --request PUT \
    "https://api.retaildesk.com/v1/promotions/5011" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Delete a promotion

DELETE
https://api.retaildesk.com
/v1/promotions/{id}
requires authentication

Required scope: promotions:write. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the promotion.

Example:
5011
Example request:
curl --request DELETE \
    "https://api.retaildesk.com/v1/promotions/5011" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), microphone=(), camera=()
strict-transport-security: max-age=31536000; includeSubDomains
x-robots-tag: noindex, nofollow
{
    "message": "Unauthenticated."
}

Turnovergroups

APIs for managing Turnovergroups

Request a list of Turnovergroups

GET
https://api.retaildesk.com
/v1/turnovergroups
requires authentication

Required scope: turnovergroups:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/turnovergroups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :[
 {
     "id": 1,
     "name": "Omzet hoog",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }
]

Request a single Turnovergroup

GET
https://api.retaildesk.com
/v1/turnovergroups/{id}
requires authentication

Required scope: turnovergroups:read. See Authenticating requests.

Rate limit: 60 requests per minute. See Rate limiting.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the turnovergroup.

Example:
938
Example request:
curl --request GET \
    --get "https://api.retaildesk.com/v1/turnovergroups/938" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
data :
 {
     "id": 1,
     "name": "Omzet hoog",
     "created_at": "2021-09-28 18:06:59",
     "updated_at": "2021-10-25 19:42:41"
 }