ГДЕЗАКАЗЫ.РФ API documentation version v1
https://гдезаказы.рф/api/v1
Авторизация
Для авторизации, необходимо добавить токен доступа к API к каждому запросу, с помощью HTTP заголовка:
Authorization: Bearer [token]
Получить токен доступа можно в личном кабинете пользователя.
/
Получить сервисную информацию API
get /
Получить сервисную информацию API
HTTP status code 200
Успешный ответ
Body
Media type: application/json
Type: object
Properties- name: required(string)
Название API (константа
гдезаказы.рф API
) - version: required(integer)
Версия API
- opencartLimit: required(integer)
Количество оставшихся бесплатных треков
- opencartSubscription: (datetime)
Время окончания подписки
- opencartSubscriptionPlan: (integer)
Текущий тарифный план (1 - месяц, 2 - год)
HTTP status code 403
Доступ запрещен
Body
Media type: application/json
Type: object
Properties- message: required(string)
/track
Добавить трек
post /track
Добавить трек
Body
Media type: multipart/form-data
Type: object
Properties- track_code: required(string)
Трек-код заказа
- phone: (string)
Телефон клиента
- email: required(string)
Email клиента
- name: (string)
Имя клиента
- order_number: (string)
Номер заказа
- order_amount: (string)
Стоимость заказа
HTTP status code 200
Успешный ответ
Body
Media type: application/json
Type: object
Properties- id: required(integer)
ID трэка в базе данных
- track_code: required(string)
Трек-код заказа
- email: required(string)
E-mail клиента
- phone: (string)
Телефон клиента
- name: (string)
Имя клиента
- order_number: (string)
Номер заказа
- order_amount: (string)
Стоимость заказа
- created_at: required(datetime)
Время добавления трека
- status: required(one of new, notregistered, ontheway, problem, department, delivered, archive)
Статус трека
- updated_at: (datetime)
Дата последнего обновления статуса трека
- had_error: required(boolean)
Признак наличия ошибки
- was_problem: required(boolean)
Признак что заказ был проблемным в прошлом
HTTP status code 403
Доступ запрещен
Body
Media type: application/json
Type: object
Properties- message: required(string)
HTTP status code 406
Ошибка валидации
Body
Media type: application/json
Type: object
Properties- message: required(string)
- errors: required(array of object)
Items: Error
- field: required(one of track_code, phone, email, name, order_number, order_amount)
Поле с ошибкой
- message: required(string)
Текст ошибки
- field: required(one of track_code, phone, email, name, order_number, order_amount)
Получить трек по ID, трек-коду или номеру заказа
get /track/{id}
Получить трек по ID, трек-коду или номеру заказа
URI Parameters
- id: required(string)
HTTP status code 200
Успешный ответ
Body
Media type: application/json
Type: object
Properties- id: required(integer)
ID трэка в базе данных
- track_code: required(string)
Трек-код заказа
- email: required(string)
E-mail клиента
- phone: (string)
Телефон клиента
- name: (string)
Имя клиента
- order_number: (string)
Номер заказа
- order_amount: (string)
Стоимость заказа
- created_at: required(datetime)
Время добавления трека
- status: required(one of new, notregistered, ontheway, problem, department, delivered, archive)
Статус трека
- updated_at: (datetime)
Дата последнего обновления статуса трека
- had_error: required(boolean)
Признак наличия ошибки
- was_problem: required(boolean)
Признак что заказ был проблемным в прошлом
HTTP status code 403
Доступ запрещен
Body
Media type: application/json
Type: object
Properties- message: required(string)
HTTP status code 404
Не найдено
Body
Media type: application/json
Type: object
Properties- message: required(string)