From 9e4fefd0030fb8168fbdf694b1231aeb2e78d0e7 Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Wed, 14 Oct 2020 18:45:39 +0000 Subject: [PATCH 1/9] API definition transferred by SwaggerHub --- swagger/.swagger-codegen-ignore | 23 +++++++++++++++++++++++ swagger/.swagger-codegen/VERSION | 1 + swagger/README.md | 0 swagger/oas yclient.json | 16 ++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 swagger/.swagger-codegen-ignore create mode 100644 swagger/.swagger-codegen/VERSION create mode 100644 swagger/README.md create mode 100644 swagger/oas yclient.json diff --git a/swagger/.swagger-codegen-ignore b/swagger/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/swagger/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/swagger/.swagger-codegen/VERSION b/swagger/.swagger-codegen/VERSION new file mode 100644 index 0000000..402b44e --- /dev/null +++ b/swagger/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.21 \ No newline at end of file diff --git a/swagger/README.md b/swagger/README.md new file mode 100644 index 0000000..e69de29 diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json new file mode 100644 index 0000000..95d017f --- /dev/null +++ b/swagger/oas yclient.json @@ -0,0 +1,16 @@ +{ + "openapi" : "3.0.0", + "info" : { + "title" : "OAS-Yclients", + "description" : "OAS for yclients", + "contact" : { + "email" : "alek_pol@outlook.com" + }, + "version" : "2.0.0" + }, + "servers" : [ { + "url" : "https://api.yclients.com" + } ], + "paths" : { }, + "components" : { } +} \ No newline at end of file From b2a4fe8b437aef06bbf55ebf23402130d6b7f0b1 Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Wed, 14 Oct 2020 18:47:55 +0000 Subject: [PATCH 2/9] add security --- swagger/oas yclient.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 95d017f..2364189 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -11,6 +11,18 @@ "servers" : [ { "url" : "https://api.yclients.com" } ], + "security" : [ { + "bearerAuth" : [ ] + } ], "paths" : { }, - "components" : { } + "components" : { + "schemas" : { }, + "securitySchemes" : { + "bearerAuth" : { + "type" : "http", + "scheme" : "bearer", + "bearerFormat" : "JWT" + } + } + } } \ No newline at end of file From e97b6a3338e738437e241d8a5a618142558c6f8c Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Wed, 14 Oct 2020 19:28:51 +0000 Subject: [PATCH 3/9] add countries --- swagger/oas yclient.json | 132 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 2 deletions(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 2364189..4ce65f2 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -14,9 +14,137 @@ "security" : [ { "bearerAuth" : [ ] } ], - "paths" : { }, + "tags" : [ { + "name" : "Directory", + "description" : "Справочники" + } ], + "paths" : { + "/api/v1/countries" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список стран", + "description" : "### Метод позволяет получить список стран:", + "operationId" : "getListOfCountries", + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200" + } + }, + "examples" : { + "countries" : { + "$ref" : "#/components/examples/countries" + } + } + } + } + } + } + } + } + }, "components" : { - "schemas" : { }, + "schemas" : { + "inline_response_200" : { + "required" : [ "currency", "exchange", "full_title", "id", "phone_code", "phone_example", "phone_template", "title" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "ID страны" + }, + "title" : { + "type" : "string", + "description" : "Краткое название страны" + }, + "full_title" : { + "type" : "string", + "description" : "Полное название страны" + }, + "phone_code" : { + "type" : "string", + "description" : "Телефонный код" + }, + "phone_template" : { + "type" : "string", + "description" : "Шаблон номера телефона страны" + }, + "phone_example" : { + "type" : "string", + "description" : "Пример номера телефона страны" + }, + "currency" : { + "type" : "string", + "description" : "Валюта" + }, + "exchange" : { + "type" : "number", + "description" : "Ставка обмена валют по отношению к рублю", + "format" : "float" + }, + "lang_id" : { + "type" : "integer" + }, + "group_type" : { + "type" : "integer" + } + } + } + }, + "examples" : { + "countries" : { + "value" : [ { + "id" : 1, + "title" : "Россия", + "full_title" : "Российская Федерация", + "phone_code" : "7", + "phone_template" : "+7 xxx xxx-xx-xx", + "phone_example" : "+7 981 123 45-67", + "currency" : "₽", + "exchange" : 1, + "lang_id" : 1, + "group_type" : 0 + }, { + "id" : 2, + "title" : "Латвия", + "full_title" : "Латвийская Республика", + "phone_code" : "371", + "phone_template" : "+371 xx xxx xxx", + "phone_example" : "+371 21 654 987", + "currency" : "€", + "exchange" : 50, + "lang_id" : 4, + "group_type" : 1 + }, { + "id" : 3, + "title" : "Беларусь", + "full_title" : "Республика Беларусь", + "phone_code" : "375", + "phone_template" : "+375 xx xxx-xx-xx", + "phone_example" : "+375 21 654-98-71", + "currency" : "BYN", + "exchange" : 35, + "lang_id" : 1, + "group_type" : 2 + }, { + "id" : 4, + "title" : "Украина", + "full_title" : "Украина", + "phone_code" : "380", + "phone_template" : "+380 xx xxx-xx-xx", + "phone_example" : "+380 44 065-49-87", + "currency" : "₴", + "exchange" : 4, + "lang_id" : 7, + "group_type" : 2 + } ] + } + }, "securitySchemes" : { "bearerAuth" : { "type" : "http", From 9fb152cb676dbdce137d7bb328346ddba27668bc Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Thu, 15 Oct 2020 01:01:08 +0000 Subject: [PATCH 4/9] Fix method countries - add error 401. Add method cities, companies --- swagger/oas yclient.json | 831 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 831 insertions(+) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 4ce65f2..19fc032 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -19,6 +19,258 @@ "description" : "Справочники" } ], "paths" : { + "/api/v1/companies" : { + "get" : { + "tags" : [ "Companies" ], + "summary" : "Список компаний", + "description" : "### Метод позволяет получить список компаний:", + "operationId" : "GetCompanies", + "parameters" : [ { + "name" : "group_id", + "in" : "query", + "description" : "ID сети компаний (Если нужны объекты входящие в конкретную сеть)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "title", + "in" : "query", + "description" : "Поиск по вхождению подстроки в название компании", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "my", + "in" : "query", + "description" : "Только для авторизованного пользователя. Если нужно компании, на управление которыми пользователь имеет права", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "number", + "format" : "double", + "example" : 1 + } + }, { + "name" : "active", + "in" : "query", + "description" : "Если нужно получить только активные для онлайн-записи компании", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "number", + "format" : "double", + "example" : 1 + } + }, { + "name" : "moderated", + "in" : "query", + "description" : "Если нужно получить только прошедшие модерацию компании. Т.е. чей контент проверен для публикации", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "number", + "format" : "double", + "example" : 1 + } + }, { + "name" : "forBooking", + "in" : "query", + "description" : "Если нужно получить поле next_slot по каждой компании", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "number", + "format" : "double" + } + }, { + "name" : "show_groups", + "in" : "query", + "description" : "Включить в обьект компании список сетей в которые входит эта компания", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "city_id", + "in" : "query", + "description" : "ID города (см. метод - __cities__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, { + "name" : "coordinate_lat", + "in" : "query", + "description" : "Широта центра поиска по координатам", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "coordinate_lon", + "in" : "query", + "description" : "Долгота центра поиска по координатам", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "distance", + "in" : "query", + "description" : "Радиус поиска", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "count", + "in" : "query", + "description" : "Количество объектов на странице", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/company" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "500" : { + "description" : "Произошла ошибка" + } + } + } + }, + "/api/v1/company/{id}" : { + "get" : { + "tags" : [ "Companies" ], + "summary" : "Список компаний", + "operationId" : "GetCompany", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "ID объекта", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "forBooking", + "in" : "query", + "description" : "Включить в обьект компании список сетей в которые входит эта компания", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "number", + "format" : "double" + } + }, { + "name" : "show_groups", + "in" : "query", + "description" : "Включить в обьект компании список сетей в которые входит эта компания", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/company" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "500" : { + "description" : "Произошла ошибка" + } + }, + "deprecated" : false + } + }, "/api/v1/countries" : { "get" : { "tags" : [ "Directory" ], @@ -43,6 +295,89 @@ } } } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + } + } + }, + "/api/v1/cities" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список городов", + "description" : "### Метод позволяет получить список городов:\n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", + "operationId" : "getListOfCities", + "parameters" : [ { + "name" : "country_id", + "in" : "query", + "description" : "ID страны (см. метод - __countries__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, { + "name" : "salon_id", + "in" : "query", + "description" : "ID филиала", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_1" + } + }, + "examples" : { + "cities" : { + "$ref" : "#/components/examples/cities" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } } } } @@ -50,6 +385,292 @@ }, "components" : { "schemas" : { + "company" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Идентификатор компании" + }, + "title" : { + "type" : "string", + "description" : "Название компании" + }, + "public_title" : { + "type" : "string" + }, + "short_descr" : { + "type" : "string", + "description" : "Категория компании" + }, + "logo" : { + "type" : "string", + "description" : "Адрес изображения логотипа компании" + }, + "country_id" : { + "type" : "integer", + "description" : "Идентификатор страны, в которой расположена компания", + "format" : "int32" + }, + "country" : { + "type" : "string", + "description" : "Название старны компании" + }, + "city_id" : { + "type" : "integer", + "description" : "Идентификатор города, в котором расположена компания)", + "format" : "int32" + }, + "city" : { + "type" : "string", + "description" : "Название города компании" + }, + "active" : { + "type" : "string" + }, + "phone" : { + "type" : "string", + "description" : "Номер телефона компании" + }, + "phones" : { + "type" : "array", + "description" : "Номера телефонов", + "items" : { + "type" : "string" + } + }, + "timezone" : { + "type" : "integer", + "description" : "Timezone компании" + }, + "timezone_name" : { + "type" : "string", + "description" : "Timezone компании (название)" + }, + "schedule" : { + "type" : "string", + "description" : "Расписание работы компании" + }, + "address" : { + "type" : "string", + "description" : "Адрес, по которому расположена компания" + }, + "coordinate_lat" : { + "type" : "number", + "description" : "Широта, на которой расположена компания", + "format" : "float" + }, + "coordinate_lon" : { + "type" : "number", + "description" : "Долгота, на которой расположена компания", + "format" : "float" + }, + "app_ios" : { + "type" : "string", + "description" : "Ссылка на приложение под ios" + }, + "app_android" : { + "type" : "string", + "description" : "Ссылка на приложение под android" + }, + "phone_confirmation" : { + "type" : "boolean", + "description" : "Нужно ли подтверждать телефон по смс" + }, + "currency_short_title" : { + "type" : "string", + "description" : "Краткое обозначение валюты" + }, + "reminds_sms_disabled" : { + "type" : "boolean", + "description" : "True - если у компании выключен сервис SMS напоминаний клиентам" + }, + "reminds_sms_default" : { + "type" : "integer" + }, + "group_priority" : { + "type" : "integer", + "description" : "Чем больше приоритет, тем выше компания при выводе в списке филиалов сети", + "format" : "int32" + }, + "bookform_group_priority" : { + "type" : "integer" + }, + "description" : { + "type" : "string", + "description" : "Описание" + }, + "photos" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "seance_delay_step" : { + "type" : "integer" + }, + "show_any_master" : { + "type" : "boolean" + }, + "allow_delete_record" : { + "type" : "boolean", + "description" : "Удаление записи" + }, + "allow_change_record" : { + "type" : "boolean", + "description" : "Изменение записи" + }, + "allow_change_record_delay_step" : { + "type" : "integer", + "description" : "Запретить изменять записи за период. (В секундах)" + }, + "allow_delete_record_delay_step" : { + "type" : "integer", + "description" : "Запретить удалять записи за период. (В секундах)" + }, + "timetable_off" : { + "type" : "boolean" + }, + "site" : { + "type" : "string", + "description" : "Ссылка на сайт" + }, + "zip" : { + "type" : "string" + }, + "business_group_id" : { + "type" : "integer" + }, + "business_type_id" : { + "type" : "integer" + }, + "is_charge_active" : { + "type" : "boolean" + }, + "print_bill_on" : { + "type" : "integer" + }, + "print_bill_type" : { + "type" : "string" + }, + "record_type_id" : { + "type" : "integer" + }, + "auto_pay_account_id" : { + "type" : "integer" + }, + "auto_pay_bank_account_id" : { + "type" : "integer" + }, + "is_admin_app" : { + "type" : "integer" + }, + "push_notification_phone_confirm" : { + "type" : "integer" + }, + "switched_to_tariff" : { + "type" : "boolean" + }, + "sms_enabled" : { + "type" : "boolean" + }, + "activity_record_clients_count_max" : { + "type" : "integer" + }, + "activity_online_record_clients_count_max" : { + "type" : "integer" + }, + "is_individual" : { + "type" : "boolean" + }, + "social" : { + "$ref" : "#/components/schemas/social" + }, + "main_group_id" : { + "type" : "integer" + }, + "main_group" : { + "$ref" : "#/components/schemas/company_main_group" + }, + "active_staff_count" : { + "type" : "integer", + "description" : "Кол-во сотрудников доступных для бронирования", + "format" : "int32" + }, + "next_slot" : { + "type" : "string", + "description" : "Дата и время ближайшего свободного сеанса в компании(ISO8601). Поле будет присутствовать только если передан `GET параметр forBooking=1`" + }, + "booking_notify_text" : { + "type" : "string", + "description" : "Текст уведомления, которое выводится (если задано) на шаге ввода контактных данных" + }, + "booking_comment_input_name" : { + "type" : "string", + "description" : "Заголовок для поля с вводом комментария к записи (если не задано, то используется значение по умолчанию)" + }, + "booking_comment_required" : { + "type" : "boolean", + "description" : "Является ли поле с комментарием к записи обязательным для заполнения" + }, + "booking_email_required" : { + "type" : "boolean", + "description" : "Является ли поле Email к записи обязательным для заполнения" + } + } + }, + "social" : { + "type" : "object", + "properties" : { + "facebook" : { + "type" : "string", + "description" : "Аккаунт в Facebook" + }, + "vk" : { + "type" : "string", + "description" : "Аккаунт во Вконтакте" + }, + "instagram" : { + "type" : "string", + "description" : "Аккаунт в Instagram" + }, + "telegram" : { + "type" : "string", + "description" : "Аккаунт в Telegram" + }, + "whatsapp" : { + "type" : "string", + "description" : "Аккаунт в Whatsapp" + }, + "viber" : { + "type" : "string", + "description" : "Аккаунт в Viber" + } + } + }, + "errors" : { + "type" : "object", + "properties" : { + "errors" : { + "$ref" : "#/components/schemas/errors_errors" + } + } + }, + "inline_response_401" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean", + "description" : "флаг показывающий, что ответ выполнен c ошибкой (false)" + }, + "data" : { + "nullable" : true + }, + "meta" : { + "$ref" : "#/components/schemas/inline_response_401_meta" + } + } + }, "inline_response_200" : { "required" : [ "currency", "exchange", "full_title", "id", "phone_code", "phone_example", "phone_template", "title" ], "type" : "object", @@ -94,6 +715,200 @@ "type" : "integer" } } + }, + "inline_response_200_1" : { + "required" : [ "country_id", "id", "title" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "ID города" + }, + "country_id" : { + "type" : "integer", + "description" : "ID страны" + }, + "title" : { + "type" : "string", + "description" : "Краткое название города" + } + } + }, + "company_main_group" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + } + } + }, + "errors_errors" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "description" : "Код ошибки" + }, + "message" : { + "type" : "string", + "description" : "Текст ошибки" + } + } + }, + "inline_response_401_meta" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + } + } + } + }, + "responses" : { + "401_Unauthorized" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "parameters" : { + "id" : { + "name" : "id", + "in" : "path", + "description" : "ID объекта", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + }, + "country_id" : { + "name" : "country_id", + "in" : "query", + "description" : "ID страны (см. метод - __countries__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, + "city_id" : { + "name" : "city_id", + "in" : "query", + "description" : "ID города (см. метод - __cities__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, + "salon_id" : { + "name" : "salon_id", + "in" : "query", + "description" : "ID филиала", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, + "coordinate_lat" : { + "name" : "coordinate_lat", + "in" : "query", + "description" : "Широта центра поиска по координатам", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, + "coordinate_lon" : { + "name" : "coordinate_lon", + "in" : "query", + "description" : "Долгота центра поиска по координатам", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, + "distance" : { + "name" : "distance", + "in" : "query", + "description" : "Радиус поиска", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, + "count" : { + "name" : "count", + "in" : "query", + "description" : "Количество объектов на странице", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, + "page" : { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, + "show_groups" : { + "name" : "show_groups", + "in" : "query", + "description" : "Включить в обьект компании список сетей в которые входит эта компания", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, + "group_id" : { + "name" : "group_id", + "in" : "query", + "description" : "ID сети компаний (Если нужны объекты входящие в конкретную сеть)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } } }, "examples" : { @@ -143,6 +958,17 @@ "lang_id" : 7, "group_type" : 2 } ] + }, + "cities" : { + "value" : [ { + "id" : 2355, + "country_id" : 2, + "title" : "Daugavpils" + }, { + "id" : 1430, + "country_id" : 2, + "title" : "Jurmala" + } ] } }, "securitySchemes" : { @@ -150,6 +976,11 @@ "type" : "http", "scheme" : "bearer", "bearerFormat" : "JWT" + }, + "bearerUserAuth" : { + "type" : "http", + "scheme" : "bearer", + "bearerFormat" : "JWT" } } } From 38047173bbafc1a52d597814f3273eaa4ebd696d Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Fri, 16 Oct 2020 01:01:18 +0000 Subject: [PATCH 5/9] Fix company model Add methods: auth, company{id}put --- swagger/oas yclient.json | 363 ++++++++++++++++++++++++++++++++++----- 1 file changed, 322 insertions(+), 41 deletions(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 19fc032..9130f82 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -11,20 +11,75 @@ "servers" : [ { "url" : "https://api.yclients.com" } ], - "security" : [ { - "bearerAuth" : [ ] - } ], "tags" : [ { "name" : "Directory", "description" : "Справочники" } ], "paths" : { + "/api/v1/auth" : { + "post" : { + "tags" : [ "Authorization" ], + "summary" : "Получение API-ключа пользователя", + "description" : "## Метод позволяет получить API-ключ пользователя\n ---\n__Авторизация с ключом Партнера__", + "operationId" : "getUserToken", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200" + }, + "example" : { + "0" : "1234ccbbeeff1234aaddff77ee338811", + "id" : 100001, + "user_token" : "1234ccbbeeff1234aaddff77ee338811", + "name" : "Example_user", + "phone" : "7xxxxxxxxxx", + "login" : "7xxxxxxxxxx", + "email" : "user@example.com", + "avatar" : "https://api.yclients.com/images/no-master.png" + } + } + } + }, + "404" : { + "description" : "Пользователя с такими параметрами авторизации не существует", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Пользователя с такими параметрами авторизации не существует" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, "/api/v1/companies" : { "get" : { "tags" : [ "Companies" ], "summary" : "Список компаний", - "description" : "### Метод позволяет получить список компаний:", - "operationId" : "GetCompanies", + "description" : "### Метод позволяет получить список компаний:\n ---\n__Возможна авторизация с ключами:__\n - __Партнера__;\n - __Партнера__ и __пользователя__.", + "operationId" : "getCompanies", "parameters" : [ { "name" : "group_id", "in" : "query", @@ -53,8 +108,7 @@ "style" : "form", "explode" : true, "schema" : { - "type" : "number", - "format" : "double", + "type" : "integer", "example" : 1 } }, { @@ -65,8 +119,7 @@ "style" : "form", "explode" : true, "schema" : { - "type" : "number", - "format" : "double", + "type" : "integer", "example" : 1 } }, { @@ -77,8 +130,7 @@ "style" : "form", "explode" : true, "schema" : { - "type" : "number", - "format" : "double", + "type" : "integer", "example" : 1 } }, { @@ -89,8 +141,8 @@ "style" : "form", "explode" : true, "schema" : { - "type" : "number", - "format" : "double" + "type" : "integer", + "example" : 1 } }, { "name" : "show_groups", @@ -172,7 +224,22 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/company" + "allOf" : [ { + "$ref" : "#/components/schemas/company" + }, { + "$ref" : "#/components/schemas/access" + }, { + "type" : "object", + "properties" : { + "balance" : { + "type" : "integer" + }, + "sms_price" : { + "type" : "number", + "format" : "float" + } + } + } ] } } } @@ -197,13 +264,20 @@ "500" : { "description" : "Произошла ошибка" } - } + }, + "deprecated" : false, + "security" : [ { + "bearerPartner" : [ ] + }, { + "bearerPartnerUser" : [ ] + } ] } }, "/api/v1/company/{id}" : { "get" : { "tags" : [ "Companies" ], - "summary" : "Список компаний", + "summary" : "Получить компанию", + "description" : "### Метод позволяет получить компанию: # --- __Авторизация с ключом Партнера__", "operationId" : "GetCompany", "parameters" : [ { "name" : "id", @@ -223,8 +297,7 @@ "style" : "form", "explode" : true, "schema" : { - "type" : "number", - "format" : "double" + "type" : "integer" } }, { "name" : "show_groups", @@ -268,15 +341,72 @@ "description" : "Произошла ошибка" } }, - "deprecated" : false + "deprecated" : false, + "security" : [ { + "bearerPartner" : [ ] + } ] + }, + "put" : { + "tags" : [ "Companies" ], + "summary" : "Изменить компанию", + "description" : "### Метод позволяет изменить компанию:\n ---\n__Авторизация с ключами: партнера и пользователя __", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "ID объекта", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body_1" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно" + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] } }, "/api/v1/countries" : { "get" : { "tags" : [ "Directory" ], "summary" : "Список стран", - "description" : "### Метод позволяет получить список стран:", + "description" : "### Метод позволяет получить список стран\n ---\n__Авторизация с ключом Партнера__", "operationId" : "getListOfCountries", + "parameters" : [ { + "name" : "count", + "in" : "query", + "description" : "Количество объектов на странице", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + } ], "responses" : { "200" : { "description" : "Запрос выполнен успешно", @@ -285,7 +415,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200" + "$ref" : "#/components/schemas/inline_response_200_1" } }, "examples" : { @@ -312,14 +442,17 @@ } } } - } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] } }, "/api/v1/cities" : { "get" : { "tags" : [ "Directory" ], "summary" : "Список городов", - "description" : "### Метод позволяет получить список городов:\n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", + "description" : "### Метод позволяет получить список городов\n ---\n __Авторизация с ключом Партнера__\n \n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", "operationId" : "getListOfCities", "parameters" : [ { "name" : "country_id", @@ -352,7 +485,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200_1" + "$ref" : "#/components/schemas/inline_response_200_2" } }, "examples" : { @@ -379,7 +512,10 @@ } } } - } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] } } }, @@ -394,10 +530,11 @@ }, "title" : { "type" : "string", - "description" : "Название компании" + "description" : "Название филиала (Используется внутри системы)" }, "public_title" : { - "type" : "string" + "type" : "string", + "description" : "Название компании (Используется на внешних ресурсах)" }, "short_descr" : { "type" : "string", @@ -414,7 +551,7 @@ }, "country" : { "type" : "string", - "description" : "Название старны компании" + "description" : "Название страны компании" }, "city_id" : { "type" : "integer", @@ -426,7 +563,7 @@ "description" : "Название города компании" }, "active" : { - "type" : "string" + "type" : "integer" }, "phone" : { "type" : "string", @@ -434,7 +571,7 @@ }, "phones" : { "type" : "array", - "description" : "Номера телефонов", + "description" : "Номера телефонов компании", "items" : { "type" : "string" } @@ -536,7 +673,8 @@ "description" : "Ссылка на сайт" }, "zip" : { - "type" : "string" + "type" : "integer", + "description" : "Почтовый код (индекс)" }, "business_group_id" : { "type" : "integer" @@ -587,7 +725,8 @@ "$ref" : "#/components/schemas/social" }, "main_group_id" : { - "type" : "integer" + "type" : "integer", + "description" : "ID основного филиала" }, "main_group" : { "$ref" : "#/components/schemas/company_main_group" @@ -648,6 +787,15 @@ } } }, + "access" : { + "type" : "object", + "properties" : { + "access" : { + "type" : "object", + "description" : "Список прав (Только для авторизованного пользователя)" + } + } + }, "errors" : { "type" : "object", "properties" : { @@ -656,6 +804,50 @@ } } }, + "body" : { + "type" : "object", + "properties" : { + "login" : { + "type" : "string", + "description" : "В качестве логина может быть использован номер телефона пользователя в формате 79161234567 или его Email" + }, + "password" : { + "type" : "string", + "description" : "Пароль пользователя" + } + } + }, + "inline_response_200" : { + "type" : "object", + "properties" : { + "0" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "user_token" : { + "type" : "string", + "description" : "API-ключа пользователя" + }, + "name" : { + "type" : "string", + "description" : "Имя пользователя" + }, + "phone" : { + "type" : "string" + }, + "login" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "avatar" : { + "type" : "string" + } + } + }, "inline_response_401" : { "type" : "object", "properties" : { @@ -671,8 +863,95 @@ } } }, - "inline_response_200" : { - "required" : [ "currency", "exchange", "full_title", "id", "phone_code", "phone_example", "phone_template", "title" ], + "apiv1companyid_social" : { + "type" : "object", + "properties" : { + "vk" : { + "type" : "string", + "description" : "Аккаунт во Вконтакте" + }, + "instagram" : { + "type" : "string", + "description" : "Аккаунт в Instagram" + }, + "telegram" : { + "type" : "string", + "description" : "Аккаунт в Telegram" + } + } + }, + "body_1" : { + "required" : [ "title" ], + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "Название филиала (Используется внутри системы)" + }, + "short_descr" : { + "type" : "string", + "description" : "Категория компании" + }, + "country_id" : { + "type" : "integer", + "description" : "Идентификатор страны кампании (одно из двух \\ country)" + }, + "country" : { + "type" : "string", + "description" : "Название страны кампании (одно из двух \\ country_id)" + }, + "city_id" : { + "type" : "integer" + }, + "city" : { + "type" : "string" + }, + "phones" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "timezone" : { + "type" : "integer" + }, + "address" : { + "type" : "string" + }, + "coordinate_lat" : { + "type" : "number", + "description" : "Широта, на которой расположена компания", + "format" : "float" + }, + "coordinate_lon" : { + "type" : "number", + "description" : "Долгота, на которой расположена компания", + "format" : "float" + }, + "description" : { + "type" : "string", + "description" : "Описание" + }, + "site" : { + "type" : "string", + "description" : "Ссылка на сайт" + }, + "zip" : { + "type" : "integer", + "description" : "Почтовый код (индекс)" + }, + "business_group_id" : { + "type" : "integer" + }, + "business_type_id" : { + "type" : "integer" + }, + "social" : { + "$ref" : "#/components/schemas/apiv1companyid_social" + } + } + }, + "inline_response_200_1" : { "type" : "object", "properties" : { "id" : { @@ -716,8 +995,7 @@ } } }, - "inline_response_200_1" : { - "required" : [ "country_id", "id", "title" ], + "inline_response_200_2" : { "type" : "object", "properties" : { "id" : { @@ -738,12 +1016,15 @@ "type" : "object", "properties" : { "id" : { - "type" : "integer" + "type" : "integer", + "description" : "ID основного филиала" }, "title" : { - "type" : "string" + "type" : "string", + "description" : "ID наименование филиала" } - } + }, + "description" : "Объект с информацией об основном филиале" }, "errors_errors" : { "type" : "object", @@ -972,12 +1253,12 @@ } }, "securitySchemes" : { - "bearerAuth" : { + "bearerPartner" : { "type" : "http", "scheme" : "bearer", "bearerFormat" : "JWT" }, - "bearerUserAuth" : { + "bearerPartnerUser" : { "type" : "http", "scheme" : "bearer", "bearerFormat" : "JWT" From ad45aaf92810f44a4597f8bcd82debe170fec09e Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Tue, 20 Oct 2020 01:42:10 +0000 Subject: [PATCH 6/9] fix path; add: users, staff --- swagger/oas yclient.json | 1921 +++++++++++++++++++++++++++++++++++++- 1 file changed, 1883 insertions(+), 38 deletions(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 9130f82..df0918e 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -9,14 +9,29 @@ "version" : "2.0.0" }, "servers" : [ { - "url" : "https://api.yclients.com" + "url" : "https://api.yclients.com/api/v1" } ], "tags" : [ { + "name" : "Authorization", + "description" : "Авторизация пользователя" + }, { + "name" : "Companies", + "description" : "Компании и сети" + }, { + "name" : "Staff", + "description" : "Сотрудники компании" + }, { + "name" : "Users", + "description" : "Пользователи компании" + }, { "name" : "Directory", "description" : "Справочники" + }, { + "name" : "ToDo", + "description" : "Доработать" } ], "paths" : { - "/api/v1/auth" : { + "/auth" : { "post" : { "tags" : [ "Authorization" ], "summary" : "Получение API-ключа пользователя", @@ -74,11 +89,11 @@ } ] } }, - "/api/v1/companies" : { + "/companies" : { "get" : { "tags" : [ "Companies" ], "summary" : "Список компаний", - "description" : "### Метод позволяет получить список компаний:\n ---\n__Возможна авторизация с ключами:__\n - __Партнера__;\n - __Партнера__ и __пользователя__.", + "description" : "### Метод позволяет получить список компаний\n ---\n__Возможна авторизация с ключами:__\n - __Партнера__;\n - __Партнера__ и __пользователя__.", "operationId" : "getCompanies", "parameters" : [ { "name" : "group_id", @@ -273,11 +288,11 @@ } ] } }, - "/api/v1/company/{id}" : { + "/company/{id}" : { "get" : { "tags" : [ "Companies" ], "summary" : "Получить компанию", - "description" : "### Метод позволяет получить компанию: # --- __Авторизация с ключом Партнера__", + "description" : "### Метод позволяет получить компанию:\n ---\n__Авторизация с ключом партнера__", "operationId" : "GetCompany", "parameters" : [ { "name" : "id", @@ -349,7 +364,7 @@ "put" : { "tags" : [ "Companies" ], "summary" : "Изменить компанию", - "description" : "### Метод позволяет изменить компанию:\n ---\n__Авторизация с ключами: партнера и пользователя __", + "description" : "### Метод позволяет изменить компанию\n\n ---\n__Авторизация с ключами: партнера и пользователя__", "parameters" : [ { "name" : "id", "in" : "path", @@ -372,7 +387,731 @@ }, "responses" : { "200" : { - "description" : "Запрос выполнен успешно" + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_1" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "500" : { + "description" : "Произошла ошибка" + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/groups" : { + "get" : { + "tags" : [ "Companies" ], + "summary" : "Список сетей салонов", + "description" : "### Метод позволяет получить список доступных пользователю сетей\n ---\n__Авторизация с ключами партнера и пользователя__", + "operationId" : "GetNetworksAvailableToUser", + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_2" + }, + "examples" : { + "groups" : { + "$ref" : "#/components/examples/groups" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/company/{company_id}/staff" : { + "get" : { + "tags" : [ "Staff" ], + "summary" : "Список сотрудников", + "description" : "### Метод позволяет получить список сотрудников компании\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_3" + }, + "examples" : { + "staff" : { + "$ref" : "#/components/examples/staff" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/company/{company_id}/staff/{staff_id}" : { + "get" : { + "tags" : [ "Staff" ], + "summary" : "Сотрудник по ID", + "description" : "### Метод позволяет получить сотрудника компании по ID\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "staff_id", + "in" : "path", + "description" : "ID сотрудника", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_4" + }, + "examples" : { + "employee" : { + "$ref" : "#/components/examples/employee" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/staff/{company_id}" : { + "get" : { + "tags" : [ "Staff" ], + "summary" : "Устаревшее. Список сотрудников", + "description" : "### Метод позволяет список сотрудников компании\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/user" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "post" : { + "tags" : [ "Staff" ], + "summary" : "Создание сотрудника", + "description" : "### Метод позволяет создать сотрудника компании\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/staff_create_update" + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/200_staff_post_put" + }, + "examples" : { + "staff" : { + "$ref" : "#/components/examples/staff_post" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/staff/{company_id}/{staff_id}" : { + "get" : { + "tags" : [ "Staff" ], + "summary" : "Устаревшее. Поиск сотрудника по ID", + "description" : "### Метод позволяет получить сотрудника компании по ID\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "staff_id", + "in" : "path", + "description" : "ID сотрудника", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_5" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "put" : { + "tags" : [ "Staff" ], + "summary" : "Изменить сотрудника по ID", + "description" : "### Метод позволяет изменить данные сотрудника компании по ID\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "staff_id", + "in" : "path", + "description" : "ID сотрудника", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/staff_create_update" + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/200_staff_post_put" + }, + "examples" : { + "staff" : { + "$ref" : "#/components/examples/staff_put" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "delete" : { + "tags" : [ "Staff" ], + "summary" : "Удалить сотрудника по ID", + "description" : "### Метод позволяет удалить данные сотрудника компании по ID\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "staff_id", + "in" : "path", + "description" : "ID сотрудника", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "204" : { + "description" : "Сотрудник успешно удален (Метод не возвращает тело)", + "headers" : { + "status" : { + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "204 No Content" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/company_users/{company_id}" : { + "get" : { + "tags" : [ "Users" ], + "summary" : "Коллекция пользователей", + "description" : "### Метод позволяет получить список пользователей компании\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_6" + } + }, + "examples" : { + "user" : { + "$ref" : "#/components/examples/user" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } } }, "security" : [ { @@ -380,7 +1119,7 @@ } ] } }, - "/api/v1/countries" : { + "/countries" : { "get" : { "tags" : [ "Directory" ], "summary" : "Список стран", @@ -415,7 +1154,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200_1" + "$ref" : "#/components/schemas/inline_response_200_7" } }, "examples" : { @@ -448,7 +1187,7 @@ } ] } }, - "/api/v1/cities" : { + "/cities" : { "get" : { "tags" : [ "Directory" ], "summary" : "Список городов", @@ -485,7 +1224,7 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200_2" + "$ref" : "#/components/schemas/inline_response_200_8" } }, "examples" : { @@ -769,30 +1508,428 @@ "type" : "string", "description" : "Аккаунт во Вконтакте" }, - "instagram" : { + "instagram" : { + "type" : "string", + "description" : "Аккаунт в Instagram" + }, + "telegram" : { + "type" : "string", + "description" : "Аккаунт в Telegram" + }, + "whatsapp" : { + "type" : "string", + "description" : "Аккаунт в Whatsapp" + }, + "viber" : { + "type" : "string", + "description" : "Аккаунт в Viber" + } + } + }, + "access" : { + "type" : "object", + "properties" : { + "access" : { + "type" : "object", + "description" : "Объект с правами доступа для управления компанией (Только для авторизованного пользователя)" + } + } + }, + "access_group" : { + "type" : "object", + "properties" : { + "access" : { + "$ref" : "#/components/schemas/access_group_access" + } + } + }, + "staff_new" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Идентификатор сотрудника" + }, + "name" : { + "type" : "string", + "description" : "Имя сотрудника" + }, + "company_id" : { + "type" : "integer", + "description" : "Идентификатор компании" + }, + "specialization" : { + "type" : "string", + "description" : "Специализация сотрудника" + }, + "avatar" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника" + }, + "avatar_big" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника в более высоком разрешении" + }, + "fired" : { + "type" : "integer", + "description" : "статус увольнения (1 - уволен, 0 - не уволен)" + }, + "status" : { + "type" : "integer" + }, + "hidden" : { + "type" : "integer", + "description" : "1 - скрыт от онлайн записей, 0 - не скрыт" + }, + "position" : { + "$ref" : "#/components/schemas/staff_position" + } + } + }, + "user" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Идентификатор сотрудника" + }, + "api_id" : { + "type" : "string", + "description" : "Внешний идентификатор сотрудника", + "nullable" : true + }, + "name" : { + "type" : "string", + "description" : "Имя сотрудника" + }, + "specialization" : { + "type" : "string", + "description" : "Специализация сотрудника" + }, + "rating" : { + "type" : "integer", + "description" : "Ретинг сотрудника" + }, + "show_rating" : { + "type" : "integer", + "description" : "Показывать ли рейтинг сотрудника (1 - показывать, 0 - не показывать)" + }, + "avatar" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника" + }, + "avatar_big" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника в более высоком разрешении" + }, + "comments_count" : { + "type" : "integer", + "description" : "Кол-во комментариев к сотрунику" + }, + "votes_count" : { + "type" : "integer", + "description" : "Кол-во голос, оценивших сотрудника" + }, + "bookable" : { + "type" : "boolean" + }, + "image_group" : { + "$ref" : "#/components/schemas/image_group" + }, + "information" : { + "type" : "string", + "description" : "Дополнительная информация о сотруднике (HTML формат)" + }, + "position_id" : { + "type" : "integer" + }, + "schedule_till" : { + "type" : "string" + }, + "weight" : { + "type" : "integer", + "description" : "Вес сотрудника. При выводе сотрудники сортируются по весу, сначала более тяжелые" + }, + "fired" : { + "type" : "integer", + "description" : "статус увольнения (1 - уволен, 0 - не уволен)" + }, + "status" : { + "type" : "integer" + }, + "hidden" : { + "type" : "integer", + "description" : "1 - скрыт от онлайн записей, 0 - не скрыт" + }, + "user" : { + "$ref" : "#/components/schemas/user_simple" + }, + "prepaid" : { + "type" : "string" + }, + "position" : { + "$ref" : "#/components/schemas/staff_position" + }, + "additional_info" : { + "$ref" : "#/components/schemas/user_additional_info" + } + } + }, + "user_simple" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string", + "description" : "login" + }, + "firstname" : { + "type" : "string", + "description" : "Имя" + }, + "phone" : { + "type" : "string", + "description" : "Номер телефона" + }, + "email" : { + "type" : "string", + "description" : "E-mail" + }, + "deleted" : { + "type" : "integer" + }, + "group_id" : { + "type" : "integer" + }, + "team_id" : { + "type" : "integer" + }, + "city_id" : { + "type" : "integer", + "description" : "Id-города" + }, + "ext" : { + "type" : "integer" + }, + "amo_user_id" : { + "type" : "integer" + }, + "amo_contact_id" : { + "type" : "integer" + }, + "avatar" : { + "type" : "string" + } + } + }, + "user_additional_info" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Имя" + }, + "surname" : { + "type" : "string", + "description" : "Фамилия" + }, + "patronymic" : { + "type" : "string", + "description" : "Отчество" + }, + "date_admission" : { + "type" : "string", + "description" : "Дата приема на работу" + }, + "date_registration_end" : { + "type" : "string", + "description" : "Дата окончания регистрации/патента" + }, + "phone_number" : { + "type" : "string", + "description" : "Номер телефона" + }, + "citizenship" : { + "type" : "string", + "description" : "Гражданство" + }, + "sex" : { + "type" : "string", + "description" : "Пол" + }, + "sex_id" : { + "type" : "integer", + "description" : "Пол (id)" + }, + "passport_data" : { + "type" : "string", + "description" : "Паспортные данные" + }, + "inn" : { + "type" : "string", + "description" : "ИНН" + }, + "number_insurance_certificates" : { + "type" : "string", + "description" : "Номер страхового свидетельства" + } + } + }, + "image_group" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "entity" : { + "type" : "string" + }, + "entity_id" : { + "type" : "integer" + }, + "images" : { + "$ref" : "#/components/schemas/image_group_images" + } + }, + "description" : "Группа изображений сотрудника" + }, + "image" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "path" : { + "type" : "string" + }, + "width" : { + "type" : "string" + }, + "height" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "description" : "file extension (for example .jpeg)" + }, + "image_group_id" : { + "type" : "integer" + }, + "version" : { + "type" : "string", + "description" : "sm / norm / origin" + } + } + }, + "staff_position" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Должность (id)" + }, + "title" : { + "type" : "string", + "description" : "Должность (наименование)" + } + }, + "description" : "Должность сотрудника" + }, + "meta" : { + "type" : "object", + "properties" : { + "total" : { + "type" : "integer", + "description" : "Всего найдено" + }, + "total_count" : { + "type" : "integer", + "description" : "Максимальное количество записей выводимых на странице" + } + } + }, + "200_staff_post_put" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Идентификатор сотрудника" + }, + "api_id" : { + "type" : "string", + "description" : "Внешний идентификатор сотрудника", + "nullable" : true + }, + "name" : { + "type" : "string", + "description" : "Имя сотрудника" + }, + "specialization" : { + "type" : "string", + "description" : "Специализация сотрудника" + }, + "position" : { + "$ref" : "#/components/schemas/staff_position" + }, + "show_rating" : { + "type" : "integer", + "description" : "Показывать ли рейтинг сотрудника (1 - показывать, 0 - не показывать)" + }, + "rating" : { + "type" : "integer", + "description" : "Ретинг сотрудника" + }, + "votes_count" : { + "type" : "integer", + "description" : "Кол-во голос, оценивших сотрудника" + }, + "avatar" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника" + }, + "avatar_big" : { + "type" : "string", + "description" : "Путь к файлу аватарки сотрудника в более высоком разрешении" + }, + "comments_count" : { + "type" : "integer", + "description" : "Кол-во комментариев к сотрунику" + }, + "weight" : { + "type" : "integer", + "description" : "Вес сотрудника. При выводе сотрудники сортируются по весу, сначала более тяжелые" + }, + "information" : { "type" : "string", - "description" : "Аккаунт в Instagram" + "description" : "Дополнительная информация о сотруднике (HTML формат)" }, - "telegram" : { - "type" : "string", - "description" : "Аккаунт в Telegram" + "hidden" : { + "type" : "integer", + "description" : "1 - скрыт от онлайн записей, 0 - не скрыт" }, - "whatsapp" : { - "type" : "string", - "description" : "Аккаунт в Whatsapp" + "fired" : { + "type" : "integer", + "description" : "статус увольнения (1 - уволен, 0 - не уволен)" }, - "viber" : { - "type" : "string", - "description" : "Аккаунт в Viber" - } - } - }, - "access" : { - "type" : "object", - "properties" : { - "access" : { - "type" : "object", - "description" : "Список прав (Только для авторизованного пользователя)" + "status" : { + "type" : "integer" + }, + "position_id" : { + "type" : "integer" + }, + "schedule_till" : { + "type" : "string" + }, + "image_group" : { + "$ref" : "#/components/schemas/image_group" + }, + "prepaid" : { + "type" : "string" + }, + "user" : { + "$ref" : "#/components/schemas/user_simple" } } }, @@ -863,7 +2000,7 @@ } } }, - "apiv1companyid_social" : { + "companyid_social" : { "type" : "object", "properties" : { "vk" : { @@ -881,7 +2018,7 @@ } }, "body_1" : { - "required" : [ "title" ], + "required" : [ "timezone", "title" ], "type" : "object", "properties" : { "title" : { @@ -913,7 +2050,8 @@ } }, "timezone" : { - "type" : "integer" + "type" : "integer", + "description" : "Timezone компании (необязательно, но стирается если при обновлениии не указать)" }, "address" : { "type" : "string" @@ -947,11 +2085,154 @@ "type" : "integer" }, "social" : { - "$ref" : "#/components/schemas/apiv1companyid_social" + "$ref" : "#/components/schemas/companyid_social" } } }, "inline_response_200_1" : { + "allOf" : [ { + "$ref" : "#/components/schemas/company" + }, { + "$ref" : "#/components/schemas/access" + }, { + "type" : "object", + "properties" : { + "balance" : { + "type" : "integer" + }, + "sms_price" : { + "type" : "number", + "format" : "float" + } + } + } ] + }, + "inline_response_200_2" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean", + "description" : "флаг показывающий, что ответ выполнен без ошибок (true)" + }, + "data" : { + "type" : "array", + "items" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Id сети салонов" + }, + "title" : { + "type" : "string", + "description" : "Название сети салонов" + }, + "companies" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Идентификатор компании" + }, + "title" : { + "type" : "string", + "description" : "Название филиала" + } + } + } + } + } + }, { + "$ref" : "#/components/schemas/access_group" + } ] + } + }, + "meta" : { + "$ref" : "#/components/schemas/inline_response_200_2_meta" + } + } + }, + "inline_response_200_3" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean", + "description" : "флаг показывающий, что ответ выполнен без ошибок (true)" + }, + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/staff_new" + } + }, + "meta" : { + "$ref" : "#/components/schemas/meta" + } + } + }, + "inline_response_200_4" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean", + "description" : "флаг показывающий, что ответ выполнен без ошибок (true)" + }, + "data" : { + "$ref" : "#/components/schemas/staff_new" + }, + "meta" : { + "$ref" : "#/components/schemas/meta" + } + } + }, + "inline_response_200_5" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean", + "description" : "флаг показывающий, что ответ выполнен без ошибок (true)" + }, + "data" : { + "$ref" : "#/components/schemas/user" + }, + "meta" : { + "$ref" : "#/components/schemas/meta" + } + } + }, + "inline_response_200_6" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "Id пользователя" + }, + "firstname" : { + "type" : "string", + "description" : "Имя пользователя" + }, + "login" : { + "type" : "string", + "description" : "login пользователя для авторизации в системе (для авторизации так же можно в качестве логина поля phone и email)" + }, + "email" : { + "type" : "string", + "description" : "Почтовый адрес пользователя" + }, + "phone" : { + "type" : "string", + "description" : "Телефон пользоватя" + }, + "access" : { + "type" : "object", + "description" : "Объект прав доступа пользоватей к модулям системы" + } + } + }, + "inline_response_200_7" : { "type" : "object", "properties" : { "id" : { @@ -995,7 +2276,7 @@ } } }, - "inline_response_200_2" : { + "inline_response_200_8" : { "type" : "object", "properties" : { "id" : { @@ -1026,6 +2307,71 @@ }, "description" : "Объект с информацией об основном филиале" }, + "access_group_access" : { + "type" : "object", + "properties" : { + "settings_access" : { + "type" : "integer" + }, + "clients_access" : { + "type" : "integer" + }, + "deposits_access" : { + "type" : "integer" + }, + "deposit_types_access" : { + "type" : "integer" + }, + "users_access" : { + "type" : "integer" + }, + "loyalty_access" : { + "type" : "integer" + }, + "loyalty_abonement_types_access" : { + "type" : "integer" + }, + "loyalty_abonement_balance_edit_access" : { + "type" : "integer" + }, + "loyalty_abonement_period_edit_access" : { + "type" : "integer" + }, + "loyalty_abonement_history_access" : { + "type" : "integer" + }, + "loyalty_cards_manual_transactions_access" : { + "type" : "integer" + }, + "loyalty_certificate_types_access" : { + "type" : "integer" + }, + "loyalty_programs_access" : { + "type" : "integer" + }, + "network_services_access" : { + "type" : "integer" + }, + "analytics_access" : { + "type" : "integer" + } + }, + "description" : "Объект с правами доступа для управления сетью" + }, + "image_group_images" : { + "type" : "object", + "properties" : { + "sm" : { + "$ref" : "#/components/schemas/image" + }, + "norm" : { + "$ref" : "#/components/schemas/image" + }, + "origin" : { + "$ref" : "#/components/schemas/image" + } + } + }, "errors_errors" : { "type" : "object", "properties" : { @@ -1046,6 +2392,14 @@ "type" : "string" } } + }, + "inline_response_200_2_meta" : { + "type" : "object", + "properties" : { + "total_count" : { + "type" : "integer" + } + } } }, "responses" : { @@ -1064,10 +2418,54 @@ } } } + }, + "404_not_found_company" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + }, + "404_not_found_company_staff" : { + "description" : "Не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "examples" : { + "company" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором <_____> не найдено" + } + } + }, + "staff" : { + "value" : { + "errors" : { + "code" : 404, + "message" : "Сотрудник с идентификатором <_____> не существует" + } + } + } + } + } + } } }, "parameters" : { - "id" : { + "id_path" : { "name" : "id", "in" : "path", "description" : "ID объекта", @@ -1078,6 +2476,28 @@ "type" : "string" } }, + "company_id_path" : { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, + "staff_id_path" : { + "name" : "staff_id", + "in" : "path", + "description" : "ID сотрудника", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, "country_id" : { "name" : "country_id", "in" : "query", @@ -1102,6 +2522,17 @@ "example" : 1 } }, + "company_id" : { + "name" : "company_id", + "in" : "path", + "description" : "ID компании", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, "salon_id" : { "name" : "salon_id", "in" : "query", @@ -1250,6 +2681,420 @@ "country_id" : 2, "title" : "Jurmala" } ] + }, + "groups" : { + "value" : { + "success" : true, + "data" : [ { + "id" : 3100001, + "title" : "Сеть example 1", + "companies" : [ { + "id" : 3922222, + "title" : "Company example 1" + }, { + "id" : 3922223, + "title" : "Company example 2" + } ], + "access" : { + "settings_access" : 1, + "clients_access" : 1, + "deposits_access" : 1, + "deposit_types_access" : 1, + "users_access" : 1, + "loyalty_access" : 1, + "loyalty_abonement_types_access" : 1, + "loyalty_abonement_balance_edit_access" : 1, + "loyalty_abonement_period_edit_access" : 1, + "loyalty_abonement_history_access" : 1, + "loyalty_cards_manual_transactions_access" : 1, + "loyalty_certificate_types_access" : 1, + "loyalty_programs_access" : 1, + "network_services_access" : 1, + "analytics_access" : 1 + } + } ], + "meta" : [ ] + } + }, + "user" : { + "value" : [ { + "id" : 9090909, + "firstname" : "Exaploff", + "login" : "79998883322", + "email" : "examploff@test.com", + "phone" : "79998883322", + "access" : { + "timetable_access" : true, + "master_id" : 0, + "position_id" : 0, + "last_days_count" : 1000, + "schedule_edit_access" : true, + "timetable_phones_access" : true, + "timetable_transferring_record_access" : true, + "timetable_statistics_access" : true, + "record_form_access" : true, + "record_form_client_access" : true, + "records_autocomplete_access" : true, + "create_records_access" : true, + "edit_records_access" : true, + "edit_records_attendance_access" : true, + "records_services_cost_access" : true, + "records_services_discount_access" : true, + "record_edit_full_paid_access" : true, + "record_edit_full_paid_client_came_access" : true, + "record_edit_full_paid_client_confirm_access" : true, + "delete_records_access" : true, + "delete_customer_came_records_access" : true, + "delete_paid_records_access" : true, + "records_goods_access" : true, + "records_goods_create_transaction_access" : true, + "records_goods_create_last_days_count" : -1, + "records_goods_edit_transaction_access" : true, + "records_goods_edit_last_days_count" : -1, + "records_goods_cost_access" : true, + "records_goods_discount_access" : true, + "records_finances_access" : true, + "records_finances_last_days_count" : -1, + "records_finances_pay_from_deposits_access" : true, + "records_group_id_access" : false, + "records_group_id" : 0, + "finances_access" : true, + "finances_accounts_ids" : [ ], + "finances_transactions_access" : true, + "finances_last_days_count" : -1, + "finances_create_transactions_access" : true, + "finances_create_last_days_count" : -1, + "finances_edit_transactions_access" : true, + "finances_edit_last_days_count" : -1, + "finances_delete_transactions_access" : true, + "finances_transactions_excel_access" : true, + "finances_expenses_ids" : [ ], + "finances_accounts_access" : true, + "finances_accounts_banalce_access" : true, + "finances_suppliers_read_access" : true, + "finances_suppliers_create_access" : true, + "finances_suppliers_update_access" : true, + "finances_suppliers_delete_access" : true, + "finances_suppliers_excel_access" : true, + "finances_expenses_read_access" : true, + "expenses_read_access" : true, + "finances_expenses_create_access" : true, + "expenses_create_access" : true, + "finances_expenses_update_access" : true, + "expenses_update_access" : true, + "finances_expenses_delete_access" : true, + "expenses_delete_access" : true, + "finances_kkm_transactions_access" : true, + "kkm_transactions_accounts_access" : true, + "finances_kkm_settings_read_access" : true, + "kkm_settings_reed_access" : true, + "finances_kkm_settings_update_access" : true, + "kkm_settings_update_access" : true, + "finances_settings_invoicing_read_access" : true, + "settings_invoicing_read_access" : true, + "finances_settings_invoicing_update_access" : true, + "settings_invoicing_update_access" : true, + "finances_options_read_access" : true, + "options_read_access" : true, + "finances_options_update_access" : true, + "options_update_access" : true, + "finances_salary_schemes_access" : true, + "finances_salary_calc_access" : true, + "finances_salary_not_limitation_today_access" : true, + "finances_payroll_calculation_create_access" : true, + "finances_payroll_calculation_create_not_limitation_today_access" : true, + "finances_salary_access_master_checkbox" : false, + "finances_salary_access_master_id" : 0, + "get_salary_access_master_id" : 0, + "finances_salary_master_not_limitation_today_access" : true, + "finances_payroll_calculation_create_by_master_access" : false, + "calculation_create_by_master_not_limitation_today_access" : true, + "finances_period_report_access" : true, + "finances_period_report_excel_access" : true, + "finances_year_report_access" : true, + "finances_year_report_excel_access" : true, + "finances_print_check_access" : true, + "finances_z_report_access" : true, + "finances_z_report_no_limit_today_access" : true, + "finances_z_report_excel_access" : true, + "clients_access" : true, + "client_phones_access" : true, + "clients_phones_access" : true, + "clients_phones_email_access" : true, + "clients_loyalty_read_access" : true, + "clients_card_phone_access" : true, + "clients_delete_access" : true, + "clients_excel_access" : true, + "excel_access" : true, + "client_comments_list_access" : true, + "client_comments_add_access" : true, + "client_comments_own_edit_access" : true, + "client_comments_other_edit_access" : true, + "client_files_list_access" : true, + "client_files_upload_access" : true, + "client_files_delete_access" : true, + "clients_visit_master_id" : 0, + "get_visit_master_id" : 0, + "clients_show_attendance_history_access" : true, + "clients_deposits_access" : true, + "clients_deposits_create_access" : true, + "clients_deposits_topup_access" : true, + "clients_deposits_history_access" : true, + "dashboard_access" : true, + "dash_access" : true, + "dash_phones_access" : true, + "dash_records_access" : true, + "dash_records_last_days_count" : -1, + "dash_records_excel_access" : true, + "dash_records_phones_access" : true, + "dash_message_access" : true, + "dash_message_excel_access" : true, + "dash_message_phones_access" : true, + "dash_reviews_access" : true, + "dash_reviews_delete_access" : true, + "dashboard_calls_access" : true, + "dashboard_calls_excel_access" : true, + "dashboard_calls_phones_access" : true, + "loyalty_access" : true, + "has_loyalty_access" : true, + "loyalty_cards_manual_transactions_access" : true, + "loyalty_abonement_balance_edit_access" : true, + "loyalty_abonement_period_edit_access" : true, + "loyalty_abonement_history_access" : true, + "loyalty_cards_issue_and_removal_access" : true, + "has_loyalty_cards_manual_transactions_access" : true, + "loyalty_certificate_and_abonement_manual_transactions_access" : true, + "storages_access" : true, + "storages_ids" : [ ], + "storages_transactions_access" : true, + "storages_last_days_count" : -1, + "storages_move_goods_access" : true, + "storages_create_transactions_access" : true, + "storages_create_last_days_count" : -1, + "storages_create_transactions_buy_access" : true, + "storages_create_transactions_sale_access" : true, + "storages_edit_transactions_access" : true, + "storages_edit_last_days_count" : -1, + "storages_edit_transactions_buy_access" : true, + "storages_edit_transactions_sale_access" : true, + "storages_delete_transactions_access" : true, + "storages_transactions_excel_access" : true, + "storages_transactions_types" : [ ], + "storages_inventory_access" : true, + "storages_inventory_create_edit_access" : true, + "storages_inventory_delete_access" : true, + "storages_inventory_excel_access" : true, + "storages_remnants_report_access" : true, + "storages_remnants_report_excel_access" : true, + "storages_sales_report_access" : true, + "storages_sales_report_excel_access" : true, + "storages_consumable_report_access" : true, + "storages_consumable_report_excel_access" : true, + "storages_write_off_report_access" : true, + "storages_write_off_report_excel_access" : true, + "storages_turnover_report_access" : true, + "storages_turnover_report_excel_access" : true, + "storages_goods_crud_access" : true, + "storages_goods_create_access" : true, + "storages_goods_update_access" : true, + "storages_goods_title_edit_access" : true, + "storages_goods_category_edit_access" : true, + "storages_goods_selling_price_edit_access" : true, + "storages_goods_cost_price_edit_access" : true, + "storages_goods_units_edit_access" : true, + "storages_goods_critical_balance_edit_access" : true, + "storages_goods_masses_edit_access" : true, + "storages_goods_comment_edit_access" : true, + "storages_goods_archive_access" : true, + "storages_goods_delete_access" : true, + "settings_access" : true, + "settings_basis_access" : true, + "settings_information_access" : true, + "users_access" : true, + "delete_users_access" : true, + "create_users_access" : true, + "edit_users_access" : true, + "limited_users_access" : false, + "settings_user_notifications_access" : true, + "settings_services_access" : true, + "settings_services_create_access" : true, + "services_edit" : true, + "settings_services_edit_title_access" : true, + "settings_services_relation_category_access" : true, + "settings_services_edit_price_access" : true, + "settings_services_edit_image_access" : true, + "settings_services_edit_online_seance_date_time_access" : true, + "settings_services_edit_online_pay_access" : true, + "settings_services_edit_services_related_resource_access" : true, + "settings_positions_read" : true, + "settings_positions_create" : true, + "settings_positions_delete" : true, + "edit_master_service_and_duration" : true, + "tech_card_edit" : true, + "services_delete" : true, + "settings_master_access" : true, + "master_create" : true, + "master_edit" : true, + "master_delete" : true, + "settings_master_dismiss_access" : true, + "schedule_edit" : true, + "settings_notifications_access" : true, + "settings_email_notifications_access" : true, + "settings_template_notifications_access" : true, + "webhook_read_access" : true, + "stat_access" : true, + "billing_access" : true, + "send_sms" : true, + "auth_enable_check_ip" : false, + "auth_list_allowed_ip" : [ ], + "online_record_access" : true, + "online_record_business_card_access" : true, + "online_record_privacy_policy_access" : true, + "online_record_chat_bot_access" : true + } + } ] + }, + "staff_put" : { + "value" : { + "id" : 9090909, + "name" : "Василий", + "specialization" : "парикмахер", + "position" : { + "id" : 1, + "title" : "Администратор" + }, + "show_rating" : 0, + "rating" : 0, + "votes_count" : 0, + "avatar" : "https://api.yclients.com/images/no-master-sm.png", + "avatar_big" : "https://api.yclients.com/images/no-master.png", + "comments_count" : 0, + "weight" : 10, + "information" : "example information", + "hidden" : 0, + "fired" : 0, + "status" : 0, + "position_id" : 1, + "schedule_till" : "1970-01-01", + "image_group" : [ ], + "prepaid" : "forbidden" + } + }, + "staff_post" : { + "value" : { + "id" : 9090908, + "name" : "Жермэн", + "specialization" : "SMM", + "position" : [ ], + "show_rating" : 1, + "rating" : 0, + "votes_count" : 0, + "avatar" : "https://api.yclients.com/images/no-master-sm.png", + "avatar_big" : "https://api.yclients.com/images/no-master.png", + "comments_count" : 0, + "weight" : 13, + "information" : "test", + "hidden" : 0, + "fired" : 0, + "status" : 0, + "position_id" : 0, + "schedule_till" : "1970-01-01", + "image_group" : [ ], + "prepaid" : "forbidden" + } + }, + "staff" : { + "value" : { + "success" : true, + "data" : [ { + "id" : 11775571, + "name" : "Тимофей", + "company_id" : 3838388, + "specialization" : "Go", + "avatar" : "https://api.yclients.com/images/no-master-sm.png", + "avatar_big" : "https://api.yclients.com/images/no-master.png", + "fired" : 0, + "status" : 0, + "hidden" : 0, + "position" : { + "id" : 146766, + "title" : "Разработчик" + } + }, { + "id" : 11775572, + "name" : "Tom", + "company_id" : 3838388, + "specialization" : "SMM", + "avatar" : "https://api.yclients.com/images/no-master-sm.png", + "avatar_big" : "https://api.yclients.com/images/no-master.png", + "fired" : 1, + "status" : 0, + "hidden" : 0, + "position" : [ ] + } ], + "meta" : { + "total_count" : 2 + } + } + }, + "employee" : { + "value" : { + "success" : true, + "data" : { + "id" : 11775571, + "name" : "Тимофей", + "company_id" : 3838388, + "specialization" : "Go", + "avatar" : "https://api.yclients.com/images/no-master-sm.png", + "avatar_big" : "https://api.yclients.com/images/no-master.png", + "fired" : 0, + "status" : 0, + "hidden" : 0, + "position" : { + "id" : 146766, + "title" : "Разработчик" + } + }, + "meta" : [ ] + } + } + }, + "requestBodies" : { + "staff_create_update" : { + "content" : { + "application/json" : { + "schema" : { + "required" : [ "name" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "Имя" + }, + "specialization" : { + "type" : "string", + "description" : "Специализация сотрудника" + }, + "information" : { + "type" : "string", + "description" : "Дополнительная информация о сотруднике (HTML формат)" + }, + "weight" : { + "type" : "integer", + "description" : "Вес сотрудника. При выводе сотрудники сортируются по весу, сначала более тяжелые" + }, + "hidden" : { + "type" : "integer", + "description" : "1 - скрыт от онлайн записей, 0 - не скрыт" + }, + "fired" : { + "type" : "integer", + "description" : "статус увольнения (1 - уволен, 0 - не уволен)" + } + } + } + } + } } }, "securitySchemes" : { From 03398849c7c03dcd41b9104e806a01a8564ad52c Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Wed, 21 Oct 2020 01:43:18 +0000 Subject: [PATCH 7/9] add methods: clients, voip, webhook --- swagger/oas yclient.json | 1482 +++++++++++++++++++++++++++++++++++--- 1 file changed, 1401 insertions(+), 81 deletions(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index df0918e..c38291f 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -23,12 +23,18 @@ }, { "name" : "Users", "description" : "Пользователи компании" + }, { + "name" : "Clients", + "description" : "Клиенты" }, { "name" : "Directory", "description" : "Справочники" }, { - "name" : "ToDo", - "description" : "Доработать" + "name" : "Voip", + "description" : "События телефонии" + }, { + "name" : "Webhooks", + "description" : "Вебхуки" } ], "paths" : { "/auth" : { @@ -1119,51 +1125,152 @@ } ] } }, - "/countries" : { - "get" : { - "tags" : [ "Directory" ], - "summary" : "Список стран", - "description" : "### Метод позволяет получить список стран\n ---\n__Авторизация с ключом Партнера__", - "operationId" : "getListOfCountries", + "/company/{company_id}/clients/search" : { + "post" : { + "tags" : [ "Clients" ], + "summary" : "Список клиентов", + "description" : "### Метод позволяет получить список клиентов компании\n ---\n__Авторизация с ключами партнера и пользователя__", + "operationId" : "getClientsList", "parameters" : [ { - "name" : "count", - "in" : "query", - "description" : "Количество объектов на странице", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "integer" - } - }, { - "name" : "page", - "in" : "query", - "description" : "Номер страницы", - "required" : false, - "style" : "form", - "explode" : true, + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { "type" : "integer" } } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/client_search" + }, "responses" : { "200" : { "description" : "Запрос выполнен успешно", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/inline_response_200_7" + "$ref" : "#/components/schemas/inline_response_200_7" + }, + "example" : { + "value" : { + "success" : true, + "data" : [ { + "id" : 1, + "name" : "Ричард", + "phone" : "+79998880001", + "sold_amount" : 500, + "email" : "" + }, { + "id" : 2, + "name" : "Martin", + "phone" : "+79998880002", + "sold_amount" : 300, + "email" : "" + } ], + "meta" : { + "total_count" : 2 + } } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" }, - "examples" : { - "countries" : { - "$ref" : "#/components/examples/countries" + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" } } } } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/clients/{company_id}" : { + "post" : { + "tags" : [ "Clients" ], + "summary" : "Добавить клиента", + "description" : "### Метод позволяет создать клиента\n ---\n__Авторизация с ключами партнера и пользователя__", + "operationId" : "createClient", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/client" + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_201" + }, + "example" : { + "id" : 1, + "name" : "Котов", + "phone" : "+79998880006", + "email" : "agent007@example.ru", + "card" : "ST00006", + "birth_date" : "2000-12-16", + "comment" : "не берет трубку", + "discount" : 15, + "visits" : 0, + "sex_id" : 1, + "sex" : "Мужской", + "sms_check" : 1, + "sms_bot" : 0, + "spent" : 500, + "paid" : 550, + "balance" : 50, + "importance_id" : 2, + "importance" : "Серебро", + "categories" : [ { + "id" : 101, + "title" : "Лояльный", + "color" : "#bfd4f2" + } ], + "last_change_date" : "2020-10-18T05:03:49+0200", + "custom_fields" : { } + } + } + } }, "401" : { "description" : "Не указаны авторизационные данные", @@ -1180,60 +1287,195 @@ } } } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } } }, "security" : [ { - "bearerPartner" : [ ] + "bearerPartnerUser" : [ ] } ] } }, - "/cities" : { + "/client/{company_id}/{id}" : { "get" : { - "tags" : [ "Directory" ], - "summary" : "Список городов", - "description" : "### Метод позволяет получить список городов\n ---\n __Авторизация с ключом Партнера__\n \n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", - "operationId" : "getListOfCities", + "tags" : [ "Clients" ], + "summary" : "Получить клиента", + "description" : "### Метод позволяет получить данные клиента\n ---\n__Авторизация с ключами партнера и пользователя__", + "operationId" : "getClient", "parameters" : [ { - "name" : "country_id", - "in" : "query", - "description" : "ID страны (см. метод - __countries__)", - "required" : false, - "style" : "form", - "explode" : true, + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { - "type" : "integer", - "example" : 1 + "type" : "integer" } }, { - "name" : "salon_id", - "in" : "query", - "description" : "ID филиала", - "required" : false, - "style" : "form", - "explode" : true, + "name" : "id", + "in" : "path", + "description" : "ID объекта", + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { - "type" : "integer", - "example" : 1 + "type" : "string" } } ], "responses" : { "200" : { - "description" : "Запрос выполнен успешно", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/inline_response_200_8" + "$ref" : "#/components/schemas/inline_response_201" + }, + "example" : { + "id" : 1, + "name" : "Котов", + "phone" : "+79998880006", + "email" : "agent007@example.ru", + "card" : "ST00006", + "birth_date" : "2000-12-16", + "comment" : "не берет трубку", + "discount" : 15, + "visits" : 0, + "sex_id" : 1, + "sex" : "Мужской", + "sms_check" : 1, + "sms_bot" : 0, + "spent" : 500, + "paid" : 550, + "balance" : 50, + "importance_id" : 2, + "importance" : "Серебро", + "categories" : [ { + "id" : 101, + "title" : "Лояльный", + "color" : "#bfd4f2" + } ], + "last_change_date" : "2020-10-18T05:03:49+0200", + "custom_fields" : { } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" }, - "examples" : { - "cities" : { - "$ref" : "#/components/examples/cities" + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" } } } } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "put" : { + "tags" : [ "Clients" ], + "summary" : "Изменить клиента", + "description" : "### Метод позволяет изменить данные клиента\n ---\n__Авторизация с ключами партнера и пользователя__", + "operationId" : "editClient", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "id", + "in" : "path", + "description" : "ID объекта", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/client" + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_201" + }, + "example" : { + "id" : 1, + "name" : "Котов", + "phone" : "+79998880006", + "email" : "agent007@example.ru", + "card" : "ST00006", + "birth_date" : "2000-12-16", + "comment" : "не берет трубку", + "discount" : 15, + "visits" : 0, + "sex_id" : 1, + "sex" : "Мужской", + "sms_check" : 1, + "sms_bot" : 0, + "spent" : 500, + "paid" : 550, + "balance" : 50, + "importance_id" : 2, + "importance" : "Серебро", + "categories" : [ { + "id" : 101, + "title" : "Лояльный", + "color" : "#bfd4f2" + } ], + "last_change_date" : "2020-10-18T05:03:49+0200", + "custom_fields" : { } + } + } + } }, "401" : { "description" : "Не указаны авторизационные данные", @@ -1250,17 +1492,406 @@ } } } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } } }, "security" : [ { - "bearerPartner" : [ ] + "bearerPartnerUser" : [ ] } ] } - } - }, - "components" : { - "schemas" : { - "company" : { + }, + "/countries" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список стран", + "description" : "### Метод позволяет получить список стран\n ---\n__Авторизация с ключом Партнера__", + "operationId" : "getListOfCountries", + "parameters" : [ { + "name" : "count", + "in" : "query", + "description" : "Количество объектов на странице", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_8" + } + }, + "examples" : { + "countries" : { + "$ref" : "#/components/examples/countries" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/cities" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список городов", + "description" : "### Метод позволяет получить список городов\n ---\n __Авторизация с ключом Партнера__\n \n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", + "operationId" : "getListOfCities", + "parameters" : [ { + "name" : "country_id", + "in" : "query", + "description" : "ID страны (см. метод - __countries__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, { + "name" : "salon_id", + "in" : "query", + "description" : "ID филиала", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_9" + } + }, + "examples" : { + "cities" : { + "$ref" : "#/components/examples/cities" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/voip/integration/" : { + "post" : { + "tags" : [ "Voip" ], + "summary" : "Подключить интеграцию", + "description" : "## Метод позволяет подключить интеграцию\n ---\n__Авторизация с ключом Партнера__\n \n ---\n__Возможности метода:__\n 1. __Подключить интеграцию__ - для использования api и активации доступа к настройкам в пользовательском интерфейсе необходимо активировать интеграцию, отправив запрос \"Подключить интеграцию\".После успешного подключения, в `сетевом` интерфейсе пользователя будет открыт доступ в раздел с настройками маршрутизаци\n 2. __Отключить интеграцию__ - Для отключения интеграции можно воспользоваться методом \"Отключить интеграцию\". После отключения интеграции закрывается доступ в раздел настроек пользовательского интерфейса, обработка запросов \"Уведомление о звонке\" и \"Сохранение информации о звонке\" не производится.\n 3. __Уведомление о звонке__ - Для отображения уведомлений о входящем звонке используется метод \"Уведомление о звонке\", в параметрах указыватеся тип звонка (\"incoming\", \"outgoing\", \"internal\"), но на текущий момент уведомления отображаются только для значения \"incoming\". Уведомления отображаются для пользователей, определенных на основе настроек маршрутизации. При одновременном указании параметров \"user\" и \"diversion\" приоритетным при поиске маршрутов является \"user\".\n 4. __Сохранение информации о звонке__ - Сохранение информации о звонке автоматически происходит в сетевую историю и в историю компаний сети в соответствии с настройками маршрутизации звонка.", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body_2" + }, + "examples" : { + "add" : { + "value" : { + "command" : "setup", + "type" : "enable", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" + } + }, + "del" : { + "value" : { + "command" : "setup", + "type" : "disable", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" + } + }, + "event" : { + "value" : { + "command" : "event", + "type" : "incoming", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", + "phone" : "71010001100", + "user" : "external_user_id", + "diversion" : "71010001122" + } + }, + "history" : { + "value" : { + "command" : "history", + "type" : "incoming", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", + "phone" : "71010001100", + "user" : "external_user_id", + "diversion" : "71010001122", + "duration" : 90, + "link" : "https://external.call.storage/call_record.mp3", + "call_id" : "external_call_id", + "status" : "success", + "date" : "2018-03-20T12:00:28+00:00" + } + } + } + } + } + }, + "responses" : { + "202" : { + "description" : "Accepted", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_202" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/hooks_settings/{company_id}" : { + "get" : { + "tags" : [ "Webhooks" ], + "summary" : "Настройки уведомлений о событиях", + "description" : "### Метод позволяет получить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + }, + "examples" : { + "webhook" : { + "$ref" : "#/components/examples/webhook" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "post" : { + "tags" : [ "Webhooks" ], + "summary" : "Изменение настроек уведомлений", + "description" : "### Метод позволяет изменить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + }, + "examples" : { + "webhook" : { + "$ref" : "#/components/examples/webhook" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + } + }, + "components" : { + "schemas" : { + "company" : { "type" : "object", "properties" : { "id" : { @@ -1828,25 +2459,242 @@ "properties" : { "id" : { "type" : "integer", - "description" : "Должность (id)" + "description" : "Должность (id)" + }, + "title" : { + "type" : "string", + "description" : "Должность (наименование)" + } + }, + "description" : "Должность сотрудника" + }, + "operation" : { + "title" : "operation", + "type" : "string", + "description" : "Тип операции", + "enum" : [ "AND", "OR" ] + }, + "order_by" : { + "title" : "order_by", + "type" : "string", + "description" : "По какому полю сортировать", + "enum" : [ "id", "name", "phone", "email", "discount", "first_visit_date", "last_visit_date", "sold_amount", "visits_count" ] + }, + "order_by_direction" : { + "title" : "order_by_direction", + "type" : "string", + "description" : "Порядок сортировки", + "enum" : [ "DESC", "ASC" ] + }, + "client_id_filter" : { + "title" : "client_id_filter", + "required" : [ "type" ], + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "description" : "Поиск по идентификатору клиента", + "example" : "'id'" + }, + "state" : { + "$ref" : "#/components/schemas/state" + } + } + }, + "state" : { + "title" : "state", + "type" : "object", + "properties" : { + "invert" : { + "type" : "boolean" + }, + "value" : { + "type" : "array", + "items" : { + "type" : "integer" + } + } + } + }, + "categories" : { + "type" : "array", + "description" : "Массив идентификаторов категорий клиента", + "items" : { + "$ref" : "#/components/schemas/categories_inner" + } + }, + "meta" : { + "type" : "object", + "properties" : { + "total" : { + "type" : "integer", + "description" : "Всего найдено" + }, + "total_count" : { + "type" : "integer", + "description" : "Максимальное количество записей выводимых на странице" + } + } + }, + "voip_add_dell" : { + "description" : "Подключение/отключение интеграции", + "allOf" : [ { + "$ref" : "#/components/schemas/voip" + } ] + }, + "voip_event" : { + "description" : "Уведомление о звонке", + "allOf" : [ { + "$ref" : "#/components/schemas/voip" + }, { + "required" : [ "diversion", "phone" ], + "type" : "object", + "properties" : { + "phone" : { + "type" : "string", + "description" : "Номер звонящего абонента" + }, + "user" : { + "type" : "string", + "description" : "Идентификатор абонента телефонии, sip" + }, + "diversion" : { + "type" : "string", + "description" : "Номер через который пришел звонок" + } + } + } ] + }, + "voip_history" : { + "description" : "Сохранение информации о звонке", + "allOf" : [ { + "$ref" : "#/components/schemas/voip" + }, { + "required" : [ "diversion", "phone" ], + "type" : "object", + "properties" : { + "phone" : { + "type" : "string", + "description" : "Номер звонившего абонента" + }, + "user" : { + "type" : "string", + "description" : "Идентификатор абонента телефонии, sip" + }, + "diversion" : { + "type" : "string", + "description" : "Номер через который пришел звонок" + }, + "duration" : { + "type" : "number", + "description" : "Длительность звонка (в секундах)" + }, + "link" : { + "type" : "string", + "description" : "Ссылка на запись звонка" + }, + "call_id" : { + "type" : "string", + "description" : "Идентификатор звонка в системе voip" + }, + "status" : { + "type" : "string", + "description" : "Статус звонка 'success'|'missed'" + }, + "date" : { + "type" : "string", + "description" : "Дата и время звонка (ISO8601)" + } + } + } ] + }, + "voip" : { + "required" : [ "command", "crm_token", "type" ], + "type" : "object", + "properties" : { + "command" : { + "type" : "string", + "description" : "Slug операции" + }, + "type" : { + "type" : "string", + "description" : "Тип операции" + }, + "crm_token" : { + "type" : "string", + "description" : "Токен интеграции" + } + } + }, + "webhook" : { + "type" : "object", + "properties" : { + "company_id" : { + "type" : "integer", + "description" : "Id компании" + }, + "urls" : { + "type" : "array", + "description" : "Список адресов, на которые отправлять уведомления", + "items" : { + "type" : "string" + } + }, + "active" : { + "type" : "integer", + "description" : "Признак активности уведомлений (1 - уведомления активны, 0 - не активны)" + }, + "salon" : { + "type" : "integer", + "description" : "Отправлять события по компании (1 - отправлять, 0 - нет отправлять)" + }, + "service_category" : { + "type" : "integer", + "description" : "Отправлять события по категории услуг (1 - отправлять, 0 - нет отправлять)" + }, + "service" : { + "type" : "integer", + "description" : "Отправлять события по услуге" + }, + "master" : { + "type" : "integer", + "description" : "Отправлять события по сотруднику" + }, + "good" : { + "type" : "integer", + "description" : "Отправлять события по товару" + }, + "client" : { + "type" : "integer", + "description" : "Отправлять события по клиент" + }, + "record" : { + "type" : "integer", + "description" : "Отправлять события по" + }, + "goods_operations_sale" : { + "type" : "integer", + "description" : "Отправлять события по продаже товара" + }, + "goods_operations_receipt" : { + "type" : "integer", + "description" : "Отправлять события по приходу товара" + }, + "goods_operations_consumable" : { + "type" : "integer", + "description" : "Отправлять события по списанию расходника" + }, + "goods_operations_stolen" : { + "type" : "integer", + "description" : "Отправлять события по списанию товара" }, - "title" : { - "type" : "string", - "description" : "Должность (наименование)" - } - }, - "description" : "Должность сотрудника" - }, - "meta" : { - "type" : "object", - "properties" : { - "total" : { + "goods_operations_move" : { "type" : "integer", - "description" : "Всего найдено" + "description" : "Отправлять события по перемещению товара" }, - "total_count" : { + "finances_operation" : { "type" : "integer", - "description" : "Максимальное количество записей выводимых на странице" + "description" : "Отправлять события по финансовым операциям" } } }, @@ -2233,6 +3081,106 @@ } }, "inline_response_200_7" : { + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_7_data" + } + }, + "meta" : { + "$ref" : "#/components/schemas/meta" + } + } + }, + "inline_response_201" : { + "properties" : { + "id" : { + "type" : "integer", + "description" : "id клиента" + }, + "name" : { + "type" : "string", + "description" : "Имя клиента" + }, + "phone" : { + "type" : "string", + "description" : "Телефон клиента" + }, + "email" : { + "type" : "string", + "description" : "Email клиента" + }, + "card" : { + "type" : "string", + "description" : "Номер карты клиента" + }, + "birth_date" : { + "type" : "string", + "description" : "Дата рождения клиента. Важен месяц и день" + }, + "comment" : { + "type" : "string", + "description" : "Комментарий" + }, + "discount" : { + "type" : "integer", + "description" : "Скидка клиента" + }, + "visits" : { + "type" : "integer" + }, + "sex_id" : { + "type" : "integer", + "description" : "Пол клиента (1 - мужской, 2 - женский, 0 - не известен)" + }, + "sex" : { + "type" : "integer", + "description" : "Пол клиента" + }, + "sms_check" : { + "type" : "integer", + "description" : "1 - Поздравлять с Днем Рождения по SMS, 0 - не поздравлять" + }, + "sms_bot" : { + "type" : "integer" + }, + "spent" : { + "type" : "integer", + "description" : "Сколько потратил средств" + }, + "paid" : { + "type" : "integer", + "description" : "Сколько оплатил средств" + }, + "balance" : { + "type" : "integer", + "description" : "Баланс клиента" + }, + "importance_id" : { + "type" : "integer", + "description" : "Класс важности клиента (0 - нет, 1 - бронза, 2 - серебро, 3 - золото)" + }, + "importance" : { + "type" : "string", + "description" : "Класс важности клиента" + }, + "categories" : { + "$ref" : "#/components/schemas/categories" + }, + "last_change_date" : { + "type" : "string" + }, + "custom_fields" : { + "type" : "object", + "description" : "Массив дополнительных полей клиента в виде пар 'api-key': 'value'" + } + } + }, + "inline_response_200_8" : { "type" : "object", "properties" : { "id" : { @@ -2276,7 +3224,7 @@ } } }, - "inline_response_200_8" : { + "inline_response_200_9" : { "type" : "object", "properties" : { "id" : { @@ -2293,6 +3241,36 @@ } } }, + "body_2" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/voip_add_dell" + }, { + "$ref" : "#/components/schemas/voip_event" + }, { + "$ref" : "#/components/schemas/voip_history" + } ] + }, + "inline_response_202" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "type" : "string", + "nullable" : true + }, + "meta" : { + "$ref" : "#/components/schemas/inline_response_401_meta" + } + }, + "example" : { + "success" : true, + "meta" : { + "message" : "Accepted" + } + } + }, "company_main_group" : { "type" : "object", "properties" : { @@ -2372,6 +3350,20 @@ } } }, + "categories_inner" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "color" : { + "type" : "string" + } + } + }, "errors_errors" : { "type" : "object", "properties" : { @@ -2400,6 +3392,31 @@ "type" : "integer" } } + }, + "inline_response_200_7_data" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "id клиента" + }, + "name" : { + "type" : "string", + "description" : "Имя клиента" + }, + "phone" : { + "type" : "string", + "description" : "Телефон клиента" + }, + "sold_amount" : { + "type" : "integer", + "description" : "Продано" + }, + "email" : { + "type" : "string", + "description" : "Почта клиента" + } + } } }, "responses" : { @@ -2462,6 +3479,42 @@ } } } + }, + "20x_client" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_201" + }, + "example" : { + "id" : 1, + "name" : "Котов", + "phone" : "+79998880006", + "email" : "agent007@example.ru", + "card" : "ST00006", + "birth_date" : "2000-12-16", + "comment" : "не берет трубку", + "discount" : 15, + "visits" : 0, + "sex_id" : 1, + "sex" : "Мужской", + "sms_check" : 1, + "sms_bot" : 0, + "spent" : 500, + "paid" : 550, + "balance" : 50, + "importance_id" : 2, + "importance" : "Серебро", + "categories" : [ { + "id" : 101, + "title" : "Лояльный", + "color" : "#bfd4f2" + } ], + "last_change_date" : "2020-10-18T05:03:49+0200", + "custom_fields" : { } + } + } + } } }, "parameters" : { @@ -3057,6 +4110,132 @@ }, "meta" : [ ] } + }, + "webhook" : { + "value" : { + "company_id" : 3030303, + "urls" : [ "https://webhook.site/example_1", "https://webhook.site/example_2" ], + "active" : 1, + "salon" : 1, + "service_category" : 0, + "service" : 0, + "master" : 1, + "client" : 0, + "record" : 0, + "goods_operations_sale" : 0, + "goods_operations_receipt" : 0, + "goods_operations_consumable" : 1, + "goods_operations_stolen" : 0, + "goods_operations_move" : 0, + "finances_operation" : 0 + } + }, + "client_example_1" : { + "value" : { + "page" : 1, + "page_size" : 3, + "fields" : [ "id", "name" ], + "order_by" : "name", + "order_by_direction" : "desc", + "operation" : "AND", + "filters" : [ { + "type" : "id", + "state" : { + "value" : [ 1, 2, 3 ] + } + }, { + "type" : "sold_amount", + "state" : { + "from" : 0, + "to" : 100.77 + } + }, { + "type" : "quick_search", + "state" : { + "value" : "Иван" + } + }, { + "type" : "importance", + "state" : { + "value" : [ 0, 1, 2, 3 ] + } + }, { + "type" : "has_mobile_app", + "state" : { + "value" : true + } + }, { + "type" : "category", + "state" : { + "value" : [ 1, 7 ] + } + }, { + "type" : "has_passteam_card", + "state" : { + "value" : true + } + }, { + "type" : "birthday", + "state" : { + "from" : "1985-03-22", + "to" : "1985-03-23" + } + }, { + "type" : "gender", + "state" : { + "value" : [ 0, 1, 2 ] + } + }, { + "type" : "record", + "state" : { + "staff" : { + "value" : [ 1, 2 ] + }, + "service" : { + "value" : [ 2, 3 ] + }, + "service_category" : { + "value" : [ 4, 5 ] + }, + "status" : { + "value" : [ 1 ] + }, + "created" : { + "from" : "1985-03-22", + "to" : "1985-03-23" + }, + "records_count" : { + "from" : 1, + "to" : 99999 + }, + "sold_amount" : { + "from" : 1.001, + "to" : 99999.09 + } + } + }, { + "type" : "client", + "state" : { + "id" : { + "value" : [ 1, 2, 3 ] + }, + "birthday" : { + "from" : "1985-03-22", + "to" : "1985-03-23" + } + } + } ] + } + }, + "client_example_2" : { + "value" : { + "page" : 1, + "page_size" : 2, + "fields" : [ "id", "name", "phone", "email", "sold_amount" ], + "order_by" : "id", + "order_by_direction" : "DESC", + "operation" : "AND" + } } }, "requestBodies" : { @@ -3095,6 +4274,147 @@ } } } + }, + "client_search" : { + "content" : { + "application/json" : { + "schema" : { + "properties" : { + "page" : { + "type" : "integer", + "description" : "Номер страницы" + }, + "page_size" : { + "type" : "integer", + "description" : "Количество выводимых строк на странице. Максимум 200" + }, + "fields" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "order_by" : { + "$ref" : "#/components/schemas/order_by" + }, + "order_by_direction" : { + "$ref" : "#/components/schemas/order_by_direction" + }, + "operation" : { + "$ref" : "#/components/schemas/operation" + }, + "filters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/client_id_filter" + } + } + } + }, + "examples" : { + "example_1" : { + "$ref" : "#/components/examples/client_example_1" + }, + "example_2" : { + "$ref" : "#/components/examples/client_example_2" + } + } + } + } + }, + "client" : { + "content" : { + "application/json" : { + "schema" : { + "required" : [ "name", "phone" ], + "properties" : { + "name" : { + "type" : "string", + "description" : "Имя клиента" + }, + "phone" : { + "type" : "string", + "description" : "Телефон клиента" + }, + "email" : { + "type" : "string", + "description" : "Email клиента" + }, + "card" : { + "type" : "string", + "description" : "Номер карты клиента" + }, + "birth_date" : { + "type" : "string", + "description" : "Дата рождения клиента (формат - YYYY-MM-DD)" + }, + "comment" : { + "type" : "string", + "description" : "Комментарий" + }, + "discount" : { + "type" : "integer", + "description" : "Скидка клиента" + }, + "sex_id" : { + "type" : "integer", + "description" : "Пол клиента (1 - мужской, 2 - женский, 0 - не известен)" + }, + "sms_check" : { + "type" : "integer", + "description" : "1 - Поздравлять с Днем Рождения по SMS, 0 - не поздравлять" + }, + "spent" : { + "type" : "integer", + "description" : "Сколько потратил средств" + }, + "paid" : { + "type" : "integer", + "description" : "Сколько оплатил средств" + }, + "balance" : { + "type" : "integer", + "description" : "Баланс клиента" + }, + "importance_id" : { + "type" : "integer", + "description" : "Класс важности клиента (0 - нет, 1 - бронза, 2 - серебро, 3 - золото)" + }, + "categories" : { + "type" : "array", + "description" : "Массив идентификаторов категорий клиента", + "items" : { + "type" : "string" + } + }, + "custom_fields" : { + "type" : "object", + "description" : "Массив дополнительных полей клиента в виде пар 'api-key': 'value'" + }, + "sms_not" : { + "type" : "integer", + "description" : "1 - Исключить клиента из SMS рассылок, 0 - не исключать" + } + } + }, + "example" : { + "name" : "Котов", + "phone" : "+79998880006", + "email" : "agent007@example.ru", + "card" : "ST00006", + "birth_date" : "2000-12-16", + "comment" : "не берет трубку", + "discount" : 15, + "sex_id" : 1, + "sms_check" : 1, + "spent" : 500, + "paid" : 550, + "importance_id" : 2, + "categories" : [ 101 ], + "sms_not" : 0 + } + } + } } }, "securitySchemes" : { From 8f93776203acc504dc4c8c83e24e3ed58685a935 Mon Sep 17 00:00:00 2001 From: SwaggerHub Date: Fri, 23 Oct 2020 01:26:15 +0000 Subject: [PATCH 8/9] add methods: labels, business_groups --- swagger/oas yclient.json | 1299 +++++++++++++++++++++++++++++++++----- 1 file changed, 1142 insertions(+), 157 deletions(-) diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index c38291f..04bd42b 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -26,6 +26,9 @@ }, { "name" : "Clients", "description" : "Клиенты" + }, { + "name" : "Labels", + "description" : "Категории" }, { "name" : "Directory", "description" : "Справочники" @@ -1515,29 +1518,28 @@ } ] } }, - "/countries" : { + "/labels/{company_id}/{entity}" : { "get" : { - "tags" : [ "Directory" ], - "summary" : "Список стран", - "description" : "### Метод позволяет получить список стран\n ---\n__Авторизация с ключом Партнера__", - "operationId" : "getListOfCountries", + "tags" : [ "Labels" ], + "summary" : "Список категорий (по типу категории)", + "description" : "### Метод позволяет получить список категорий отфильтрованный по типу ктегории\n ---\n __Авторизация с ключами партнера и пользователя__", "parameters" : [ { - "name" : "count", - "in" : "query", - "description" : "Количество объектов на странице", - "required" : false, - "style" : "form", - "explode" : true, + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { "type" : "integer" } }, { - "name" : "page", - "in" : "query", - "description" : "Номер страницы", - "required" : false, - "style" : "form", - "explode" : true, + "name" : "entity", + "in" : "path", + "description" : "Объект категории (0 - общие метки, 1 - метки клиентов, 2 - метки записей, 3 - категории событий)", + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { "type" : "integer" } @@ -1550,12 +1552,12 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200_8" + "$ref" : "#/components/schemas/label" } }, "examples" : { - "countries" : { - "$ref" : "#/components/examples/countries" + "labels" : { + "$ref" : "#/components/examples/labels" } } } @@ -1579,37 +1581,24 @@ } }, "security" : [ { - "bearerPartner" : [ ] + "bearerPartnerUser" : [ ] } ] } }, - "/cities" : { + "/labels/{company_id}" : { "get" : { - "tags" : [ "Directory" ], - "summary" : "Список городов", - "description" : "### Метод позволяет получить список городов\n ---\n __Авторизация с ключом Партнера__\n \n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", - "operationId" : "getListOfCities", + "tags" : [ "Labels" ], + "summary" : "Список категорий компании (общие метки)", + "description" : "### Метод позволяет получить список категории компании (общие метки)\n ---\n __Авторизация с ключами партнера и пользователя__", "parameters" : [ { - "name" : "country_id", - "in" : "query", - "description" : "ID страны (см. метод - __countries__)", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "integer", - "example" : 1 - } - }, { - "name" : "salon_id", - "in" : "query", + "name" : "company_id", + "in" : "path", "description" : "ID филиала", - "required" : false, - "style" : "form", - "explode" : true, + "required" : true, + "style" : "simple", + "explode" : false, "schema" : { - "type" : "integer", - "example" : 1 + "type" : "integer" } } ], "responses" : { @@ -1620,14 +1609,30 @@ "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/inline_response_200_9" + "$ref" : "#/components/schemas/label" } }, - "examples" : { - "cities" : { - "$ref" : "#/components/examples/cities" - } - } + "example" : [ { + "id" : "2777801", + "salon_id" : "396985", + "title" : "test1", + "color" : "002211", + "icon" : "", + "slug" : "", + "entity" : "0", + "deleted" : "0", + "not_editable" : "0" + }, { + "id" : "2777809", + "salon_id" : "396985", + "title" : "test2", + "color" : "002211", + "icon" : "", + "slug" : "", + "entity" : "0", + "deleted" : "0", + "not_editable" : "0" + } ] } } }, @@ -1649,15 +1654,24 @@ } }, "security" : [ { - "bearerPartner" : [ ] + "bearerPartnerUser" : [ ] } ] - } - }, - "/voip/integration/" : { + }, "post" : { - "tags" : [ "Voip" ], - "summary" : "Подключить интеграцию", - "description" : "## Метод позволяет подключить интеграцию\n ---\n__Авторизация с ключом Партнера__\n \n ---\n__Возможности метода:__\n 1. __Подключить интеграцию__ - для использования api и активации доступа к настройкам в пользовательском интерфейсе необходимо активировать интеграцию, отправив запрос \"Подключить интеграцию\".После успешного подключения, в `сетевом` интерфейсе пользователя будет открыт доступ в раздел с настройками маршрутизаци\n 2. __Отключить интеграцию__ - Для отключения интеграции можно воспользоваться методом \"Отключить интеграцию\". После отключения интеграции закрывается доступ в раздел настроек пользовательского интерфейса, обработка запросов \"Уведомление о звонке\" и \"Сохранение информации о звонке\" не производится.\n 3. __Уведомление о звонке__ - Для отображения уведомлений о входящем звонке используется метод \"Уведомление о звонке\", в параметрах указыватеся тип звонка (\"incoming\", \"outgoing\", \"internal\"), но на текущий момент уведомления отображаются только для значения \"incoming\". Уведомления отображаются для пользователей, определенных на основе настроек маршрутизации. При одновременном указании параметров \"user\" и \"diversion\" приоритетным при поиске маршрутов является \"user\".\n 4. __Сохранение информации о звонке__ - Сохранение информации о звонке автоматически происходит в сетевую историю и в историю компаний сети в соответствии с настройками маршрутизации звонка.", + "tags" : [ "Labels" ], + "summary" : "Создание категории (любого типа)", + "description" : "### Метод позволяет создавать категории компании (любого типа)\n ---\n __Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], "requestBody" : { "content" : { "application/json" : { @@ -1665,43 +1679,20 @@ "$ref" : "#/components/schemas/body_2" }, "examples" : { - "add" : { - "value" : { - "command" : "setup", - "type" : "enable", - "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" - } - }, - "del" : { - "value" : { - "command" : "setup", - "type" : "disable", - "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" - } - }, - "event" : { + "entity_2" : { "value" : { - "command" : "event", - "type" : "incoming", - "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", - "phone" : "71010001100", - "user" : "external_user_id", - "diversion" : "71010001122" + "title" : "еntity_2", + "color" : "#d6f2d4", + "entity" : "2", + "icon" : "tag" } }, - "history" : { + "entity_3" : { "value" : { - "command" : "history", - "type" : "incoming", - "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", - "phone" : "71010001100", - "user" : "external_user_id", - "diversion" : "71010001122", - "duration" : 90, - "link" : "https://external.call.storage/call_record.mp3", - "call_id" : "external_call_id", - "status" : "success", - "date" : "2018-03-20T12:00:28+00:00" + "title" : "еntity_3", + "color" : "#d6f2d4", + "entity" : "3", + "icon" : "money" } } } @@ -1710,11 +1701,17 @@ }, "responses" : { "202" : { - "description" : "Accepted", + "description" : "Запрос выполнен успешно", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/inline_response_202" + }, + "example" : { + "success" : true, + "meta" : { + "message" : "Accepted" + } } } } @@ -1737,15 +1734,15 @@ } }, "security" : [ { - "bearerPartner" : [ ] + "bearerPartnerUser" : [ ] } ] } }, - "/hooks_settings/{company_id}" : { - "get" : { - "tags" : [ "Webhooks" ], - "summary" : "Настройки уведомлений о событиях", - "description" : "### Метод позволяет получить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + "/labels/{company_id}/{label_id}" : { + "put" : { + "tags" : [ "Labels" ], + "summary" : "Изменение категории", + "description" : "### Метод позволяет изменять категории\n ---\n __Авторизация с ключами партнера и пользователя__", "parameters" : [ { "name" : "company_id", "in" : "path", @@ -1756,18 +1753,44 @@ "schema" : { "type" : "integer" } + }, { + "name" : "label_id", + "in" : "path", + "description" : "id категории", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body_3" + }, + "example" : { + "title" : "еntity_2", + "color" : "#d6f2d4", + "entity" : "2", + "icon" : "tag" + } + } + } + }, "responses" : { - "200" : { + "202" : { "description" : "Запрос выполнен успешно", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/webhook" + "$ref" : "#/components/schemas/inline_response_202" }, - "examples" : { - "webhook" : { - "$ref" : "#/components/examples/webhook" + "example" : { + "success" : true, + "meta" : { + "message" : "Accepted" } } } @@ -1788,18 +1811,65 @@ } } } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "delete" : { + "tags" : [ "Labels" ], + "summary" : "Удаление категории", + "description" : "### Метод позволяет удалять категории\n ---\n __Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + }, { + "name" : "label_id", + "in" : "path", + "description" : "id категории", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "202" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_202" + }, + "example" : { + "success" : true, + "meta" : { + "message" : "Accepted" + } + } + } + } }, - "404" : { - "description" : "Филиала с идентификатором <номер> не найдено", + "401" : { + "description" : "Не указаны авторизационные данные", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/errors" + "$ref" : "#/components/schemas/inline_response_401" }, "example" : { - "errors" : { - "code" : 404, - "message" : "Филиала с идентификатором 2 не найдено" + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" } } } @@ -1809,11 +1879,13 @@ "security" : [ { "bearerPartnerUser" : [ ] } ] - }, - "post" : { - "tags" : [ "Webhooks" ], - "summary" : "Изменение настроек уведомлений", - "description" : "### Метод позволяет изменить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + } + }, + "/labels/{company_id}/clients" : { + "get" : { + "tags" : [ "Labels" ], + "summary" : "Список клиентских категорий", + "description" : "### Метод позволяет получить список клиентских категорий\n ---\n __Авторизация с ключами партнера и пользователя__", "parameters" : [ { "name" : "company_id", "in" : "path", @@ -1824,27 +1896,39 @@ "schema" : { "type" : "integer" } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/webhook" - } - } + }, { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" } - }, + }, { + "name" : "term", + "in" : "query", + "description" : "Поиск по названию категории", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "VIP" + } + } ], "responses" : { "200" : { "description" : "Запрос выполнен успешно", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/webhook" + "$ref" : "#/components/schemas/inline_response_200_8" }, "examples" : { - "webhook" : { - "$ref" : "#/components/examples/webhook" + "labels" : { + "$ref" : "#/components/examples/labels_clients" } } } @@ -1865,13 +1949,488 @@ } } } - }, - "404" : { - "description" : "Филиала с идентификатором <номер> не найдено", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/errors" + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/labels/{company_id}/clients/create" : { + "post" : { + "tags" : [ "Labels" ], + "summary" : "Создать клиентскую категорию", + "description" : "### Метод позволяет создавать клиентские категории\n ---\n __Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body_4" + }, + "example" : { + "title" : "stop", + "color" : "#d6f2d4" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_9" + }, + "example" : { + "success" : true, + "data" : { + "title" : "stop", + "salon_id" : 85, + "color" : "#d6f2d4", + "entity" : 1, + "id" : "103" + }, + "meta" : [ ] + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/countries" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список стран", + "description" : "### Метод позволяет получить список стран\n ---\n__Авторизация с ключом Партнера__", + "operationId" : "getListOfCountries", + "parameters" : [ { + "name" : "count", + "in" : "query", + "description" : "Количество объектов на странице", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + }, { + "name" : "page", + "in" : "query", + "description" : "Номер страницы", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_10" + } + }, + "examples" : { + "countries" : { + "$ref" : "#/components/examples/countries" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/cities" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список городов", + "description" : "### Метод позволяет получить список городов\n ---\n __Авторизация с ключом Партнера__\n \n __Примечание к параметрам:__\n - ID страны, из которой нужно получить города;\n - ID филиала. Если передан, будет возвращен так же город филиала, независимо от того, относится он к указанной стране или нет.", + "operationId" : "getListOfCities", + "parameters" : [ { + "name" : "country_id", + "in" : "query", + "description" : "ID страны (см. метод - __countries__)", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + }, { + "name" : "salon_id", + "in" : "query", + "description" : "ID филиала", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 1 + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_11" + } + }, + "examples" : { + "cities" : { + "$ref" : "#/components/examples/cities" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/references/business_groups_with_types/" : { + "get" : { + "tags" : [ "Directory" ], + "summary" : "Список бизнес-типов", + "description" : "### Метод позволяет получить список бизнес-типов\n ---\n - __Авторизация с ключом Партнера__\n - __Авторизация с ключами партнера и пользователя__", + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_200_12" + }, + "examples" : { + "business_groups" : { + "$ref" : "#/components/examples/business_groups" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + }, { + "bearerPartnerUser" : [ ] + } ] + } + }, + "/voip/integration/" : { + "post" : { + "tags" : [ "Voip" ], + "summary" : "Подключить интеграцию", + "description" : "## Метод позволяет подключить интеграцию\n ---\n__Авторизация с ключом Партнера__\n \n ---\n__Возможности метода:__\n 1. __Подключить интеграцию__ - для использования api и активации доступа к настройкам в пользовательском интерфейсе необходимо активировать интеграцию, отправив запрос \"Подключить интеграцию\".После успешного подключения, в `сетевом` интерфейсе пользователя будет открыт доступ в раздел с настройками маршрутизаци\n 2. __Отключить интеграцию__ - Для отключения интеграции можно воспользоваться методом \"Отключить интеграцию\". После отключения интеграции закрывается доступ в раздел настроек пользовательского интерфейса, обработка запросов \"Уведомление о звонке\" и \"Сохранение информации о звонке\" не производится.\n 3. __Уведомление о звонке__ - Для отображения уведомлений о входящем звонке используется метод \"Уведомление о звонке\", в параметрах указыватеся тип звонка (\"incoming\", \"outgoing\", \"internal\"), но на текущий момент уведомления отображаются только для значения \"incoming\". Уведомления отображаются для пользователей, определенных на основе настроек маршрутизации. При одновременном указании параметров \"user\" и \"diversion\" приоритетным при поиске маршрутов является \"user\".\n 4. __Сохранение информации о звонке__ - Сохранение информации о звонке автоматически происходит в сетевую историю и в историю компаний сети в соответствии с настройками маршрутизации звонка.", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/body_5" + }, + "examples" : { + "add" : { + "value" : { + "command" : "setup", + "type" : "enable", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" + } + }, + "del" : { + "value" : { + "command" : "setup", + "type" : "disable", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2" + } + }, + "event" : { + "value" : { + "command" : "event", + "type" : "incoming", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", + "phone" : "71010001100", + "user" : "external_user_id", + "diversion" : "71010001122" + } + }, + "history" : { + "value" : { + "command" : "history", + "type" : "incoming", + "crm_token" : "7cf262d6-1656-43f9-86ac-2826bdc125d2", + "phone" : "71010001100", + "user" : "external_user_id", + "diversion" : "71010001122", + "duration" : 90, + "link" : "https://external.call.storage/call_record.mp3", + "call_id" : "external_call_id", + "status" : "success", + "date" : "2018-03-20T12:00:28+00:00" + } + } + } + } + } + }, + "responses" : { + "202" : { + "description" : "Accepted", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_202_1" + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + } + }, + "security" : [ { + "bearerPartner" : [ ] + } ] + } + }, + "/hooks_settings/{company_id}" : { + "get" : { + "tags" : [ "Webhooks" ], + "summary" : "Настройки уведомлений о событиях", + "description" : "### Метод позволяет получить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + }, + "examples" : { + "webhook" : { + "$ref" : "#/components/examples/webhook" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" + }, + "example" : { + "errors" : { + "code" : 404, + "message" : "Филиала с идентификатором 2 не найдено" + } + } + } + } + } + }, + "security" : [ { + "bearerPartnerUser" : [ ] + } ] + }, + "post" : { + "tags" : [ "Webhooks" ], + "summary" : "Изменение настроек уведомлений", + "description" : "### Метод позволяет изменить настройки уведомлений о событиях\n ---\n__Авторизация с ключами партнера и пользователя__", + "parameters" : [ { + "name" : "company_id", + "in" : "path", + "description" : "ID филиала", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "integer" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/webhook" + }, + "examples" : { + "webhook" : { + "$ref" : "#/components/examples/webhook" + } + } + } + } + }, + "401" : { + "description" : "Не указаны авторизационные данные", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_401" + }, + "example" : { + "success" : false, + "meta" : { + "message" : "Не указаны авторизационные данные" + } + } + } + } + }, + "404" : { + "description" : "Филиала с идентификатором <номер> не найдено", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/errors" }, "example" : { "errors" : { @@ -2468,6 +3027,46 @@ }, "description" : "Должность сотрудника" }, + "label" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "ID категории" + }, + "salon_id" : { + "type" : "string", + "description" : "ID компании" + }, + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "color" : { + "type" : "string", + "description" : "Цвет метки в формате #RRGGBB" + }, + "icon" : { + "type" : "string", + "description" : "Название иконки" + }, + "slug" : { + "type" : "string" + }, + "entity" : { + "type" : "string", + "description" : "Объект категории" + }, + "deleted" : { + "type" : "string", + "description" : "Метка удаления" + }, + "not_editable" : { + "type" : "string", + "description" : "Разрешены ли изменения категории (1 - разрешены, 0 - не разрешены)" + } + } + }, "operation" : { "title" : "operation", "type" : "string", @@ -2511,31 +3110,18 @@ "value" : { "type" : "array", "items" : { - "type" : "integer" - } - } - } - }, - "categories" : { - "type" : "array", - "description" : "Массив идентификаторов категорий клиента", - "items" : { - "$ref" : "#/components/schemas/categories_inner" - } - }, - "meta" : { - "type" : "object", - "properties" : { - "total" : { - "type" : "integer", - "description" : "Всего найдено" - }, - "total_count" : { - "type" : "integer", - "description" : "Максимальное количество записей выводимых на странице" + "type" : "integer" + } } } }, + "categories" : { + "type" : "array", + "description" : "Массив идентификаторов категорий клиента", + "items" : { + "$ref" : "#/components/schemas/categories_inner" + } + }, "voip_add_dell" : { "description" : "Подключение/отключение интеграции", "allOf" : [ { @@ -2698,6 +3284,19 @@ } } }, + "meta" : { + "type" : "object", + "properties" : { + "total" : { + "type" : "integer", + "description" : "Всего найдено" + }, + "total_count" : { + "type" : "integer", + "description" : "Максимальное количество записей выводимых на странице" + } + } + }, "200_staff_post_put" : { "type" : "object", "properties" : { @@ -3180,7 +3779,110 @@ } } }, + "body_2" : { + "required" : [ "color", "title" ], + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "color" : { + "type" : "string", + "description" : "Цвет категории (В HEX формате. Например #aacc00 или #ac0)" + }, + "entity" : { + "type" : "integer", + "description" : "Объект категории Объект категории (0 - общие метки, 1 - метки клиентов, 2 - метки записей, 3 - категории событий)" + }, + "icon" : { + "type" : "string", + "description" : "Название иконки" + } + } + }, + "inline_response_202" : { + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "type" : "object", + "nullable" : true + }, + "message" : { + "$ref" : "#/components/schemas/inline_response_401_meta" + } + } + }, + "body_3" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "color" : { + "type" : "string", + "description" : "Цвет категории (В HEX формате. Например #aacc00 или #ac0)" + }, + "entity" : { + "type" : "integer", + "description" : "Объект категории Объект категории (0 - общие метки, 1 - метки клиентов, 2 - метки записей, 3 - категории событий)" + }, + "icon" : { + "type" : "string", + "description" : "Название иконки" + } + } + }, "inline_response_200_8" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_8_data" + } + }, + "meta" : { + "$ref" : "#/components/schemas/inline_response_200_8_meta" + } + } + }, + "body_4" : { + "required" : [ "color", "title" ], + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "color" : { + "type" : "string", + "description" : "Цвет категории (В HEX формате. Например #aacc00 или #ac0)" + } + } + }, + "inline_response_200_9" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "$ref" : "#/components/schemas/inline_response_200_9_data" + }, + "meta" : { + "type" : "object", + "example" : [ ] + } + } + }, + "inline_response_200_10" : { "type" : "object", "properties" : { "id" : { @@ -3224,7 +3926,7 @@ } } }, - "inline_response_200_9" : { + "inline_response_200_11" : { "type" : "object", "properties" : { "id" : { @@ -3241,7 +3943,24 @@ } } }, - "body_2" : { + "inline_response_200_12" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_12_data" + } + }, + "meta" : { + "$ref" : "#/components/schemas/inline_response_200_12_meta" + } + } + }, + "body_5" : { "oneOf" : [ { "$ref" : "#/components/schemas/voip_add_dell" }, { @@ -3250,7 +3969,7 @@ "$ref" : "#/components/schemas/voip_history" } ] }, - "inline_response_202" : { + "inline_response_202_1" : { "type" : "object", "properties" : { "success" : { @@ -3417,6 +4136,130 @@ "description" : "Почта клиента" } } + }, + "inline_response_200_8_data" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "ID категории" + }, + "salon_id" : { + "type" : "integer", + "description" : "ID компании" + }, + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "color" : { + "type" : "string", + "description" : "Цвет метки в формате #RRGGBB" + }, + "icon" : { + "type" : "string", + "description" : "Название иконки" + }, + "entity" : { + "type" : "integer", + "description" : "Объект категории (1 - категория для клиентов, 2 - категория для записей)" + }, + "deleted" : { + "type" : "integer", + "description" : "Метка удаления" + }, + "not_editable" : { + "type" : "integer", + "description" : "Разрешены ли изменения категории (1 - разрешены, 0 - не разрешены)" + } + } + }, + "inline_response_200_8_meta" : { + "type" : "object", + "properties" : { + "page" : { + "type" : "integer" + }, + "total_count" : { + "type" : "integer" + } + } + }, + "inline_response_200_9_data" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "salon_id" : { + "type" : "integer", + "description" : "ID компании" + }, + "color" : { + "type" : "string", + "description" : "Цвет метки в формате #RRGGBB" + }, + "entity" : { + "type" : "integer", + "description" : "Объект категории (1 - категория для клиентов, 2 - категория для записей)" + }, + "id" : { + "type" : "string", + "description" : "ID категории" + } + } + }, + "inline_response_200_12_types" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "ID типа" + }, + "title" : { + "type" : "string", + "description" : "Название типа" + }, + "business_group_id" : { + "type" : "integer", + "description" : "ID бизнес-группы" + } + }, + "description" : "Объект бизнес-типа имеет следующие поля" + }, + "inline_response_200_12_data" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "description" : "ID категории" + }, + "title" : { + "type" : "string", + "description" : "Название категории" + }, + "image" : { + "type" : "string", + "description" : "Изображение группы" + }, + "types" : { + "type" : "array", + "description" : "Связанные бизнес-типы", + "items" : { + "$ref" : "#/components/schemas/inline_response_200_12_types" + } + } + }, + "description" : "Объект бизнес-группы имеет следующие поля" + }, + "inline_response_200_12_meta" : { + "type" : "object", + "properties" : { + "count" : { + "type" : "integer" + } + } } }, "responses" : { @@ -3515,6 +4358,22 @@ } } } + }, + "202_accepted" : { + "description" : "Запрос выполнен успешно", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/inline_response_202" + }, + "example" : { + "success" : true, + "meta" : { + "message" : "Accepted" + } + } + } + } } }, "parameters" : { @@ -3551,6 +4410,17 @@ "type" : "integer" } }, + "label_id_path" : { + "name" : "label_id", + "in" : "path", + "description" : "id категории", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + }, "country_id" : { "name" : "country_id", "in" : "query", @@ -4236,6 +5106,121 @@ "order_by_direction" : "DESC", "operation" : "AND" } + }, + "business_groups" : { + "value" : { + "success" : true, + "data" : [ { + "id" : 1, + "title" : "Красота", + "image" : "https://yclients.com/images/business-groups/beauty.png", + "types" : [ { + "id" : 1, + "title" : "Салон красоты", + "business_group_id" : 1 + }, { + "id" : 18, + "title" : "Барбершоп", + "business_group_id" : 1 + } ] + }, { + "id" : 2, + "title" : "Медицина", + "image" : "https://yclients.com/images/business-groups/medicine.png", + "types" : [ { + "id" : 4, + "title" : "Медицинский центр", + "business_group_id" : 2 + }, { + "id" : 32, + "title" : "Стоматология", + "business_group_id" : 2 + } ] + } ], + "meta" : { + "count" : 2 + } + } + }, + "labels" : { + "value" : [ { + "id" : "703", + "salon_id" : "85", + "title" : "Полная онлайн-оплата", + "color" : "#6ba94b", + "icon" : "money", + "slug" : "prepaid_full", + "entity" : "2", + "deleted" : "0", + "not_editable" : "1" + }, { + "id" : "704", + "salon_id" : "85", + "title" : "Частичная онлайн-оплата", + "color" : "#eece5d", + "icon" : "usd", + "slug" : "prepaid_not_full", + "entity" : "2", + "deleted" : "0", + "not_editable" : "1" + }, { + "id" : "705", + "salon_id" : "85", + "title" : "Сотрудник важен", + "color" : "#ff2828", + "icon" : "lock", + "slug" : "", + "entity" : "2", + "deleted" : "0", + "not_editable" : "1" + }, { + "id" : "706", + "salon_id" : "85", + "title" : "Сотрудник не важен", + "color" : "#009800", + "icon" : "unlock", + "slug" : "", + "entity" : "2", + "deleted" : "0", + "not_editable" : "1" + } ] + }, + "labels_clients" : { + "value" : { + "success" : true, + "data" : [ { + "id" : 100, + "salon_id" : 85, + "title" : "VIP", + "color" : "#fbca04", + "icon" : "tag", + "entity" : 1, + "deleted" : 0, + "not_editable" : 0 + }, { + "id" : 101, + "salon_id" : 85, + "title" : "Лояльный", + "color" : "#bfd4f2", + "icon" : "tag", + "entity" : 1, + "deleted" : 0, + "not_editable" : 0 + }, { + "id" : 102, + "salon_id" : 85, + "title" : "Постоянный", + "color" : "#009800", + "icon" : "tag", + "entity" : 1, + "deleted" : 0, + "not_editable" : 0 + } ], + "meta" : { + "page" : 1, + "total_count" : 3 + } + } } }, "requestBodies" : { From 2ebd2396890ffd52e7f14b9d49381fec57c0c3c3 Mon Sep 17 00:00:00 2001 From: alek-pol Date: Thu, 21 Apr 2022 17:27:41 +0000 Subject: [PATCH 9/9] fix business_groups_with_types --- swagger/.swagger-codegen/VERSION | 2 +- swagger/oas yclient.json | 163 ++++++++++++++++++++----------- 2 files changed, 105 insertions(+), 60 deletions(-) diff --git a/swagger/.swagger-codegen/VERSION b/swagger/.swagger-codegen/VERSION index 402b44e..1098afd 100644 --- a/swagger/.swagger-codegen/VERSION +++ b/swagger/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.21 \ No newline at end of file +3.0.33 \ No newline at end of file diff --git a/swagger/oas yclient.json b/swagger/oas yclient.json index 04bd42b..6adbeda 100644 --- a/swagger/oas yclient.json +++ b/swagger/oas yclient.json @@ -44,13 +44,13 @@ "post" : { "tags" : [ "Authorization" ], "summary" : "Получение API-ключа пользователя", - "description" : "## Метод позволяет получить API-ключ пользователя\n ---\n__Авторизация с ключом Партнера__", + "description" : "## Метод позволяет получить API-ключ пользователя.\n ---\n__Авторизация с ключом Партнера__", "operationId" : "getUserToken", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body" + "$ref" : "#/components/schemas/auth_body" } } } @@ -300,7 +300,7 @@ "/company/{id}" : { "get" : { "tags" : [ "Companies" ], - "summary" : "Получить компанию", + "summary" : "Получить компанию по ID", "description" : "### Метод позволяет получить компанию:\n ---\n__Авторизация с ключом партнера__", "operationId" : "GetCompany", "parameters" : [ { @@ -372,7 +372,7 @@ }, "put" : { "tags" : [ "Companies" ], - "summary" : "Изменить компанию", + "summary" : "Изменить компанию по ID", "description" : "### Метод позволяет изменить компанию\n\n ---\n__Авторизация с ключами: партнера и пользователя__", "parameters" : [ { "name" : "id", @@ -389,7 +389,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body_1" + "$ref" : "#/components/schemas/company_id_body" } } } @@ -1240,6 +1240,7 @@ }, "responses" : { "201" : { + "description" : "", "content" : { "application/json" : { "schema" : { @@ -1316,7 +1317,7 @@ "/client/{company_id}/{id}" : { "get" : { "tags" : [ "Clients" ], - "summary" : "Получить клиента", + "summary" : "Получить клиента по ID", "description" : "### Метод позволяет получить данные клиента\n ---\n__Авторизация с ключами партнера и пользователя__", "operationId" : "getClient", "parameters" : [ { @@ -1342,6 +1343,7 @@ } ], "responses" : { "200" : { + "description" : "", "content" : { "application/json" : { "schema" : { @@ -1445,6 +1447,7 @@ }, "responses" : { "200" : { + "description" : "", "content" : { "application/json" : { "schema" : { @@ -1676,7 +1679,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body_2" + "$ref" : "#/components/schemas/labels_company_id_body" }, "examples" : { "entity_2" : { @@ -1768,7 +1771,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body_3" + "$ref" : "#/components/schemas/company_id_label_id_body" }, "example" : { "title" : "еntity_2", @@ -1976,7 +1979,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body_4" + "$ref" : "#/components/schemas/clients_create_body" }, "example" : { "title" : "stop", @@ -2206,8 +2209,6 @@ } }, "security" : [ { - "bearerPartner" : [ ] - }, { "bearerPartnerUser" : [ ] } ] } @@ -2215,13 +2216,13 @@ "/voip/integration/" : { "post" : { "tags" : [ "Voip" ], - "summary" : "Подключить интеграцию", + "summary" : "Подключить / отключить интеграцию; уведомление о звонке; сохраниение", "description" : "## Метод позволяет подключить интеграцию\n ---\n__Авторизация с ключом Партнера__\n \n ---\n__Возможности метода:__\n 1. __Подключить интеграцию__ - для использования api и активации доступа к настройкам в пользовательском интерфейсе необходимо активировать интеграцию, отправив запрос \"Подключить интеграцию\".После успешного подключения, в `сетевом` интерфейсе пользователя будет открыт доступ в раздел с настройками маршрутизаци\n 2. __Отключить интеграцию__ - Для отключения интеграции можно воспользоваться методом \"Отключить интеграцию\". После отключения интеграции закрывается доступ в раздел настроек пользовательского интерфейса, обработка запросов \"Уведомление о звонке\" и \"Сохранение информации о звонке\" не производится.\n 3. __Уведомление о звонке__ - Для отображения уведомлений о входящем звонке используется метод \"Уведомление о звонке\", в параметрах указыватеся тип звонка (\"incoming\", \"outgoing\", \"internal\"), но на текущий момент уведомления отображаются только для значения \"incoming\". Уведомления отображаются для пользователей, определенных на основе настроек маршрутизации. При одновременном указании параметров \"user\" и \"diversion\" приоритетным при поиске маршрутов является \"user\".\n 4. __Сохранение информации о звонке__ - Сохранение информации о звонке автоматически происходит в сетевую историю и в историю компаний сети в соответствии с настройками маршрутизации звонка.", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/body_5" + "$ref" : "#/components/schemas/voip_integration_body" }, "examples" : { "add" : { @@ -2492,7 +2493,8 @@ "description" : "Название города компании" }, "active" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "phone" : { "type" : "string", @@ -2552,7 +2554,8 @@ "description" : "True - если у компании выключен сервис SMS напоминаний клиентам" }, "reminds_sms_default" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "group_priority" : { "type" : "integer", @@ -2560,7 +2563,8 @@ "format" : "int32" }, "bookform_group_priority" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "description" : { "type" : "string", @@ -2568,15 +2572,18 @@ }, "photos" : { "type" : "array", + "description" : "", "items" : { "type" : "string" } }, "seance_delay_step" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "show_any_master" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "allow_delete_record" : { "type" : "boolean", @@ -2595,7 +2602,8 @@ "description" : "Запретить удалять записи за период. (В секундах)" }, "timetable_off" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "site" : { "type" : "string", @@ -2606,49 +2614,64 @@ "description" : "Почтовый код (индекс)" }, "business_group_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "business_type_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "is_charge_active" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "print_bill_on" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "print_bill_type" : { - "type" : "string" + "type" : "string", + "description" : "" }, "record_type_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "auto_pay_account_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "auto_pay_bank_account_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "is_admin_app" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "push_notification_phone_confirm" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "switched_to_tariff" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "sms_enabled" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "activity_record_clients_count_max" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "activity_online_record_clients_count_max" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "is_individual" : { - "type" : "boolean" + "type" : "boolean", + "description" : "" }, "social" : { "$ref" : "#/components/schemas/social" @@ -2765,7 +2788,8 @@ "description" : "статус увольнения (1 - уволен, 0 - не уволен)" }, "status" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "hidden" : { "type" : "integer", @@ -2845,7 +2869,8 @@ "description" : "статус увольнения (1 - уволен, 0 - не уволен)" }, "status" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "hidden" : { "type" : "integer", @@ -3361,7 +3386,8 @@ "description" : "статус увольнения (1 - уволен, 0 - не уволен)" }, "status" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "position_id" : { "type" : "integer" @@ -3388,7 +3414,7 @@ } } }, - "body" : { + "auth_body" : { "type" : "object", "properties" : { "login" : { @@ -3462,9 +3488,10 @@ "type" : "string", "description" : "Аккаунт в Telegram" } - } + }, + "example" : null }, - "body_1" : { + "company_id_body" : { "required" : [ "timezone", "title" ], "type" : "object", "properties" : { @@ -3526,10 +3553,12 @@ "description" : "Почтовый код (индекс)" }, "business_group_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "business_type_id" : { - "type" : "integer" + "type" : "integer", + "description" : "" }, "social" : { "$ref" : "#/components/schemas/companyid_social" @@ -3779,7 +3808,7 @@ } } }, - "body_2" : { + "labels_company_id_body" : { "required" : [ "color", "title" ], "type" : "object", "properties" : { @@ -3815,7 +3844,7 @@ } } }, - "body_3" : { + "company_id_label_id_body" : { "type" : "object", "properties" : { "title" : { @@ -3853,7 +3882,7 @@ } } }, - "body_4" : { + "clients_create_body" : { "required" : [ "color", "title" ], "type" : "object", "properties" : { @@ -3960,7 +3989,7 @@ } } }, - "body_5" : { + "voip_integration_body" : { "oneOf" : [ { "$ref" : "#/components/schemas/voip_add_dell" }, { @@ -4002,7 +4031,8 @@ "description" : "ID наименование филиала" } }, - "description" : "Объект с информацией об основном филиале" + "description" : "Объект с информацией об основном филиале", + "example" : null }, "access_group_access" : { "type" : "object", @@ -4053,7 +4083,8 @@ "type" : "integer" } }, - "description" : "Объект с правами доступа для управления сетью" + "description" : "Объект с правами доступа для управления сетью", + "example" : null }, "image_group_images" : { "type" : "object", @@ -4067,7 +4098,8 @@ "origin" : { "$ref" : "#/components/schemas/image" } - } + }, + "example" : null }, "categories_inner" : { "type" : "object", @@ -4094,7 +4126,8 @@ "type" : "string", "description" : "Текст ошибки" } - } + }, + "example" : null }, "inline_response_401_meta" : { "type" : "object", @@ -4102,7 +4135,8 @@ "message" : { "type" : "string" } - } + }, + "example" : null }, "inline_response_200_2_meta" : { "type" : "object", @@ -4110,7 +4144,9 @@ "total_count" : { "type" : "integer" } - } + }, + "nullable" : true, + "example" : null }, "inline_response_200_7_data" : { "type" : "object", @@ -4135,7 +4171,9 @@ "type" : "string", "description" : "Почта клиента" } - } + }, + "nullable" : true, + "example" : null }, "inline_response_200_8_data" : { "type" : "object", @@ -4172,7 +4210,8 @@ "type" : "integer", "description" : "Разрешены ли изменения категории (1 - разрешены, 0 - не разрешены)" } - } + }, + "example" : null }, "inline_response_200_8_meta" : { "type" : "object", @@ -4183,7 +4222,8 @@ "total_count" : { "type" : "integer" } - } + }, + "example" : null }, "inline_response_200_9_data" : { "type" : "object", @@ -4208,7 +4248,8 @@ "type" : "string", "description" : "ID категории" } - } + }, + "example" : null }, "inline_response_200_12_types" : { "type" : "object", @@ -4226,7 +4267,8 @@ "description" : "ID бизнес-группы" } }, - "description" : "Объект бизнес-типа имеет следующие поля" + "description" : "Объект бизнес-типа имеет следующие поля", + "example" : null }, "inline_response_200_12_data" : { "type" : "object", @@ -4251,7 +4293,8 @@ } } }, - "description" : "Объект бизнес-группы имеет следующие поля" + "description" : "Объект бизнес-группы имеет следующие поля", + "example" : null }, "inline_response_200_12_meta" : { "type" : "object", @@ -4259,7 +4302,8 @@ "count" : { "type" : "integer" } - } + }, + "example" : null } }, "responses" : { @@ -4324,6 +4368,7 @@ } }, "20x_client" : { + "description" : "", "content" : { "application/json" : { "schema" : {