Introduction
REST API DelRes для интеграций. Базовый адрес — поддомен вашего заведения: https://{ваш-поддомен}-api.delres.kz
Документация актуальна для API v2. Все ответы приходят в едином конверте:
{ "success": true, "data": { ... } }
Ошибка возвращается в таком же конверте с success: false:
{ "success": false, "error": { "code": "unauthorized", "message": "Неверный логин или пароль" } }
С чего начать: получите токен через POST /api/v2/auth/login и передавайте его в заголовке
Authorization: Bearer <токен> во всех остальных запросах.
Обязательные заголовки для части операций:
| Заголовок | Где нужен | Что это |
|---|---|---|
X-Active-Point |
список и создание заказов | ID активной торговой точки. Без него — 400 |
Idempotency-Key |
создание заказа, создание клиента, смена оплат | UUID v4, свой на каждую операцию. Защищает от дублей при повторной отправке |
Единицы измерения: денежные суммы — в тийынах (1 ₸ = 100), количество в составе заказа — в тысячных
(1 шт = 1000). Даты — ISO 8601 в UTC (2026-08-08T12:00:00Z).
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {ВАШ_ТОКЕН}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Токен выдаёт POST /api/v2/auth/login (логин и пароль пользователя вашей организации в DelRes). Полученное значение подставляйте в заголовок Authorization: Bearer <токен>. Токен бессрочный; отозвать его можно через POST /api/v2/auth/logout.
Авторизация
Получить токен
Возвращает бессрочный токен доступа. Его нужно передавать во всех
остальных запросах в заголовке Authorization: Bearer <токен>.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"login\": \"integrator\",
\"password\": \"secret123\"
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"login": "integrator",
"password": "secret123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"token": "11|AbCdEf...",
"expires_at": null,
"user": {
"id": 42,
"name": "Интеграция",
"email": null,
"phone": null,
"roles": [
"site-integrator"
],
"permissions": [
"order-list",
"order-create"
]
}
}
}
Example response (401, Неверный логин или пароль):
{
"success": false,
"error": {
"code": "unauthorized",
"message": "Неверный логин или пароль"
}
}
Example response (401, Учётная запись или организация заблокирована):
{
"success": false,
"error": {
"code": "unauthorized",
"message": "Учётная запись заблокирована"
}
}
Example response (422, Ошибка валидации):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Поле login обязательно"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Отозвать токен
requires authentication
Аннулирует токен, которым сделан запрос. Остальные ранее выданные токены продолжают работать.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/auth/logout" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/auth/logout"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": null
}
Example response (401, Нет или неверный токен):
{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Unauthenticated."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Текущий пользователь
requires authentication
Кому принадлежит токен: профиль, роли и полный список прав. Удобно для проверки, что интеграция авторизована верно.
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/auth/me" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/auth/me"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 42,
"name": "Интеграция",
"email": null,
"phone": null,
"roles": [
"site-integrator"
],
"permissions": [
"order-list",
"order-create",
"client-list"
]
}
}
Example response (401, Нет или неверный токен):
{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Unauthenticated."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Заказы
Список заказов
requires authentication
Постранично, свежие сверху. Суммы — в тийынах (1 ₸ = 100), количество позиций — в тысячных (1 шт = 1000).
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/orders?trade_point_id=1&status=in_progress%2Cready&from=2026-08-01T00%3A00%3A00Z&to=2026-08-08T23%3A59%3A59Z&page=1&per_page=25" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "X-Active-Point: 1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders"
);
const params = {
"trade_point_id": "1",
"status": "in_progress,ready",
"from": "2026-08-01T00:00:00Z",
"to": "2026-08-08T23:59:59Z",
"page": "1",
"per_page": "25",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"X-Active-Point": "1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"items": [
{
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "in_progress",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": "Не звонить в домофон",
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T11:25:00Z",
"items": [
{
"id": 1,
"nomenclature_id": 334,
"name": "Ролл Филадельфия",
"amount": 2000,
"unit_price": 225000,
"total_price": 450000
}
]
}
],
"page_info": {
"page": 1,
"per_page": 25,
"has_next": false,
"total": 1,
"adjusted": false
}
}
}
Example response (400, Нет заголовка X-Active-Point):
{
"success": false,
"error": {
"code": "bad_request",
"message": "Заголовок X-Active-Point обязателен для этой операции"
}
}
Example response (401, Нет или неверный токен):
{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Unauthenticated."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Получить заказ
requires authentication
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "in_progress",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": null,
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T11:25:00Z",
"items": [
{
"id": 1,
"nomenclature_id": 334,
"name": "Ролл Филадельфия",
"amount": 2000,
"unit_price": 225000,
"total_price": 450000
}
]
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Создать заказ
requires authentication
Операция идемпотентная: повторный запрос с тем же Idempotency-Key
и тем же телом вернёт исходный результат, а не создаст дубль. Если по
тому же ключу прислать другое тело — 409.
Количество в позициях указывается в тысячных: 1 шт = 1000, 0.5 кг = 500.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "X-Active-Point: 1" \
--header "Idempotency-Key: 3f1a7d2e-9c44-4b8e-9a1e-7d5c2b6f0a11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"trade_point_id\": 1,
\"channel\": \"delivery\",
\"items\": [
{
\"nomenclature_id\": 334,
\"amount\": 2000
}
],
\"client_id\": 9,
\"comment\": \"Не звонить в домофон\",
\"table_number\": \"12\",
\"discount_id\": 3
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"X-Active-Point": "1",
"Idempotency-Key": "3f1a7d2e-9c44-4b8e-9a1e-7d5c2b6f0a11",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"trade_point_id": 1,
"channel": "delivery",
"items": [
{
"nomenclature_id": 334,
"amount": 2000
}
],
"client_id": 9,
"comment": "Не звонить в домофон",
"table_number": "12",
"discount_id": 3
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Создан):
{
"success": true,
"data": {
"id": 152381,
"trade_point_id": 1,
"client_id": 9,
"status": "new",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 450000,
"comment": null,
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T12:00:00Z",
"created_at": "2026-08-08T12:00:00Z",
"updated_at": "2026-08-08T12:00:00Z",
"items": [
{
"id": 1,
"nomenclature_id": 334,
"name": "Ролл Филадельфия",
"amount": 2000,
"unit_price": 225000,
"total_price": 450000
}
]
}
}
Example response (400, Нет Idempotency-Key или он не UUID v4):
{
"success": false,
"error": {
"code": "idempotency_key_required",
"message": "Заголовок Idempotency-Key обязателен и должен быть UUID v4"
}
}
Example response (409, Тот же ключ с другим телом):
{
"success": false,
"error": {
"code": "idempotency_conflict",
"message": "Idempotency-Key уже использован с другим телом запроса"
}
}
Example response (422, Ошибка валидации):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Поле items обязательно"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Изменить заказ
requires authentication
Меняет только переданные поля. Если прислать items, состав заказа
заменяется целиком на переданный список.
Example request:
curl --request PATCH \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_id\": 9,
\"items\": [
{
\"nomenclature_id\": 334,
\"amount\": 1000
}
],
\"comment\": \"Добавить приборы\",
\"table_number\": \"12\"
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_id": 9,
"items": [
{
"nomenclature_id": 334,
"amount": 1000
}
],
"comment": "Добавить приборы",
"table_number": "12"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "in_progress",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": "Не звонить в домофон",
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T12:05:00Z",
"items": [
{
"id": 1,
"nomenclature_id": 334,
"name": "Ролл Филадельфия",
"amount": 2000,
"unit_price": 225000,
"total_price": 450000
}
]
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Example response (422, Ошибка валидации):
{
"success": false,
"error": {
"code": "validation_error",
"message": "items должен содержать минимум 1 элемент"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Отменить заказ
requires authentication
Переводит заказ в статус «отменён». Повторная отмена уже отменённого заказа вернёт ошибку перехода статуса.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/cancel" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/cancel"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "canceled",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": null,
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T12:10:00Z",
"items": []
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Example response (422, Недопустимый переход статуса):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Заказ уже отменён"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Отметить заказ готовым
requires authentication
Ставит статус «готов» — заказ приготовлен и ждёт выдачи или курьера.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/mark-ready" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/mark-ready"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "ready",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": null,
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T12:15:00Z",
"items": []
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Сменить статус заказа
requires authentication
Универсальная смена статуса. Допустимые переходы определяются машиной состояний заказа — недопустимый переход вернёт 422.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/change-status" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"in_progress\"
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/change-status"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "in_progress"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "in_progress",
"payment_status": "not_paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": "Не звонить в домофон",
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T12:05:00Z",
"items": [
{
"id": 1,
"nomenclature_id": 334,
"name": "Ролл Филадельфия",
"amount": 2000,
"unit_price": 225000,
"total_price": 450000
}
]
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Example response (422, Недопустимый переход):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Недопустимый переход статуса"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Изменить оплаты заказа
requires authentication
Заменяет список оплат целиком. Суммы — в тийынах (1 ₸ = 100).
Операция идемпотентная: повтор с тем же Idempotency-Key не задвоит оплату.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/change-payments" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Idempotency-Key: 7c2e5b19-3a4d-4f61-8b0c-19d7a4e6f2b3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payments\": [
{
\"payment_option_id\": 7,
\"amount\": 405000
}
]
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/orders/152380/change-payments"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Idempotency-Key": "7c2e5b19-3a4d-4f61-8b0c-19d7a4e6f2b3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payments": [
{
"payment_option_id": 7,
"amount": 405000
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 152380,
"trade_point_id": 1,
"client_id": 9,
"status": "in_progress",
"payment_status": "paid",
"sum_original": 450000,
"sum_discounted": 405000,
"comment": null,
"table_number": null,
"is_fiscal": false,
"date": "2026-08-08T11:20:00Z",
"created_at": "2026-08-08T11:20:00Z",
"updated_at": "2026-08-08T12:20:00Z",
"items": []
}
}
Example response (400, Нет Idempotency-Key):
{
"success": false,
"error": {
"code": "idempotency_key_required",
"message": "Заголовок Idempotency-Key обязателен и должен быть UUID v4"
}
}
Example response (404, Заказ не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Заказ не найден"
}
}
Example response (422, Сумма оплат не сходится):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Сумма оплат не совпадает с суммой заказа"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Клиенты
Список клиентов
requires authentication
Постранично. Фильтры можно комбинировать. Баланс бонусов — в тийынах (1 ₸ = 100).
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/clients?phone=%2B77011234567&card=1234&name=%D0%90%D0%B9%D0%B3%D1%83%D0%BB%D1%8C&page=1&per_page=25" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients"
);
const params = {
"phone": "+77011234567",
"card": "1234",
"name": "Айгуль",
"page": "1",
"per_page": "25",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"items": [
{
"id": 9,
"phone": "+77011234567",
"name": "Айгуль",
"discount_card": "1234",
"bonus_balance": 12500,
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-08-08T12:00:00Z"
}
],
"page_info": {
"page": 1,
"per_page": 25,
"has_next": false,
"total": 1,
"adjusted": false
}
}
}
Example response (401, Нет или неверный токен):
{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Unauthenticated."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Получить клиента
requires authentication
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/clients/9" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients/9"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 9,
"phone": "+77011234567",
"name": "Айгуль",
"discount_card": "1234",
"bonus_balance": 12500,
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-08-08T12:00:00Z"
}
}
Example response (404, Клиент не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Клиент не найден"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Создать клиента
requires authentication
Телефон обязателен и должен быть в формате E.164 (+ и до 15 цифр).
Операция идемпотентная: повтор с тем же Idempotency-Key не создаст дубль.
Example request:
curl --request POST \
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Idempotency-Key: 9d3b1f70-5c62-4a8e-b1d4-2e6f8a0c7b55" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"+77011234567\",
\"name\": \"Айгуль\",
\"discount_card\": \"1234\"
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Idempotency-Key": "9d3b1f70-5c62-4a8e-b1d4-2e6f8a0c7b55",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "+77011234567",
"name": "Айгуль",
"discount_card": "1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Создан):
{
"success": true,
"data": {
"id": 9,
"phone": "+77011234567",
"name": "Айгуль",
"discount_card": "1234",
"bonus_balance": 12500,
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-08-08T12:00:00Z"
}
}
Example response (400, Нет Idempotency-Key):
{
"success": false,
"error": {
"code": "idempotency_key_required",
"message": "Заголовок Idempotency-Key обязателен и должен быть UUID v4"
}
}
Example response (422, Ошибка валидации):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Телефон должен быть в формате +7XXXXXXXXXX"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Изменить клиента
requires authentication
Меняет только переданные поля. Телефон через эту ручку не меняется.
Example request:
curl --request PATCH \
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients/9" \
--header "Authorization: Bearer {ВАШ_ТОКЕН}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Айгуль Н.\",
\"discount_card\": \"5678\"
}"
const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/clients/9"
);
const headers = {
"Authorization": "Bearer {ВАШ_ТОКЕН}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Айгуль Н.",
"discount_card": "5678"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"id": 9,
"phone": "+77011234567",
"name": "Айгуль",
"discount_card": "1234",
"bonus_balance": 12500,
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-08-08T12:00:00Z"
}
}
Example response (404, Клиент не найден):
{
"success": false,
"error": {
"code": "not_found",
"message": "Клиент не найден"
}
}
Example response (422, Ошибка валидации):
{
"success": false,
"error": {
"code": "validation_error",
"message": "Имя не должно превышать 255 символов"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Служебные
Проверка доступности
Публичная ручка без авторизации: показывает, что API отвечает, и время сервера в UTC. Удобно для быстрой проверки связи и сетевого доступа.
Example request:
curl --request GET \
--get "https://{ваш-поддомен}-api.delres.kz/api/v2/health" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://{ваш-поддомен}-api.delres.kz/api/v2/health"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Успех):
{
"success": true,
"data": {
"status": "ok",
"time": "2026-08-08T12:00:00Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.