MENU navbar-image

Introduction

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

Authenticating requests

This API is not authenticated.

Endpoints

POST api/v2/auth/login

Example request:
curl --request POST \
    "http://localhost/api/v2/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/v2/auth/logout

Example request:
curl --request POST \
    "http://localhost/api/v2/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v2/auth/me

Example request:
curl --request GET \
    --get "http://localhost/api/v2/auth/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/auth/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/auth/me

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v2/health

Example request:
curl --request GET \
    --get "http://localhost/api/v2/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/health"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/health

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v2/orders

Example request:
curl --request GET \
    --get "http://localhost/api/v2/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v2/orders/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v2/orders/56893" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/56893"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/orders/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 56893

POST api/v2/orders

Example request:
curl --request POST \
    "http://localhost/api/v2/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

PATCH api/v2/orders/{id}

Example request:
curl --request PATCH \
    "http://localhost/api/v2/orders/152380" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/152380"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v2/orders/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 152380

POST api/v2/orders/{id}/cancel

Example request:
curl --request POST \
    "http://localhost/api/v2/orders/55344/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/55344/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/orders/{id}/cancel

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 55344

POST api/v2/orders/{id}/mark-ready

Example request:
curl --request POST \
    "http://localhost/api/v2/orders/8/mark-ready" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/8/mark-ready"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/orders/{id}/mark-ready

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 8

POST api/v2/orders/{id}/change-status

Example request:
curl --request POST \
    "http://localhost/api/v2/orders/15192/change-status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/15192/change-status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/orders/{id}/change-status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 15192

POST api/v2/orders/{id}/change-payments

Example request:
curl --request POST \
    "http://localhost/api/v2/orders/57373/change-payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/orders/57373/change-payments"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/orders/{id}/change-payments

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: 57373

GET api/v2/clients

Example request:
curl --request GET \
    --get "http://localhost/api/v2/clients" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/clients"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/clients

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v2/clients/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v2/clients/9" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/clients/9"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "error": {
        "code": "not_found",
        "message": "Ресурс не найден"
    }
}
 

Request      

GET api/v2/clients/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: 9

POST api/v2/clients

Example request:
curl --request POST \
    "http://localhost/api/v2/clients" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/clients"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/clients

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

PATCH api/v2/clients/{id}

Example request:
curl --request PATCH \
    "http://localhost/api/v2/clients/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v2/clients/3"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v2/clients/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: 3