{ "info": { "_postman_id": "9db69c57-535d-4cc6-bde9-2ef9358ab815", "name": "HelpDeskEddy API (release)", "description": "Чтобы начать работу с API, перейдите в Вашей системе через **\"Управление\"** в раздел **\"Глобальные настройки\"**, где Вы в подразделе **\"Система\"** найдёте API ключ. Данный ключ используется как основной метод авторизации в системе.\n\nПервая часть ключа (до двоеточия) - почта. \nВторая часть ключа (после двоеточия) - токен API.\n\nДве части данного ключа необходимо разместить во вкладке \"Variables\" (вы можете увидеть её сверху).\n\nВ этой же вкладке необходимо разместить адрес Вашей системы без слэшей и указания протокола (в столбцах Initial value и Current value)\n\nVariables: \nurl \nversion=2 \nlogin \ntoken", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "17522543" }, "item": [ { "name": "Депаратменты", "item": [ { "name": "Список департаментов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/departments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "departments", "" ] }, "description": "Данный запрос позволяет получить список всех департаментов" }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/departments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "departments", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 08:20:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "326" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 1, \n \"name\": { \n \"ru\": \"Отдел поддержки\", \n \"en\": \"Support Department\", \n \"ua\": \"Відділ підтримки\" \n }\n },\n {\n \"id\": 6,\n \"name\": {\n \"ru\": \"Отдел продаж\",\n \"en\": \"-\",\n \"ua\": \"\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/departments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "departments", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 10:44:43 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" }, { "key": "X-Xss-Protection", "value": "1; mode=block" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] } ] }, { "name": "Работа с заявками", "item": [ { "name": "Заявки", "item": [ { "name": "Получить заявки", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы, на которой будет проводится поиск.", "disabled": true }, { "key": "search", "value": "test", "description": "Поиск по заявкам.", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "user_list", "value": "1,2", "description": "Поиск заявок по ID владельца, через запятую.", "disabled": true }, { "key": "owner_list", "value": "1,2", "description": "Поиск заявок по ID исполнителя заявки, через запятую.", "disabled": true }, { "key": "status_list", "value": "open,closed", "description": "Поиск заявок по ID статуса заявки, через запятую.", "disabled": true }, { "key": "priority_list", "value": "1,2", "description": "Поиск заявок по ID приоритета заявки, через запятую.", "disabled": true }, { "key": "type_list", "value": "0,1", "description": "Поиск заявок по ID типа заявки, через запятую.", "disabled": true }, { "key": "freeze", "value": "1", "description": "Фильтр по замороженным заявкам.\n0 - только активные заявки\n1 - только замороженные заявки\nПо умолчанию в списке все заявки", "disabled": true }, { "key": "deleted", "value": "0", "description": "Фильтр по удалённым заявкам.\n0 - только активные заявки\n1 - только удалённые заявки\nЗначение по умолчанию - 0", "disabled": true }, { "key": "from_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все заявки, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"до\". \nПоказывает все заявки, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"от\". \nПоказывает все заявки, в которых были изменения с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"до\". \nПоказывает все заявки, в которых были изменения до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_created{desc}", "description": "Сортировка заявок, через запятую. \nЗаявки можно сортировать по параметрам:\ndate_created, date_updated, viewed_by_staff, viewed_by_client\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - date_created{desc}", "disabled": true } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению search. 1 - поиск по полному совпадению, 0 - стандартный поиск", "disabled": true }, { "key": "user_list", "value": "1,2", "description": "Поиск заявок по ID владельца, через запятую", "disabled": true }, { "key": "owner_list", "value": "1,2", "description": "Поиск заявок по ID исполнителя заявки, через запятую", "disabled": true }, { "key": "status_list", "value": "open,closed", "description": "Поиск заявок по ID статуса заявки, через запятую", "disabled": true }, { "key": "priority_list", "value": "1,2", "description": "Поиск заявок по ID приоритета заявки, через запятую", "disabled": true }, { "key": "type_list", "value": "0,1", "description": "Поиск заявок по ID типа заявки, через запятую", "disabled": true }, { "key": "freeze", "value": "0", "description": "Фильтр по замороженным заявкам. Значение 0 - только активные заявки, значение 1 - только замороженные заявки. По умолчанию в списке все заявки.", "disabled": true }, { "key": "deleted", "value": "0", "description": "Фильтр по удалённым заявкам. Значение 0 - только активные заявки, значение 1 - только удалённые заявки. Значение по умолчанию 0.", "disabled": true }, { "key": "from_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"от\". Показывает все заявки, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"до\". Показывает все заявки, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"от\". Показывает все заявки, в которых были изменения с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"до\". Показывает все заявки, в которых были изменения до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_created{desc}", "description": "Сортировка заявок, можно указать через запятую. Заявки можно сортировать по параметрам: date_created, date_updated, viewed_by_staff, viewed_by_client. Порядок сортировки {asc} (по возрастанию) и {desc} (по убыванию). Значение по умолчанию: date_created{desc}", "disabled": true } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 11:09:30 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "881" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"214\": {\n \"id\": 214,\n \"pid\": 0,\n \"unique_id\": \"HDE-214-03-04\",\n \"date_created\": \"2023-04-03 13:41:09\",\n \"date_updated\": \"2023-04-03 13:41:09\",\n \"title\": \"Title\",\n \"source\": \"api\",\n \"status_id\": \"open\",\n \"priority_id\": 2,\n \"type_id\": 0,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 0,\n \"owner_name\": \"\",\n \"owner_lastname\": \"\",\n \"owner_email\": \"\",\n \"user_id\": 1,\n \"user_name\": \"Иван\",\n \"user_lastname\": \"\",\n \"user_email\": \"test@gmail.com\",\n \"cc\": [],\n \"bcc\": [],\n \"followers\": [],\n \"ticket_lock\": 0,\n \"sla_date\": null,\n \"sla_flag\": 0,\n \"freeze_date\": null,\n \"freeze\": 0,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [],\n \"tags\": [],\n \"jira_issues\": []\n }\n },\n \"pagination\": {\n \"total\": 1,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы, на которой будет проводится поиск.", "disabled": true }, { "key": "search", "value": "test", "description": "Поиск по заявкам.", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "user_list", "value": "1,2", "description": "Поиск заявок по ID владельца, через запятую.", "disabled": true }, { "key": "owner_list", "value": "1,2", "description": "Поиск заявок по ID исполнителя заявки, через запятую.", "disabled": true }, { "key": "status_list", "value": "open,closed", "description": "Поиск заявок по ID статуса заявки, через запятую.", "disabled": true }, { "key": "priority_list", "value": "1,2", "description": "Поиск заявок по ID приоритета заявки, через запятую.", "disabled": true }, { "key": "type_list", "value": "0,1", "description": "Поиск заявок по ID типа заявки, через запятую.", "disabled": true }, { "key": "freeze", "value": "1", "description": "Фильтр по замороженным заявкам.\n0 - только активные заявки\n1 - только замороженные заявки\nПо умолчанию в списке все заявки", "disabled": true }, { "key": "deleted", "value": "0", "description": "Фильтр по удалённым заявкам.\n0 - только активные заявки\n1 - только удалённые заявки\nЗначение по умолчанию - 0", "disabled": true }, { "key": "from_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все заявки, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2017-12-31 00:00:00", "description": "Дата создания \"до\". \nПоказывает все заявки, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"от\". \nПоказывает все заявки, в которых были изменения с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2017-12-31 00:00:00", "description": "Дата изменения \"до\". \nПоказывает все заявки, в которых были изменения до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_created{desc}", "description": "Сортировка заявок, через запятую. \nЗаявки можно сортировать по параметрам:\ndate_created, date_updated, viewed_by_staff, viewed_by_client\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - date_created{desc}", "disabled": true } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 12:18:49 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить заявку", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "" ], "variable": [ { "key": "ticket_id", "value": "826", "description": "ID заявки (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id", "" ], "variable": [ { "key": "id", "value": "212", "description": "ID заявки" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 12:48:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "837" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 212,\n \"pid\": 0,\n \"unique_id\": \"HDE-212-03-04\",\n \"date_created\": \"2023-04-03 13:38:42\",\n \"date_updated\": \"2023-04-03 13:38:42\",\n \"title\": \"Тестовая заявка\",\n \"source\": \"api\",\n \"status_id\": \"open\",\n \"priority_id\": 2,\n \"type_id\": 0,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 0,\n \"owner_name\": \"\",\n \"owner_lastname\": \"\",\n \"owner_email\": \"\",\n \"user_id\": 70,\n \"user_name\": \"TestName\",\n \"user_lastname\": \"\",\n \"user_email\": \"test@gmail.com\",\n \"cc\": [],\n \"bcc\": [],\n \"followers\": [],\n \"ticket_lock\": 0,\n \"sla_date\": null,\n \"sla_flag\": 0,\n \"freeze_date\": null,\n \"freeze\": 0,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [],\n \"tags\": [],\n \"jira_issues\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "" ], "variable": [ { "key": "ticket_id", "value": "826", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:20:18 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id", "" ], "variable": [ { "key": "id", "value": "1", "description": "ID заявки, из которой будут получены все ответы" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 03 Apr 2023 12:45:46 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" } ] }, { "name": "Создать заявку (form-data)", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "123", "description": "ID родительской заявки.", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "Тема (название) заявки [обязательный]", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "Описание (название) заявки [обязательный]", "type": "text" }, { "key": "sla_date", "value": "01.01.2024 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "ID статуса заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "1", "description": "ID приоритета заявки.", "type": "text", "disabled": true }, { "key": "type_id", "value": "1", "description": "ID типа заявки.", "type": "text", "disabled": true }, { "key": "department_id", "value": "1", "description": "ID департамента заявки.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "false", "description": "Блокировка заявки. \ntrue - заявка будет создана заблокированной.\nfalse - заявка будет создана разблокированной.\nПо умолчанию - false.", "type": "text", "disabled": true }, { "key": "owner_id", "value": "30", "description": "ID исполнителя заявки.", "type": "text", "disabled": true }, { "key": "user_id", "value": "40", "description": "ID владельца (клиента) заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "test@gmail.com", "description": "Почта создателя (клиента) заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться э-почта пользователя. Если пользователь с данной почтой в системе не существует, он будет создан автоматически.\nЕсли не указан ни ID, ни почта владельца заявки, то заявка будет создана от лица создаетля системы.", "type": "text", "disabled": true }, { "key": "cc[]", "value": "test@example.com", "description": "Массив адресатов копий письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "test@example.com", "description": "Массив адресатов скрытой копий письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив сотрудников, следящих за заявкой.", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке от имени клиента/сотрудника.\nОт имени сотрудника - 0\nОт имени клиента - 1\nПо умолчанию - 1", "type": "text", "disabled": true }, { "key": "custom_fields[ID поля]", "value": "Значение поля", "description": "Массив индивидуальных полей заявки.\nВ квадратных скобках необходимо указать ID кастомного поля.", "type": "text", "disabled": true }, { "key": "tags[]", "value": "название метки 1, название метки 2", "description": "Массив названий меток.", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] }, "description": "Чтобы выбрать значения поля \"Связанные поля\" необходимо ID каждого поля в формате:\n\ncustom_fields\\[ID поля\\]\\[уровень\\] = ID значения\n\nПример: \ncustom_fields\\[12\\]\\[1\\] = 15 \ncustom_fields\\[12\\]\\[2\\] = 16" }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:49:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "703" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 218,\n \"pid\": 0,\n \"unique_id\": \"HDE-218-04-04\",\n \"date_created\": \"2023-04-04 11:49:14\",\n \"date_updated\": \"2023-04-04 11:49:14\",\n \"title\": \"Тестовая заявка\",\n \"source\": \"api\",\n \"status_id\": \"open\",\n \"priority_id\": 2,\n \"type_id\": 0,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 0,\n \"owner_name\": \"\",\n \"owner_lastname\": \"\",\n \"owner_email\": \"\",\n \"user_id\": 1,\n \"user_name\": \"Name\",\n \"user_lastname\": \"\",\n \"user_email\": \"test@gmail.com\",\n \"cc\": [],\n \"bcc\": [],\n \"followers\": [],\n \"ticket_lock\": 0,\n \"sla_date\": null,\n \"sla_flag\": 0,\n \"freeze_date\": null,\n \"freeze\": 0,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [],\n \"tags\": [],\n \"jira_issues\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "1", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:56:13 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Обязательные поля не заполнены", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text", "disabled": true }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text", "disabled": true }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:50:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "234" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {title} field\",\n \"details\": \"Required field {title} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {description} field\",\n \"details\": \"Required field {description} is missing or empty\"\n }\n ]\n}" }, { "name": "Нарушен формат даты в sla_date", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "1", "description": "Дата и время SLA.", "type": "text" }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "Баг, спам", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:55:00 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "139" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)\"\n }\n ]\n}" }, { "name": "Исполнитель должен быть в группе \"Сотрудники\"", "originalRequest": { "method": "POST", "header": [ { "key": "Authorization", "value": "", "type": "text", "disabled": true } ], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "40", "description": "ID исполнителя.", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 06:47:23 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "136" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} value is incorrect, user must be with staff permissions\"\n }\n ]\n}" }, { "name": "Пользователь с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "111", "description": "ID исполнителя.", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:53:57 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "109" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} with id {99} does not exist\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {99} does not exist\"\n }\n ]\n}" }, { "name": "Тип заявки имеет неверный ID или не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "5", "description": "ID типа.", "type": "text" }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:55:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "107" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {type_id} value is incorrect or empty\"\n }\n ]\n}" }, { "name": "Недопустимый параметр", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"pid\": \"123\",\r\n \"title\": \"Тестовая заявка\",\r\n \"description\": \"Описание заявки\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 40,\r\n \"user_email\": \"test@gmail.com\",\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"create_from_user\": 1,\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 09:50:12 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "92" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"{} field is not allowed\"\n }\n ]\n}" } ] }, { "name": "Создать заявку (JSON)", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"pid\": \"123\",\r\n \"title\": \"Тестовая заявка\",\r\n \"description\": \"Описание заявки\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 40,\r\n \"user_email\": \"test@gmail.com\",\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"create_from_user\": 1,\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:49:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "703" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 218,\n \"pid\": 0,\n \"unique_id\": \"HDE-218-04-04\",\n \"date_created\": \"2023-04-04 11:49:14\",\n \"date_updated\": \"2023-04-04 11:49:14\",\n \"title\": \"Тестовая заявка\",\n \"source\": \"api\",\n \"status_id\": \"open\",\n \"priority_id\": 2,\n \"type_id\": 0,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 0,\n \"owner_name\": \"\",\n \"owner_lastname\": \"\",\n \"owner_email\": \"\",\n \"user_id\": 1,\n \"user_name\": \"Name\",\n \"user_lastname\": \"\",\n \"user_email\": \"test@gmail.com\",\n \"cc\": [],\n \"bcc\": [],\n \"followers\": [],\n \"ticket_lock\": 0,\n \"sla_date\": null,\n \"sla_flag\": 0,\n \"freeze_date\": null,\n \"freeze\": 0,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [],\n \"tags\": [],\n \"jira_issues\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "1", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:56:13 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Обязательные поля не заполнены", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text", "disabled": true }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text", "disabled": true }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:50:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "234" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {title} field\",\n \"details\": \"Required field {title} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {description} field\",\n \"details\": \"Required field {description} is missing or empty\"\n }\n ]\n}" }, { "name": "Нарушен формат даты в sla_date", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "1", "description": "Дата и время SLA.", "type": "text" }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "Баг, спам", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Tue, 04 Apr 2023 08:55:00 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "139" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)\"\n }\n ]\n}" }, { "name": "Исполнитель должен быть в группе \"Сотрудники\"", "originalRequest": { "method": "POST", "header": [ { "key": "Authorization", "value": "", "type": "text", "disabled": true } ], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "40", "description": "ID исполнителя.", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 06:47:23 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "136" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} value is incorrect, user must be with staff permissions\"\n }\n ]\n}" }, { "name": "Пользователь с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "2", "description": "ID типа.", "type": "text", "disabled": true }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "111", "description": "ID исполнителя.", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:53:57 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "109" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} with id {99} does not exist\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {99} does not exist\"\n }\n ]\n}" }, { "name": "Тип заявки имеет неверный ID или не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "pid", "value": "12", "description": "ID родительской заявки.\nЕсли указать, то заявка будет создана в качестве подзаявки от заявки, ID которой укзаан", "type": "text", "disabled": true }, { "key": "title", "value": "Тестовая заявка", "description": "[Обязательный] Тема (название) заявки.", "type": "text" }, { "key": "description", "value": "Описание заявки", "description": "[Обязательный] Текст заявки.", "type": "text" }, { "key": "sla_date", "value": "01.01.2023 00:00", "description": "Дата и время SLA.", "type": "text", "disabled": true }, { "key": "status_id", "value": "v-processe", "description": "Статус заявки.", "type": "text", "disabled": true }, { "key": "priority_id", "value": "2", "description": "ID приоритета.", "type": "text", "disabled": true }, { "key": "type_id", "value": "5", "description": "ID типа.", "type": "text" }, { "key": "department_id", "value": "2", "description": "ID департамента.", "type": "text", "disabled": true }, { "key": "ticket_lock", "value": "true", "description": "Блокировка заявки.\ntrue - блокировать заявку\nfalse - разблокировать заявку", "type": "text", "disabled": true }, { "key": "owner_id", "value": "1", "description": "ID исполнителя.", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца заявки.", "type": "text", "disabled": true }, { "key": "user_email", "value": "emninatas@gmail.com", "description": "Электронная почта создателя заявки.\nЕсли не задан ID владельца заявки, то для создания заявки будет использоваться электронная почта, если пользователь не существует, то будет создан автоматически", "type": "text", "disabled": true }, { "key": "cc[]", "value": "john@example.com", "description": "Массив адресов для отправки копии письма.", "type": "text", "disabled": true }, { "key": "bcc[]", "value": "lia@example.com", "description": "Массив адресов для отправки скрытой копии письма.", "type": "text", "disabled": true }, { "key": "followers[]", "value": "1", "description": "Массив ID пользователей следящих за заявкой.\nПользователи должны быть в группе \"Сотрудники\".", "type": "text", "disabled": true }, { "key": "create_from_user", "value": "1", "description": "Первый ответ в заявке. \nОт имени сотрудника – 0\nОт имени клиента – 1 \nПо умолчанию – 1", "type": "text", "disabled": true }, { "key": "custom_fields[field_id]", "value": "12", "description": "Массив индивидуальных полей заявки.\nПример: custom_fields[field_id] = value\nВ случае иерархического поля, необходимо значение для каждого отдельного уровня:\ncustom_fields[field_id][1] = value\ncustom_fields[field_id][2] = value", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [], "disabled": true }, { "key": "tags[]", "value": "название метки", "description": "Массив меток.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 05 Apr 2023 07:55:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "107" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {type_id} value is incorrect or empty\"\n }\n ]\n}" }, { "name": "Недопустимый параметр", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"pid\": \"123\",\r\n \"title\": \"Тестовая заявка\",\r\n \"description\": \"Описание заявки\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 40,\r\n \"user_email\": \"test@gmail.com\",\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"create_from_user\": 1,\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 09:50:12 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "92" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"{} field is not allowed\"\n }\n ]\n}" } ] }, { "name": "Объединение заявок", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2134", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2135", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2130", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:19:10 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "929" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 2130,\n \"pid\": 0,\n \"unique_id\": \"WWX-50667\",\n \"date_created\": \"2023-10-20 13:17:22\",\n \"date_updated\": \"2023-10-20 13:19:10\",\n \"title\": \"1\",\n \"source\": \"system\",\n \"status_id\": \"open\",\n \"priority_id\": 2,\n \"type_id\": 0,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 0,\n \"owner_name\": \"\",\n \"owner_lastname\": \"\",\n \"owner_email\": \"\",\n \"user_id\": 1,\n \"user_name\": \"test\",\n \"user_lastname\": \"\",\n \"user_email\": \"test@gmail.com\",\n \"cc\": [],\n \"bcc\": [],\n \"followers\": [],\n \"ticket_lock\": 0,\n \"sla_date\": \"20.10.2023 13:18\",\n \"sla_flag\": 1,\n \"freeze_date\": null,\n \"freeze\": 0,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [\n {\n \"id\": 166,\n \"field_type\": \"text\",\n \"field_value\": \"\"\n },\n {\n \"id\": 170,\n \"field_type\": \"hierarchy\",\n \"field_value\": {\n \"1\": {\n \"id\": 0,\n \"name\": null\n }\n }\n },\n {\n \"id\": 251,\n \"field_type\": \"text\",\n \"field_value\": \"\"\n },\n {\n \"id\": 253,\n \"field_type\": \"select\",\n \"field_value\": {\n \"id\": 0,\n \"name\": null\n }\n }\n ],\n \"tags\": [],\n \"jira_issues\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2130", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:20:52 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка заблокирована", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132,2133", "description": "Массив заявок, которые будут объединены с главной заявкой.", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2130", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:21:43 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "100" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Ticket is locked\",\n \"details\": \"Ticket with id {2132} is locked\"\n }\n ]\n}" }, { "name": "Заявка удалена", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2133", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:24:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "102" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-403\",\n \"title\": \"Ticket is deleted\",\n \"details\": \"Ticket with id {2133} is deleted\"\n }\n ]\n}" }, { "name": "Параметр отсутствует или заполнен некорректно", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "2133", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:24:30 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "129" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {ticket_list} field\",\n \"details\": \"Required field {ticket_list} is missing or empty\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "ticket_list", "value": "2132", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/union/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "union", "" ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID главной заявки (с которой будет происходить объединение)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:26:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" } ] }, { "name": "Обновить заявку (JSON)", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "variable": [ { "key": "ticket_id", "value": "826", "description": "ID заявки [обязательный]" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (Обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 09:39:07 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1012" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 287,\n \"pid\": 0,\n \"unique_id\": \"HDE-3-A\",\n \"date_created\": \"2023-04-10 12:29:02\",\n \"date_updated\": \"2023-04-10 12:39:07\",\n \"title\": \"Тестовая заявка\",\n \"source\": \"api\",\n \"status_id\": \"v-processe\",\n \"priority_id\": 1,\n \"type_id\": 1,\n \"department_id\": 1,\n \"department_name\": \"Отдел поддержки\",\n \"owner_id\": 30,\n \"owner_name\": \"Имя\",\n \"owner_lastname\": \"Фамилия\",\n \"owner_email\": \"test@gmail.com\",\n \"user_id\": 2,\n \"user_name\": \"ClientName\",\n \"user_lastname\": \"\",\n \"user_email\": \"test_user@gmail.com\",\n \"cc\": [\n \"test@example.com\"\n ],\n \"bcc\": [\n \"test@example.com\"\n ],\n \"followers\": [\n 1,\n 30\n ],\n \"ticket_lock\": 0,\n \"sla_date\": null,\n \"sla_flag\": 0,\n \"freeze_date\": \"01.01.2024 00:00\",\n \"freeze\": 1,\n \"viewed_by_staff\": 1,\n \"viewed_by_client\": 0,\n \"rate\": \"\",\n \"rate_comment\": \"\",\n \"rate_date\": \"\",\n \"deleted\": 0,\n \"custom_fields\": [],\n \"tags\": [\n \"название метки 1\",\n \"название метки 2\"\n ],\n \"jira_issues\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https/{{url}}/api/v{{version}}/tickets/:id", "host": [ "https" ], "path": [ "{{url}}", "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": null } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:15:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https/{{url}}/api/v{{version}}/tickets/:id", "host": [ "https" ], "path": [ "{{url}}", "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": null } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:15:54 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" }, { "name": "Нарушен формат даты в sla_date/freeze_date", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:0\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:17:34 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "139" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)\"\n }\n ]\n}" }, { "name": "Исполнитель должен быть в группе \"Сотрудники\"", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 2,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:18:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "136" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} value is incorrect, user must be with staff permissions\"\n }\n ]\n}" }, { "name": "Пользователь с таким ID не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 99,\r\n \"user_id\": 99,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:19:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "203" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} with id {99} does not exist\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {99} does not exist\"\n }\n ]\n}" }, { "name": "Тип заявки имеет неверный ID или не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 9,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 99,\r\n \"user_id\": 99,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:21:22 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "298" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {type_id} value is incorrect or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {owner_id} with id {99} does not exist\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {99} does not exist\"\n }\n ]\n}" }, { "name": "Недопустимый параметр", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"title\": \"Тестовая заявка\",\r\n \"sla_date\": \"01.01.2024 00:00\",\r\n \"freeze_date\": \"01.01.2024 00:00\",\r\n \"status_id\": \"v-processe\",\r\n \"priority_id\": 1,\r\n \"type_id\": 1,\r\n \"department_id\": 1,\r\n \"ticket_lock\": false,\r\n \"owner_id\": 30,\r\n \"user_id\": 2,\r\n \"cc\": [\"test@example.com\"],\r\n \"bcc\": [\"test@example.com\"],\r\n \"followers\": [1, 30],\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n },\r\n \"tags\":[\"название метки 1\",\"название метки 2\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":id" ], "variable": [ { "key": "id", "value": "287", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Mon, 10 Apr 2023 10:25:39 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "92" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"{} field is not allowed\"\n }\n ]\n}" } ] }, { "name": "Удалить заявку", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id?delete=true", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "true", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false" } ], "variable": [ { "key": "ticket_id", "value": "2398", "description": "ID заявки (обязательный)" } ] } }, "response": [ { "name": "Пример ответа с удалением навсегда", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id?delete=true", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "true", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false" } ], "variable": [ { "key": "ticket_id", "value": "2396", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 23 Nov 2023 12:03:52 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Ticket with id {2396} successfully deleted\"\n }\n ]\n}" }, { "name": "Пример ответа с удалением в корзину", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id?delete=false", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "false", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false" } ], "variable": [ { "key": "ticket_id", "value": "2395", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 23 Nov 2023 12:04:32 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Ticket with id {2395} successfully removed\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "false", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2395", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 23 Nov 2023 12:05:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID уже в корзине", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id?delete=try", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "try", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false" } ], "variable": [ { "key": "ticket_id", "value": "2395", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 23 Nov 2023 12:06:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "102" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-403\",\n \"title\": \"Ticket is deleted\",\n \"details\": \"Ticket with id {2395} is deleted\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id?delete=true", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id" ], "query": [ { "key": "delete", "value": "true", "description": "Перенос в корзину или полное удаление.\nfalse - перенос в фильтр \"Корзина\"\ntrue - Полное удаленире из системы\nПо умолчнаию - false" } ], "variable": [ { "key": "ticket_id", "value": "23988", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 23 Nov 2023 12:06:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {23988} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Ответы", "item": [ { "name": "Получить ответы", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/?page=1", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы" } ], "variable": [ { "key": "ticket_id", "value": null, "description": "ID заявки [обязательный]" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/?page=1", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы" } ], "variable": [ { "key": "ticket_id", "value": "293", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 08:57:30 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "391" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"ticket_id\": 293,\n \"id\": 675,\n \"user_id\": 1,\n \"text\": \"
Text
\",\n \"date_created\": \"11:57:11 12.04.2023\",\n \"date_updated\": \"11:57:11 12.04.2023\",\n \"files\": []\n },\n {\n \"ticket_id\": 293,\n \"id\": 660,\n \"user_id\": 40,\n \"text\": \"Text\",\n \"date_created\": \"13:17:04 11.04.2023\",\n \"date_updated\": \"13:17:04 11.04.2023\",\n \"files\": []\n }\n ],\n \"pagination\": {\n \"total\": 2,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/?page=1", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы" } ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 08:59:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/?page=1", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы" } ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 08:59:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" } ] }, { "name": "Добавить ответ", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст сообщения", "type": "text" }, { "key": "user_id", "value": "1", "description": "Отправитель сообщения.\nЕсли не указан - сообщение отправится от лица пользователя API.", "type": "text" }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "826", "description": "ID заявки [обязательный]" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст ответа", "description": "Текст ответа", "type": "text" }, { "key": "user_id", "value": "1", "description": "Владелец ответа, в случае если не будет указан - владельцем будет пользователь API.", "type": "text" }, { "key": "files[]", "value": "", "description": "Массив приложений", "type": "file" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "300", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 09:10:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "333" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"ticket_id\": 300,\n \"id\": 683,\n \"user_id\": 1,\n \"text\": \"Текст ответа\",\n \"date_created\": \"12:10:05 12.04.2023\",\n \"date_updated\": \"12:10:05 12.04.2023\",\n \"files\": [\n {\n \"name\": \"file.txt\",\n \"url\": \"https://domain.helpdeskeddy.com/ru/file/download/...\",\n \"data_type\": \"php\"\n }\n ]\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст сообщения (ответа).", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца ответа.\nВ случае если не будет указан - владельцем будет пользователь API.", "type": "text" }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "300", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 09:13:32 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст сообщения (ответа).", "type": "text" }, { "key": "user_id", "value": "1", "description": "ID владельца ответа.\nВ случае если не будет указан - владельцем будет пользователь API.", "type": "text" }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 09:14:02 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" }, { "name": "Обязательное поле отсутствует или заполнено некорректно", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст сообщения (ответа).", "type": "text", "disabled": true }, { "key": "user_id", "value": "1", "description": "ID владельца ответа.\nВ случае если не будет указан - владельцем будет пользователь API.", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "300", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 09:15:02 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "108" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {text} field\",\n \"details\": \"Required field is missing or empty\"\n }\n ]\n}" }, { "name": "Пользователя с данным ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст сообщения (ответа).", "type": "text" }, { "key": "user_id", "value": "99", "description": "ID владельца ответа.\nВ случае если не будет указан - владельцем будет пользователь API.", "type": "text" }, { "key": "files[]", "description": "Массив файлов.", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", "" ], "variable": [ { "key": "ticket_id", "value": "300", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Wed, 12 Apr 2023 09:16:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "107" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {99} does not exist\"\n }\n ]\n}" } ] }, { "name": "Обновить ответ", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "2351", "description": "ID ответа (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновленный текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:46:41 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "191" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"ticket_id\": 518,\n \"id\": 1148,\n \"user_id\": 126,\n \"text\": \"Обновленный текст ответа\",\n \"date_created\": \"17:05:25 10.05.2023\",\n \"date_updated\": \"14:46:41 12.05.2023\",\n \"files\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновленный текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:50:13 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновленный текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "1000", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:50:46 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "296" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1000} does not exist\"\n }\n ]\n}" }, { "name": "Ответ с таким ID не существует или не находится в данной заявке", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"123\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "4999", "description": "ID ответа (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:52:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "120" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Post with id {4999} in ticket with id {518} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить ответ", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:57:07 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Post with id {1148} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации Copy", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновленный текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:50:13 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновленный текст ответа\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "1000", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "1148", "description": "ID ответа (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:50:46 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "296" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1000} does not exist\"\n }\n ]\n}" }, { "name": "Ответ с таким ID не существует или не находится в данной заявке", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"123\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/posts/:id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "posts", ":id", "" ], "variable": [ { "key": "ticket_id", "value": "518", "description": "ID заявки (обязательный)" }, { "key": "id", "value": "4999", "description": "ID ответа (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 12 May 2023 11:52:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "120" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Post with id {4999} in ticket with id {518} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Комментарии", "item": [ { "name": "Получить комментарии", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы (необязательный).", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2130", "description": "ID заявки (обязательный)." } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы (необязательный)", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2130", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:29:30 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "209" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"ticket_id\": 2130,\n \"id\": 494,\n \"user_id\": 1,\n \"text\": \"test
\",\n \"date_created\": \"13:29:24 20.10.2023\",\n \"visible\": \"staff\",\n \"files\": []\n }\n ],\n \"pagination\": {\n \"total\": 1,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы (необязательный)", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:30:47 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "295" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы (необязательный)", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:31:18 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" } ] }, { "name": "Добавить комментарий", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text" }, { "key": "user_id", "value": "2", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text", "disabled": true }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [], "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text" }, { "key": "user_id", "value": "2", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text" }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:37:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "134" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"ticket_id\": 2136,\n \"id\": 497,\n \"user_id\": 2,\n \"text\": \"Текст\",\n \"date_created\": \"13:37:19 20.10.2023\",\n \"visible\": \"staff\",\n \"files\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text" }, { "key": "user_id", "value": "2", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text" }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:37:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text" }, { "key": "user_id", "value": "2", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text" }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "1", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:40:18 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {1} does not exist\"\n }\n ]\n}" }, { "name": "Обязательное поле отсутствует или заполнено некорректно", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text", "disabled": true }, { "key": "user_id", "value": "2", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text" }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:40:56 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "108" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {text} field\",\n \"details\": \"Required field is missing or empty\"\n }\n ]\n}" }, { "name": "Пользователя с данным ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст", "description": "Текст комментария (обязательный)", "type": "text" }, { "key": "user_id", "value": "999", "description": "Владелец комментария\nЕсли не указывать, то владельцем будет пользователь API", "type": "text" }, { "key": "files[]", "description": "Массив файлов", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:38:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "108" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {user_id} with id {999} does not exist\"\n }\n ]\n}" } ] }, { "name": "Обновить комментарий", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст комментария\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки" }, { "key": "comment_id", "value": "499", "description": "ID комментария" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст комментария\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136" }, { "key": "comment_id", "value": "499" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:47:45 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "180" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"ticket_id\": 2136,\n \"id\": 499,\n \"user_id\": 1,\n \"text\": \"Обновлённый текст комментария\",\n \"date_created\": \"13:46:04 20.10.2023\",\n \"visible\": \"staff\",\n \"files\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст комментария\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136" }, { "key": "comment_id", "value": "499" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:48:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст комментария\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "21361" }, { "key": "comment_id", "value": "499" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:48:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {21361} does not exist\"\n }\n ]\n}" }, { "name": "Комментарий с таким ID не существует или не находится в данной заявке", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"text\": \"Обновлённый текст комментария\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136" }, { "key": "comment_id", "value": "4991" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:48:53 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "124" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "296" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Comment with id {4991} in ticket with id {2136} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить комментарий", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" }, { "key": "comment_id", "value": "499", "description": "ID комментария (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" }, { "key": "comment_id", "value": "499", "description": "ID комментария (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:50:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Comment with id {499} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" }, { "key": "comment_id", "value": "499", "description": "ID комментария (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:51:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявка с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "21361", "description": "ID заявки (обязательный)" }, { "key": "comment_id", "value": "499", "description": "ID комментария (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:52:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {21361} does not exist\"\n }\n ]\n}" }, { "name": "Комментарий с таким ID не существует или не находится в данной заявке", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/comments/:comment_id/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "comments", ":comment_id", "" ], "variable": [ { "key": "ticket_id", "value": "2136", "description": "ID заявки (обязательный)" }, { "key": "comment_id", "value": "499", "description": "ID комментария (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 10:51:08 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "123" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Comment with id {499} in ticket with id {2136} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Кастомные поля заявки", "item": [ { "name": "Опции связанных полей, выпадающего списка, мультикнопки", "item": [ { "name": "Получить опции кастомного поля", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:34:03 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "180" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 4578,\n \"name\": {\n \"ru\": \"Первый\",\n \"en\": \"\"\n }\n },\n {\n \"id\": 4579,\n \"name\": {\n \"ru\": \"Второй\",\n \"en\": \"\"\n }\n }\n ],\n \"pagination\": {\n \"total\": 2,\n \"per_page\": 50,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:34:37 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не является выпадающий списком, связанными полями или мультикнопкой", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "166", "description": "ID кастомного поля" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:32:21 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "197" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Custom field does not support options\",\n \"details\": \"Custom field with id {166} does not support options. Available field types: select, hierarchy, multi_button\"\n }\n ]\n}" } ] }, { "name": "Добавить опцию кастомного поля", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:40:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 4667,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "169", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:41:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "1699", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:42:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1699} does not exist\"\n }\n}" } ] }, { "name": "Добавить опцию для связанных полей на определённый уровень", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 4588,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 4588,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:46:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "116" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 4672,\n \"pid\": 4588,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 4588,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:47:35 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 4588,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" }, { "name": "Родительская опция с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 45881,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:41 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "106" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "295" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Parent option with id {45881} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить опцию кастомного поля", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4591", "description": "ID опции кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:50:57 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Option with id {4670} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:51:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Опция с таким ID не существует в этом кастомном поле", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:52:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Option with id {4670} does not exist\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:53:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" } ] } ], "description": "Общее ограничение на добавление/обновление опций составляет 100 записей за один запрос. Обязательным параметром опций является **name**.\n\n- Для добавления новой опции необходимо указать **name** - `{\"options\":[{\"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для добавление новой опции для связанных полей на любой уровень - используйте **pid** (**id** родительской опции) - `{\"options\":[{\"pid\": 21, \"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для обновлении существующей опции используйте параметр **id**, для изменений доступен только параметр **name** - `{\"options\":[{\"id\": 20,\"name\":{\"ru\":\"update option\",\"en\":\"update option\",\"ua\":\"update option\"}}]}`\n \n\nПеремещение опций связанных полей по уровням запрещены. Все новые опции добавляются в конец списка. Результатом на этот запрос будут возвращены все затронутые опции." }, { "name": "Получить список всех кастомных полей заявки", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:27:47 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "3495" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"166\": {\n \"id\": 166,\n \"name\": {\n \"ru\": \"Текстовое поле\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"text\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"167\": {\n \"id\": 167,\n \"name\": {\n \"ru\": \"Текстовая область\",\n \"en\": \"\",\n \"se\": \"\"\n },\n \"field_type\": \"textarea\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"168\": {\n \"id\": 168,\n \"name\": {\n \"ru\": \"Числовое поле\",\n \"en\": \"\",\n \"se\": \"\"\n },\n \"field_type\": \"number\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"169\": {\n \"id\": 169,\n \"name\": {\n \"ru\": \"Выпадающий список\",\n \"en\": \"\",\n \"se\": \"\"\n },\n \"field_type\": \"select\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"170\": {\n \"id\": 170,\n \"name\": {\n \"1\": {\n \"ru\": \"Связанные поля\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"field_type\": \"hierarchy\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"171\": {\n \"id\": 171,\n \"name\": {\n \"ru\": \"Дата\",\n \"en\": \"\"\n },\n \"field_type\": \"date\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"172\": {\n \"id\": 172,\n \"name\": {\n \"ru\": \"Время\",\n \"en\": \"\"\n },\n \"field_type\": \"time\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"173\": {\n \"id\": 173,\n \"name\": {\n \"ru\": \"Регулярное\",\n \"en\": \"\"\n },\n \"field_type\": \"regex\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"174\": {\n \"id\": 174,\n \"name\": {\n \"ru\": \"ЧЕКБОКС\",\n \"en\": \"\"\n },\n \"field_type\": \"checkbox\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"175\": {\n \"id\": 175,\n \"name\": {\n \"ru\": \"Файл\",\n \"en\": \"\",\n \"se\": \"\"\n },\n \"field_type\": \"file\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n },\n \"177\": {\n \"id\": 177,\n \"name\": {\n \"ru\": \"Мультикнопка\",\n \"en\": \"\"\n },\n \"field_type\": \"multi_button\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n }\n },\n \"pagination\": {\n \"total\": 11,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:40:40 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить кастомное поле заявки по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "166", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v{{version}}/custom_fields/:field_id", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:42:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "321" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 170,\n \"name\": {\n \"1\": {\n \"ru\": \"Связанные поля\",\n \"en\": \"\"\n }\n },\n \"field_type\": \"hierarchy\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n },\n \"user\": {\n \"view\": false,\n \"edit\": false,\n \"required_to_create_ticket\": false,\n \"required_to_close_ticket\": false\n }\n }\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v{{version}}/custom_fields/:field_id", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "170", "description": "ID поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:42:27 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "1", "description": "ID поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:43:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Аудит и биллинг заявок", "item": [ { "name": "Аудит заявки", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/audit/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "audit", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "user_list", "value": "2", "description": "Поиск по ID пользователя", "disabled": true }, { "key": "event_list", "value": "ticket_view", "description": "Поиск по типу события", "disabled": true }, { "key": "from_date_created", "value": "00:00:00 21.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "00:00:00 21.10.2023", "description": "События, созданные до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2137", "description": "ID заявки (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/audit/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "audit", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "user_list", "value": "2", "description": "Поиск по ID пользователя", "disabled": true }, { "key": "event_list", "value": "ticket_view", "description": "Поиск по типу события", "disabled": true }, { "key": "from_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2137", "description": "ID заявки (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:06:10 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "949" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"0\": {\n \"id\": 34467,\n \"event\": \"sla_overdue\",\n \"text\": {\n \"ru\": \"Нарушен SLA на выполнение\",\n \"en\": \"Violated SLA for execution\",\n \"se\": \"Нарушен SLA на выполнение\",\n \"ua\": \"Порушений SLA на виконання\"\n },\n \"user_id\": -2,\n \"group_id\": 2,\n \"user_name\": \"Система\",\n \"date_created\": \"14:01:28 20.05.2023\"\n },\n \"1\": {\n \"id\": 34466,\n \"event\": \"ticket_view\",\n \"text\": {\n \"ru\": \"Просмотр заявки\",\n \"en\": \"View request\",\n \"se\": \"Просмотр заявки\",\n \"ua\": \"Перегляд заявки\"\n },\n \"user_id\": 1,\n \"group_id\": 2,\n \"user_name\": \"Иван\",\n \"date_created\": \"13:56:23 20.05.2023\"\n },\n \"2\": {\n \"id\": 34465,\n \"event\": \"ticket_create\",\n \"text\": {\n \"ru\": \"Создание заявки\",\n \"en\": \"Create a request\",\n \"se\": \"Создание заявки\",\n \"ua\": \"Cтворення заявки\"\n },\n \"user_id\": 1,\n \"group_id\": 2,\n \"user_name\": \"Иван\",\n \"date_created\": \"13:56:22 20.05.2023\"\n }\n },\n \"pagination\": {\n \"total\": 3,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/audit/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "audit", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "user_list", "value": "2", "description": "Поиск по ID пользователя", "disabled": true }, { "key": "event_list", "value": "ticket_view", "description": "Поиск по типу события", "disabled": true }, { "key": "from_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2137", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:07:12 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявки с таким ID не сущетсвует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/audit/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "audit", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "user_list", "value": "2", "description": "Поиск по ID пользователя", "disabled": true }, { "key": "event_list", "value": "ticket_view", "description": "Поиск по типу события", "disabled": true }, { "key": "from_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "13:56:23 21.10.2023", "description": "События, созданные до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "21371", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:08:08 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {21371} does not exist\"\n }\n ]\n}" } ] }, { "name": "Биллинг заявки", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/billing/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "billing", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "staff_list", "value": "2", "description": "Поиск по ID сотрудников", "disabled": true }, { "key": "creator_list", "value": "1", "description": "Поиск по ID создателя события", "disabled": true }, { "key": "from_date_created", "value": "00:00:00 21.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "00:00:00 21.10.2023", "description": "События, созданные до указанного момента", "disabled": true }, { "key": "from_billing_date", "value": "00:00:00 21.10.2023", "description": "Дата работ с указанного момента", "disabled": true }, { "key": "to_billing_date", "value": "00:00:00 25.10.2023", "description": "Дата работ до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2137", "description": "ID заявки (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/billing/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "billing", "" ], "variable": [ { "key": "ticket_id", "value": "2137" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:09:32 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "318" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 269,\n \"action\": null,\n \"comment\": \"test\",\n \"spent_seconds\": 3720,\n \"paid_seconds\": 11040,\n \"staff_id\": 1,\n \"staff_name\": \"Иван\",\n \"billing_date\": \"14:09:00 20.05.2023\",\n \"creator_id\": 1,\n \"creator_name\": \"Иван\",\n \"date_created\": \"14:09:28 20.05.2023\"\n }\n ],\n \"pagination\": {\n \"total\": 1,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/billing/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "billing", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "staff_list", "value": "2", "description": "Поиск по ID сотрудников", "disabled": true }, { "key": "creator_list", "value": "1", "description": "Поиск по ID создателя события", "disabled": true }, { "key": "from_date_created", "value": "00:00:00 24.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "00:00:00 25.10.2023", "description": "События, созданные до указанного момента", "disabled": true }, { "key": "from_billing_date", "value": "00:00:00 24.10.2023", "description": "Дата работ с указанного момента", "disabled": true }, { "key": "to_billing_date", "value": "00:00:00 25.10.2023", "description": "Дата работ до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "2137", "description": "ID заявки (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:26:46 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Заявки с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/tickets/:ticket_id/billing/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "tickets", ":ticket_id", "billing", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "staff_list", "value": "2", "description": "Поиск по ID сотрудников", "disabled": true }, { "key": "creator_list", "value": "1", "description": "Поиск по ID создателя события", "disabled": true }, { "key": "from_date_created", "value": "00:00:00 24.10.2023", "description": "События, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "00:00:00 25.10.2023", "description": "События, созданные до указанного момента", "disabled": true }, { "key": "from_billing_date", "value": "00:00:00 24.10.2023", "description": "Дата работ с указанного момента", "disabled": true }, { "key": "to_billing_date", "value": "00:00:00 25.10.2023", "description": "Дата работ до указанного момента", "disabled": true } ], "variable": [ { "key": "ticket_id", "value": "21371", "description": "ID заявки (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:27:03 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Ticket with id {21371} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Статусы, приоритеты, типы", "item": [ { "name": "Список статусов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "statuses", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "statuses", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:29:42 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "767" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": \"open\",\n \"name\": {\n \"ru\": \"Открыто\",\n \"en\": \"Open\",\n \"se\": \"Открыто\",\n \"ua\": \"Открыто\"\n }\n },\n {\n \"id\": \"v-processe\",\n \"name\": {\n \"ru\": \"В процессе\",\n \"en\": \"In progress\",\n \"se\": \"В процессе\",\n \"ua\": \"В процессе\"\n }\n },\n {\n \"id\": \"closed\",\n \"name\": {\n \"ru\": \"Выполнено\",\n \"en\": \"Closed\",\n \"se\": \"Выполнено\",\n \"ua\": \"Выполнено\"\n }\n },\n {\n \"id\": \"16\",\n \"name\": {\n \"ru\": \"На паузе\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"На паузе\"\n }\n },\n {\n \"id\": \"17\",\n \"name\": {\n \"ru\": \"Перерыв\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Перерыв\"\n }\n },\n {\n \"id\": \"18\",\n \"name\": {\n \"ru\": \"Технический перерыв\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Технический перерыв\"\n }\n },\n {\n \"id\": \"20\",\n \"name\": {\n \"ru\": \"Тестовый статус\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Тестовый статус\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "statuses", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:30:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Список приоритетов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/priorities/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "priorities", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/priorities/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "priorities", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:32:29 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "399" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 2,\n \"name\": {\n \"ru\": \"Стандартно\",\n \"en\": \"Standard\",\n \"se\": \"Стандартно\",\n \"ua\": \"Стандартно\"\n }\n },\n {\n \"id\": 3,\n \"name\": {\n \"ru\": \"Средний\",\n \"en\": \"Medium\",\n \"se\": \"Средний\",\n \"ua\": \"Средний\"\n }\n },\n {\n \"id\": 1,\n \"name\": {\n \"ru\": \"Срочно\",\n \"en\": \"Very urgent\",\n \"se\": \"Срочно\",\n \"ua\": \"Срочно\"\n }\n },\n {\n \"id\": 5,\n \"name\": {\n \"ru\": \"Низкий\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Низкий\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/priorities/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "priorities", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:32:46 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Список типов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/types/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "types", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/types/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "types", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:33:36 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "473" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 0,\n \"name\": {\n \"ru\": \"Без типа\",\n \"en\": \"Without type\",\n \"se\": \"Без типа\",\n \"ua\": \"Без типа\"\n }\n },\n {\n \"id\": 2,\n \"name\": {\n \"ru\": \"Задание\",\n \"en\": \"Task\",\n \"se\": \"Задание\",\n \"ua\": \"Задание\"\n }\n },\n {\n \"id\": 3,\n \"name\": {\n \"ru\": \"Ошибка\",\n \"en\": \"Bug\",\n \"se\": \"Ошибка\",\n \"ua\": \"Ошибка\"\n }\n },\n {\n \"id\": 6,\n \"name\": {\n \"ru\": \"Важная\",\n \"en\": \"-\",\n \"se\": \"Важная\",\n \"ua\": \"Важная\"\n }\n },\n {\n \"id\": 7,\n \"name\": {\n \"ru\": \"Тестовый\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Тестовый\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/types/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "types", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Fri, 20 Oct 2023 11:34:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] } ] } ] }, { "name": "Работа с контактами", "item": [ { "name": "Пользователи", "item": [ { "name": "Группы и статусы", "item": [ { "name": "Список пользовательских групп", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/groups/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "groups", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/groups/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "groups", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:15:11 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1298" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 6,\n \"type\": \"staff\",\n \"name\": {\n \"ru\": \"1 линия поддержки\",\n \"en\": \"-\",\n \"ua\": \"-\"\n },\n \"disable\": 0\n },\n {\n \"id\": 2,\n \"type\": \"staff\",\n \"name\": {\n \"ru\": \"Администратор\",\n \"en\": \"-\",\n \"ua\": \"-\"\n },\n \"disable\": 0\n },\n {\n \"id\": 1,\n \"type\": \"user\",\n \"name\": {\n \"ru\": \"Клиент\",\n \"en\": \"-\",\n \"ua\": \"-\"\n },\n \"disable\": 0\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/groups/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "groups", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:15:32 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Список пользовательских статусов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/user_statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "user_statuses", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/user_statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "user_statuses", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:16:27 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "857" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": \"online\",\n \"name\": {\n \"ru\": \"В сети\",\n \"en\": \"Online\",\n \"se\": \"\"\n },\n \"color\": \"#67c23a\"\n },\n {\n \"id\": \"on-hold\",\n \"name\": {\n \"ru\": \"В ожидании\",\n \"en\": \"On hold\",\n \"se\": \"\"\n },\n \"color\": \"#e6a23c\"\n },\n {\n \"id\": \"offline\",\n \"name\": {\n \"ru\": \"Не в сети\",\n \"en\": \"Offline\",\n \"se\": \"\"\n },\n \"color\": \"#f56c6c\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/user_statuses/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "user_statuses", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:16:53 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] } ] }, { "name": "Получить список пользователей", "request": { "auth": { "type": "basic", "basic": [ { "key": "username", "value": "", "type": "string" }, { "key": "password", "value": "\n", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница результатов поиска", "disabled": true }, { "key": "search", "value": "Jogn Doe", "description": "Поиск по информации пользователей", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "group_list", "value": "1,2", "description": "Поиск по ID группы пользователя, через запятую", "disabled": true }, { "key": "id_list", "value": "20,121", "description": "Поиск пользователей по ID через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает всех пользователей, созданных с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает всех пользователей, созданных до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает всех пользователей, изменённых с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения\"до\".\nПоказывает всех пользователей, изменённых до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка пользователй, через запятую. \nПользователей можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/?search=1234567", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница результатов поиска", "disabled": true }, { "key": "search", "value": "1234567", "description": "Поиск по информации пользователей (теле" }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "group_list", "value": "1,2", "description": "Поиск по ID группы пользователя, через запятую", "disabled": true }, { "key": "id_list", "value": "20,121", "description": "Поиск пользователей по ID через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает всех пользователей, созданных с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает всех пользователей, созданных до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает всех пользователей, изменённых до указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает всех пользователей, изменённых до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка пользователй, через запятую. \nПользователей можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:12:41 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1229" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 414,\n \"date_created\": \"2023-11-04 23:54:43\",\n \"date_updated\": \"2023-11-09 16:00:36\",\n \"name\": \" user test\",\n \"lastname\": \"\",\n \"alias\": \"\",\n \"email\": \"user@test.com\",\n \"phone\": \"1234567\",\n \"skype\": \"\",\n \"website\": \"\",\n \"organization\": \"\",\n \"status\": \"active\",\n \"language\": \"ru\",\n \"notifications\": \"1\",\n \"group\": {\n \"id\": 45,\n \"type\": \"user\",\n \"name\": {\n \"ru\": \"Клиент Физ\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Клиент Физ\"\n },\n \"disable\": 0\n },\n \"ldap_username\": null,\n \"user_status\": \"offline\",\n \"department\": [\n 1\n ],\n \"custom_fields\": [\n {\n \"id\": 37,\n \"field_type\": \"text\",\n \"field_value\": \"поле\"\n },\n {\n \"id\": 38,\n \"field_type\": \"textarea\",\n \"field_value\": \"Текстовая\"\n },\n {\n \"id\": 39,\n \"field_type\": \"select\",\n \"field_value\": {\n \"id\": 31,\n \"name\": {\n \"ru\": \"Тест1\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n }\n },\n {\n \"id\": 40,\n \"field_type\": \"checkbox\",\n \"field_value\": 1\n },\n {\n \"id\": 41,\n \"field_type\": \"date\",\n \"field_value\": \"31.12.2023\"\n },\n {\n \"id\": 42,\n \"field_type\": \"number\",\n \"field_value\": \"1234\"\n }\n ],\n \"api_key\": \"<скрыто>\"\n }\n ],\n \"pagination\": {\n \"total\": 1,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница результатов поиска", "disabled": true }, { "key": "search", "value": "Jogn Doe", "description": "Поиск по информации пользователей (теле", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "group_list", "value": "1,2", "description": "Поиск по ID группы пользователя, через запятую", "disabled": true }, { "key": "id_list", "value": "20,121", "description": "Поиск пользователей по ID через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает всех пользователей, созданных с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает всех пользователей, созданных до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает всех пользователей, изменённых до указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает всех пользователей, изменённых до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка пользователй, через запятую. \nПользователей можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:15:00 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить пользователя по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "414", "description": "ID пользователя" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "414", "description": "ID пользователя" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:22:19 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1155" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 414,\n \"date_created\": \"2023-11-04 23:54:43\",\n \"date_updated\": \"2023-11-09 16:00:36\",\n \"name\": \" user test\",\n \"lastname\": \"\",\n \"alias\": \"\",\n \"email\": \"user@test.com\",\n \"phone\": \"1234567\",\n \"skype\": \"\",\n \"website\": \"\",\n \"organization\": \"\",\n \"status\": \"active\",\n \"language\": \"ru\",\n \"notifications\": \"1\",\n \"group\": {\n \"id\": 45,\n \"type\": \"user\",\n \"name\": {\n \"ru\": \"Клиент Физ\",\n \"en\": \"-\",\n \"se\": \"-\",\n \"ua\": \"Клиент Физ\"\n },\n \"disable\": 0\n },\n \"ldap_username\": null,\n \"user_status\": \"offline\",\n \"department\": [\n 1\n ],\n \"custom_fields\": [\n {\n \"id\": 37,\n \"field_type\": \"text\",\n \"field_value\": \"поле\"\n },\n {\n \"id\": 38,\n \"field_type\": \"textarea\",\n \"field_value\": \"Текстовая\"\n },\n {\n \"id\": 39,\n \"field_type\": \"select\",\n \"field_value\": {\n \"id\": 31,\n \"name\": {\n \"ru\": \"Тест1\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n }\n },\n {\n \"id\": 40,\n \"field_type\": \"checkbox\",\n \"field_value\": 1\n },\n {\n \"id\": 41,\n \"field_type\": \"date\",\n \"field_value\": \"31.12.2023\"\n },\n {\n \"id\": 42,\n \"field_type\": \"number\",\n \"field_value\": \"1234\"\n }\n ],\n \"api_key\": \"<скрыто>\"\n }\n ],\n \"pagination\": {\n \"total\": 1,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "414", "description": "ID пользователя" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:22:52 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "296" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Пользователя с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "414", "description": "ID пользователя" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:23:24 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "96" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"User with id {4145} does not exist\"\n }\n ]\n}" } ] }, { "name": "Добавить пользователя", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Василий", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "60", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "fa", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "testuser@test.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:36:08 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "910" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 420,\n \"date_created\": \"2023-11-16 12:36:08\",\n \"date_updated\": \"2023-11-16 12:36:08\",\n \"name\": \"Иван\",\n \"lastname\": \"\",\n \"alias\": \"\",\n \"email\": \"testuser@test.com\",\n \"phone\": \"\",\n \"skype\": \"\",\n \"website\": \"\",\n \"organization\": \"\",\n \"status\": \"active\",\n \"language\": \"ru\",\n \"notifications\": \"1\",\n \"group\": {\n \"id\": 1,\n \"type\": \"user\",\n \"name\": {\n \"ru\": \"Клиент\",\n \"en\": \"-\",\n \"se\": \"Клиент\",\n \"ua\": \"Клиент\"\n },\n \"disable\": 0\n },\n \"ldap_username\": null,\n \"user_status\": \"offline\",\n \"department\": [\n 1,\n 8\n ],\n \"custom_fields\": [\n {\n \"id\": 37,\n \"field_type\": \"text\",\n \"field_value\": \"\"\n },\n {\n \"id\": 38,\n \"field_type\": \"textarea\",\n \"field_value\": \"\"\n },\n {\n \"id\": 39,\n \"field_type\": \"select\",\n \"field_value\": {\n \"id\": 0,\n \"name\": null\n }\n },\n {\n \"id\": 40,\n \"field_type\": \"checkbox\",\n \"field_value\": 0\n },\n {\n \"id\": 41,\n \"field_type\": \"date\",\n \"field_value\": \"\"\n },\n {\n \"id\": 42,\n \"field_type\": \"number\",\n \"field_value\": \"\"\n },\n {\n \"id\": 43,\n \"field_type\": \"hierarchy\",\n \"field_value\": {\n \"1\": {\n \"id\": 0,\n \"name\": null\n }\n }\n }\n ],\n \"api_key\": \"303da4c8-b5cb-49f4-a39d-7f51ebda2de5\"\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "testuser@test.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:44:49 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Не заполнен один из обязательных параметров", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text", "disabled": true }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "testuser@test.com", "description": "Э-почта (обязательный)", "type": "text", "disabled": true }, { "key": "phone", "value": "", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text", "disabled": true }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text", "disabled": true }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:46:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "557" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Required {name} field\",\n \"details\": \"Required field {name} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {email} field\",\n \"details\": \"Required field {email} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {group_id} field\",\n \"details\": \"Required field {group_id} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {department} field\",\n \"details\": \"Required field {department} is missing or empty\"\n },\n {\n \"code\": \"e-411\",\n \"title\": \"Required {password} field\",\n \"details\": \"Required field {password} is missing or empty\"\n }\n ]\n}" }, { "name": "Некорректный формат почты", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "testusertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text" }, { "key": "organiz_id", "value": "1", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:47:59 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Email {testusertest.com} is incorrect\"\n }\n ]\n}" }, { "name": "Организации с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text" }, { "key": "organiz_id", "value": "111", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text" }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:48:34 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Organization with id {111} does not exist\"\n }\n ]\n}" }, { "name": "Параметр \"статус\" некорректно заполнен или содержит пустое значение", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test11@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "60", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text" }, { "key": "language", "value": "", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:50:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "144" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {status} is incorrect or empty. Available values: active, disabled, fired.\"\n }\n ]\n}" }, { "name": "Поле \"язык\" неккоректно заполнено или содержит пустое значение", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test11@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "60", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "fa", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text" }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:51:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "137" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {language} is incorrect or empty. Available values: ru, en, se, ua.\"\n }\n ]\n}" }, { "name": "Группы с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test11@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "60", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "fa", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "111", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "1", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:51:49 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Group with id {111} does not exist\"\n }\n ]\n}" }, { "name": "Департамента с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Иван", "description": "Имя (обязательный)", "type": "text" }, { "key": "lastname", "value": "Васильев", "description": "Фамилия", "type": "text", "disabled": true }, { "key": "alias", "value": "Псевдоним", "description": "Псевдоним", "type": "text", "disabled": true }, { "key": "email", "value": "test11@usertest.com", "description": "Э-почта (обязательный)", "type": "text" }, { "key": "phone", "value": "+79994441122", "description": "Телефон", "type": "text", "disabled": true }, { "key": "skype", "value": "test", "description": "Скайп", "type": "text", "disabled": true }, { "key": "website", "value": "https://test.com", "description": "Вебсайт", "type": "text", "disabled": true }, { "key": "organization", "value": "Новая организация", "description": "Название новой или существующей компании. Если заполнено — поле \"organiz_id\" не учитывается.", "type": "text", "disabled": true }, { "key": "organiz_id", "value": "60", "description": "ID существующей компании.\nНе учитывается, если заполнено \"organization\"", "type": "text", "disabled": true }, { "key": "status", "value": "incative", "description": "Статус пользователя.\nactive - активен \ndisabled - заблокирован\nfired - уволен", "type": "text", "disabled": true }, { "key": "language", "value": "fa", "description": "Язык пользователя. Доступны все активные языки в системе", "type": "text", "disabled": true }, { "key": "notifications", "value": "1", "description": "Уведомления на почту.\n0 - отключены. \n0 - включены.", "type": "text", "disabled": true }, { "key": "group_id", "value": "1", "description": "ID группы", "type": "text" }, { "key": "department[]", "value": "111", "description": "Массив доступных департаментов (обязательный)", "type": "text" }, { "key": "password", "value": "123456", "description": "Пароль (обязательный)", "type": "text" } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:52:12 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Department with id {111} does not exist\"\n }\n ]\n}" } ] }, { "name": "Обновить пользователя (JSON)", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:57:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1037" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 422,\n \"date_created\": \"2023-11-16 12:49:28\",\n \"date_updated\": \"2023-11-16 12:57:06\",\n \"name\": \"Иван\",\n \"lastname\": \"\",\n \"alias\": \"\",\n \"email\": \"test1@usertest.com\",\n \"phone\": \"\",\n \"skype\": \"\",\n \"website\": \"\",\n \"organization\": {\n \"id\": \"74\",\n \"name\": \"Новая организация1\",\n \"domains\": \"\",\n \"address\": \"\",\n \"phone\": \"\",\n \"email\": \"test1@usertest.com\",\n \"web\": \"\"\n },\n \"status\": \"active\",\n \"language\": \"ru\",\n \"notifications\": \"1\",\n \"group\": {\n \"id\": 1,\n \"type\": \"user\",\n \"name\": {\n \"ru\": \"Клиент\",\n \"en\": \"-\",\n \"se\": \"Клиент\",\n \"ua\": \"Клиент\"\n },\n \"disable\": 0\n },\n \"ldap_username\": null,\n \"user_status\": \"offline\",\n \"department\": [\n 1\n ],\n \"custom_fields\": [\n {\n \"id\": 37,\n \"field_type\": \"text\",\n \"field_value\": \"\"\n },\n {\n \"id\": 38,\n \"field_type\": \"textarea\",\n \"field_value\": \"\"\n },\n {\n \"id\": 39,\n \"field_type\": \"select\",\n \"field_value\": {\n \"id\": 0,\n \"name\": null\n }\n },\n {\n \"id\": 40,\n \"field_type\": \"checkbox\",\n \"field_value\": 0\n },\n {\n \"id\": 41,\n \"field_type\": \"date\",\n \"field_value\": \"\"\n },\n {\n \"id\": 42,\n \"field_type\": \"number\",\n \"field_value\": \"\"\n },\n {\n \"id\": 43,\n \"field_type\": \"hierarchy\",\n \"field_value\": {\n \"1\": {\n \"id\": 0,\n \"name\": null\n }\n }\n }\n ],\n \"api_key\": \"5bfe1a0d-10e2-43ba-b71e-aef5df9a1676\"\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:57:53 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Некорректный формат почты", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:47:59 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Email {testusertest.com} is incorrect\"\n }\n ]\n}" }, { "name": "Организации с таким ID не существует", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:48:34 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Organization with id {111} does not exist\"\n }\n ]\n}" }, { "name": "Параметр \"статус\" некорректно заполнен или содержит пустое значение", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий11111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:50:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "144" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {status} is incorrect or empty. Available values: active, disabled, fired.\"\n }\n ]\n}" }, { "name": "Поле \"язык\" неккоректно заполнено или содержит пустое значение", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:51:04 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "137" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Field {language} is incorrect or empty. Available values: ru, en, se, ua.\"\n }\n ]\n}" }, { "name": "Группы с таким ID не существует", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:51:49 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Group with id {111} does not exist\"\n }\n ]\n}" }, { "name": "Департамента с таким ID не существует", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Василий111\",\r\n \"lastname\": \"Васильев\",\r\n \"alias\": \"Псевдоним\",\r\n \"email\": \"test@usertest.com\",\r\n \"phone\": \"+79994441122\",\r\n \"skype\": \"test\",\r\n \"website\": \"https://test.com\",\r\n \"organization\": \"Новая организация\",\r\n \"organiz_id\": \"60\",\r\n \"status\": \"incative\",\r\n \"language\": \"ru\",\r\n \"notifications\": \"1\",\r\n \"group_id\": \"1\",\r\n \"department\":[\r\n 1,\r\n 8\r\n ],\r\n \"password\": \"123456\",\r\n \"user_status\": \"online\",\r\n \"custom_fields\":{\r\n \"130\":{\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 09:52:12 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Department with id {111} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить пользователя", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:22:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "102" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"User with id {422} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:24:10 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Пользователя с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/:user_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", ":user_id" ], "variable": [ { "key": "user_id", "value": "422", "description": "ID пользователя (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:22:27 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "95" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"User with id {422} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Кастомные поля пользователей", "item": [ { "name": "Опции связанных полей и выпадающего списка", "item": [ { "name": "Получить опции кастомного поля", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:43:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "488" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 41,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Столы\"\n }\n },\n {\n \"id\": 42,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Стулья\"\n }\n },\n {\n \"id\": 43,\n \"pid\": 41,\n \"name\": {\n \"ru\": \"Деревянные\"\n }\n },\n {\n \"id\": 44,\n \"pid\": 41,\n \"name\": {\n \"ru\": \"Пластиковые\"\n }\n },\n {\n \"id\": 45,\n \"pid\": 42,\n \"name\": {\n \"ru\": \"Офисные\"\n }\n },\n {\n \"id\": 46,\n \"pid\": 42,\n \"name\": {\n \"ru\": \"Барные\"\n }\n },\n {\n \"id\": 47,\n \"pid\": 45,\n \"name\": {\n \"ru\": \"Кожаные\"\n }\n },\n {\n \"id\": 48,\n \"pid\": 45,\n \"name\": {\n \"ru\": \"Тканевые\"\n }\n }\n ],\n \"pagination\": {\n \"total\": 8,\n \"per_page\": 50,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:44:47 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:45:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] }, { "name": "Добавить опцию кастомного поля", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:40:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 49,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:41:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:42:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] }, { "name": "Добавить опцию для связанных полей на определённый уровень", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:46:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "116" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 51,\n \"pid\": 43,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:47:35 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" }, { "name": "Родительская опция с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 433,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:41 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "106" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "295" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Parent option with id {433} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить опцию кастомного поля", "request": { "auth": { "type": "basic", "basic": [ { "key": "username", "value": "", "type": "string" }, { "key": "password", "value": "\n", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "49", "description": "ID опции кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "49", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:51:45 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Option with id {49} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "49", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:52:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Опция с таким ID не существует в этом кастомном поле", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:52:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Option with id {4670} does not exist\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id/options/:option_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id", "options", ":option_id" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" }, { "key": "option_id", "value": "4670", "description": "ID опции кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:53:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" } ] } ], "description": "Общее ограничение на добавление/обновление опций составляет 100 записей за один запрос. Обязательным параметром опций является **name**.\n\n- Для добавления новой опции необходимо указать **name** - `{\"options\":[{\"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для добавление новой опции для связанных полей на любой уровень - используйте **pid** (**id** родительской опции) - `{\"options\":[{\"pid\": 21, \"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для обновлении существующей опции используйте параметр **id**, для изменений доступен только параметр **name** - `{\"options\":[{\"id\": 20,\"name\":{\"ru\":\"update option\",\"en\":\"update option\",\"ua\":\"update option\"}}]}`\n \n\nПеремещение опций связанных полей по уровням запрещены. Все новые опции добавляются в конец списка. Результатом на этот запрос будут возвращены все затронутые опции." }, { "name": "Получить список всех кастомных полей контактов", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:32:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "1623" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"44\": {\n \"id\": 44,\n \"name\": {\n \"ru\": \"Текстовое поле\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"text\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"45\": {\n \"id\": 45,\n \"name\": {\n \"ru\": \"Текстовая область\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"textarea\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"46\": {\n \"id\": 46,\n \"name\": {\n \"ru\": \"Выпадающий список\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"select\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"47\": {\n \"id\": 47,\n \"name\": {\n \"ru\": \"Чекбокс\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"checkbox\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"48\": {\n \"id\": 48,\n \"name\": {\n \"ru\": \"Дата\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"date\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"49\": {\n \"id\": 49,\n \"name\": {\n \"ru\": \"Числовое поле\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"field_type\": \"number\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n },\n \"50\": {\n \"id\": 50,\n \"name\": {\n \"1\": {\n \"ru\": \"Свазянные поля\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"field_type\": \"hierarchy\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n }\n },\n \"pagination\": {\n \"total\": 7,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:36:22 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить кастомное поле пользователей по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:38:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "234" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 50,\n \"name\": {\n \"1\": {\n \"ru\": \"Свазянные поля\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"field_type\": \"hierarchy\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:38:54 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/users/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "users", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:39:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] } ] }, { "name": "Компании", "item": [ { "name": "Получить список компаний", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "search", "value": "Новая организация", "description": "Поиск по информации компаний", "disabled": true }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все компании, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все компании, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все компании, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все компании, изменённые до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка компаний, через запятую. Компании можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/?search=Новая организация", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "search", "value": "Новая организация", "description": "Поиск по информации компаний" }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все компании, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все компании, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все компании, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все компании, изменённые до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка компаний, через запятую. Компании можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:02:02 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "620" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 73,\n \"date_created\": \"2023-11-16 12:47:36\",\n \"date_updated\": \"2023-11-16 12:47:36\",\n \"name\": \"Новая организация\",\n \"domains\": \"\",\n \"address\": \"\",\n \"phone\": \"\",\n \"email\": \"company@test.com\",\n \"web\": \"\",\n \"minute_limit\": 0,\n \"employees\": [\n 421\n ],\n \"managers\": [],\n \"custom_fields\": []\n },\n {\n \"id\": 74,\n \"date_created\": \"2023-11-16 12:49:28\",\n \"date_updated\": \"2023-11-16 12:49:28\",\n \"name\": \"Новая организация1\",\n \"domains\": \"\",\n \"address\": \"\",\n \"phone\": \"\",\n \"email\": \"test@usertest.com\",\n \"web\": \"\",\n \"minute_limit\": 0,\n \"employees\": [],\n \"managers\": [],\n \"custom_fields\": []\n }\n ],\n \"pagination\": {\n \"total\": 2,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/?search=Новая организация", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "search", "value": "Новая организация", "description": "Поиск по информации компаний" }, { "key": "exact_search", "value": "1", "description": "Поиск по полному совпадению значения search\n1 - поиск по полному совпадению\n0 - стандартный поиск", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все компании, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все компании, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все компании, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все компании, изменённые до указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated(desc)", "description": "Сортировка компаний, через запятую. Компании можно сортировать по параметрам:\ndate_created, date_updated, name\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - name{asc}", "disabled": true } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:03:42 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить компанию по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "73", "description": "ID компании (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "73", "description": "ID компании (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:06:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "276" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 73,\n \"date_created\": \"2023-11-16 12:47:36\",\n \"date_updated\": \"2023-11-16 14:06:13\",\n \"name\": \"Новая организация\",\n \"domains\": \"\",\n \"address\": \"\",\n \"phone\": \"\",\n \"email\": \"company@test.com\",\n \"web\": \"\",\n \"minute_limit\": 0,\n \"employees\": [\n 421\n ],\n \"managers\": [],\n \"custom_fields\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "73", "description": "ID компании (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:07:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Компании с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "731", "description": "ID компании (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:07:53 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Organization with id {731} does not exist\"\n }\n ]\n}" } ] }, { "name": "Добавить компанию", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Компания ", "description": "Наименование компании (обязательное)", "type": "text" }, { "key": "domains", "value": "@domain1.com, @domain2.com", "description": "Домены компании, через запятую", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "description": "Адрес", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "description": "Телефон", "type": "text", "disabled": true }, { "key": "email", "value": "testcompany.com", "description": "Э-почта", "type": "text", "disabled": true }, { "key": "web", "value": "https://testcompany.com", "description": "Ссылка на сайт", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "description": "Отведенное время на выполнение заявок в месяц в минутах", "type": "text", "disabled": true }, { "key": "employees[]", "value": "1", "description": "Массив сотрудников", "type": "text", "disabled": true }, { "key": "managers[]", "value": "1", "description": "Массив менеджеров", "type": "text", "disabled": true }, { "key": "custom_fields[23]", "value": "43", "description": "Массив кастомных полей компании.\nВ квадратных скобках необходимо указать ID кастомного поля.", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Компания \"Луч\"", "type": "text" }, { "key": "domains", "value": "testcompany", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "type": "text", "disabled": true }, { "key": "email", "value": "test@company.com", "type": "text", "disabled": true }, { "key": "web", "value": "https://testcompany.com", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "type": "text", "disabled": true }, { "key": "employees[]", "value": "1", "type": "text", "disabled": true }, { "key": "managers[]", "value": "1", "type": "text", "disabled": true }, { "key": "custom_fields[]", "value": "", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:17:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "251" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 76,\n \"date_created\": \"2023-11-16 14:17:14\",\n \"date_updated\": \"2023-11-16 14:17:14\",\n \"name\": \"Компания \\\"Луч\\\"\",\n \"domains\": \"\",\n \"address\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"web\": \"\",\n \"minute_limit\": 0,\n \"employees\": [],\n \"managers\": [],\n \"custom_fields\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Компания \"Луч\"", "type": "text" }, { "key": "domains", "value": "testcompany", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "type": "text", "disabled": true }, { "key": "email", "value": "test@company.com", "type": "text", "disabled": true }, { "key": "web", "value": "https://testcompany.com", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "type": "text", "disabled": true }, { "key": "employees[]", "value": "1", "type": "text", "disabled": true }, { "key": "managers[]", "value": "1", "type": "text", "disabled": true }, { "key": "custom_fields[]", "value": "", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:17:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Компания с таким названием уже существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Новая компания", "type": "text" }, { "key": "domains", "value": "testcompany", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "type": "text", "disabled": true }, { "key": "email", "value": "test@company.com", "type": "text", "disabled": true }, { "key": "web", "value": "https://testcompany.com", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "type": "text", "disabled": true }, { "key": "employees[]", "value": "1", "type": "text", "disabled": true }, { "key": "managers[]", "value": "1", "type": "text", "disabled": true }, { "key": "custom_fields[]", "value": "", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:16:31 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "126" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Organization name {Новая компания} already exists\"\n }\n ]\n}" }, { "name": "Некорректный формат почты", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Компания ", "type": "text" }, { "key": "domains", "value": "testcompany", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "type": "text", "disabled": true }, { "key": "email", "value": "testcompany.com", "type": "text" }, { "key": "web", "value": "https://testcompany.com", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "type": "text", "disabled": true }, { "key": "employees[]", "value": "1", "type": "text", "disabled": true }, { "key": "managers[]", "value": "1", "type": "text", "disabled": true }, { "key": "custom_fields[]", "value": "", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:18:32 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "100" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Email {testcompany.com} is incorrect\"\n }\n ]\n}" }, { "name": "Пользователя с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "name", "value": "Компания ", "type": "text" }, { "key": "domains", "value": "testcompany", "type": "text", "disabled": true }, { "key": "address", "value": "Парк Авеню 1200. Эмеривилл, Калифорния 94608", "type": "text", "disabled": true }, { "key": "phone", "value": "+79991112233", "type": "text", "disabled": true }, { "key": "email", "value": "testcompany.com", "type": "text", "disabled": true }, { "key": "web", "value": "https://testcompany.com", "type": "text", "disabled": true }, { "key": "minute_limit", "value": "360", "type": "text", "disabled": true }, { "key": "employees[]", "value": "11111", "type": "text" }, { "key": "managers[]", "value": "1", "type": "text", "disabled": true }, { "key": "custom_fields[]", "value": "", "type": "text", "disabled": true } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:19:23 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "99" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"User with id {11111} does not exist\"\n }\n ]\n}" } ] }, { "name": "Обновить компанию", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Компания\",\r\n \"domains\": \"@domain1.com, @domain2.com\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"test@company.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 126\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Компания 123\",\r\n \"domains\": \"testcompany\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"test@company.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 126\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organiztaion_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organiztaion_id" ], "variable": [ { "key": "organiztaion_id", "value": "77" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:27:59 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "389" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 77,\n \"date_created\": \"2023-11-16 14:22:08\",\n \"date_updated\": \"2023-11-16 14:27:59\",\n \"name\": \"Компания\",\n \"domains\": \"testcompany\",\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\n \"phone\": \"+79991112233\",\n \"email\": \"test@company.com\",\n \"web\": \"https://testcompany.com\",\n \"minute_limit\": 360,\n \"employees\": [\n 126,\n 1\n ],\n \"managers\": [\n 1\n ],\n \"custom_fields\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Компания 123\",\r\n \"domains\": \"testcompany\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"test@company.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 126\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organiztaion_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organiztaion_id" ], "variable": [ { "key": "organiztaion_id", "value": "77" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:30:14 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Компания с таким названием уже существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Тест\",\r\n \"domains\": \"@domain1.com, @domain2.com\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"test@company.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 126\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organiztaion_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organiztaion_id" ], "variable": [ { "key": "organiztaion_id", "value": "77" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:31:55 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "107" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Organization name {Тест} already exists\"\n }\n ]\n}" }, { "name": "Некорректный формат почты", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Компания\",\r\n \"domains\": \"@domain1.com, @domain2.com\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"testcompany.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 126\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:33:49 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "100" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"Email {testcompany.com} is incorrect\"\n }\n ]\n}" }, { "name": "Пользователя с таким ID не существует", "originalRequest": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Компания\",\r\n \"domains\": \"@domain1.com, @domain2.com\",\r\n \"address\": \"Парк Авеню 1200. Эмеривилл, Калифорния 94608\",\r\n \"phone\": \"+79991112233\",\r\n \"email\": \"test@company.com\",\r\n \"web\": \"https://testcompany.com\",\r\n \"minute_limit\": \"360\",\r\n \"employees\": [\r\n 1,\r\n 1261\r\n ],\r\n \"managers\": [\r\n 1\r\n ],\r\n \"custom_fields\": {\r\n \"130\": {\r\n \"1\": 4105,\r\n \"2\": 4107\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:33:27 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-411\",\n \"title\": \"Bad request\",\n \"details\": \"User with id {1261} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить компанию", "request": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "78", "description": "ID компании (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "78", "description": "ID компании (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:40:33 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Organization with id {78} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "78", "description": "ID компании (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:40:52 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Организации с данным ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id" ], "variable": [ { "key": "organization_id", "value": "78", "description": "ID компании (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:41:58 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "102" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Organization with id {78} does not exist\"\n }\n ]\n}" } ] } ] }, { "name": "Кастомные поля компаний", "item": [ { "name": "Опции связанных полей и выпадающего списка", "item": [ { "name": "Получить опции кастомного поля", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:43:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "488" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 41,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Столы\"\n }\n },\n {\n \"id\": 42,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Стулья\"\n }\n },\n {\n \"id\": 43,\n \"pid\": 41,\n \"name\": {\n \"ru\": \"Деревянные\"\n }\n },\n {\n \"id\": 44,\n \"pid\": 41,\n \"name\": {\n \"ru\": \"Пластиковые\"\n }\n },\n {\n \"id\": 45,\n \"pid\": 42,\n \"name\": {\n \"ru\": \"Офисные\"\n }\n },\n {\n \"id\": 46,\n \"pid\": 42,\n \"name\": {\n \"ru\": \"Барные\"\n }\n },\n {\n \"id\": 47,\n \"pid\": 45,\n \"name\": {\n \"ru\": \"Кожаные\"\n }\n },\n {\n \"id\": 48,\n \"pid\": 45,\n \"name\": {\n \"ru\": \"Тканевые\"\n }\n }\n ],\n \"pagination\": {\n \"total\": 8,\n \"per_page\": 50,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:44:47 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:45:09 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] }, { "name": "Добавить опцию кастомного поля", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:40:50 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 49,\n \"pid\": 0,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:41:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:42:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "105" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] }, { "name": "Добавить опцию для связанных полей на определённый уровень", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:46:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "116" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 51,\n \"pid\": 43,\n \"name\": {\n \"ru\": \"Новая опция\",\n \"en\": \"New option\",\n \"ua\": \"Нова опція\"\n }\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:47:35 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Поле с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 43,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:05 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" }, { "name": "Родительская опция с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"options\": [\r\n {\r\n \"pid\": 433,\r\n \"name\": {\r\n \"ru\": \"Новая опция\",\r\n \"en\": \"New option\",\r\n \"ua\": \"Нова опція\"\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:48:41 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "106" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "295" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Parent option with id {433} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить опцию кастомного поля", "request": { "auth": { "type": "basic", "basic": [ { "key": "username", "value": "", "type": "string" }, { "key": "password", "value": "\n", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:51:45 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Option with id {49} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:52:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Опция с таким ID не существует в этом кастомном поле", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:52:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Option with id {4670} does not exist\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id/options/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id", "options", "" ], "variable": [ { "key": "field_id", "value": "1701", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 08:53:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {1701} does not exist\"\n }\n ]\n}" } ] } ], "description": "Общее ограничение на добавление/обновление опций составляет 100 записей за один запрос. Обязательным параметром опций является **name**.\n\n- Для добавления новой опции необходимо указать **name** - `{\"options\":[{\"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для добавление новой опции для связанных полей на любой уровень - используйте **pid** (**id** родительской опции) - `{\"options\":[{\"pid\": 21, \"name\":{\"ru\":\"new option\",\"en\":\"new option\",\"ua\":\"new option\"}}]}`\n- Для обновлении существующей опции используйте параметр **id**, для изменений доступен только параметр **name** - `{\"options\":[{\"id\": 20,\"name\":{\"ru\":\"update option\",\"en\":\"update option\",\"ua\":\"update option\"}}]}`\n \n\nПеремещение опций связанных полей по уровням запрещены. Все новые опции добавляются в конец списка. Результатом на этот запрос будут возвращены все затронутые опции." }, { "name": "Получить список всех кастомных полей компаний", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", "" ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", "" ] } }, "_postman_previewlanguage": "Text", "header": [], "cookie": [], "body": "" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", "" ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:36:22 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить кастомное поле компаний по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:38:26 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "234" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 50,\n \"name\": {\n \"1\": {\n \"ru\": \"Свазянные поля\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"field_type\": \"hierarchy\",\n \"permissions\": {\n \"staff\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n },\n \"user\": {\n \"view\": true,\n \"edit\": true,\n \"required\": false\n }\n }\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "50", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:38:54 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "297" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Кастомное поле с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/custom_fields/:field_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", "custom_fields", ":field_id" ], "variable": [ { "key": "field_id", "value": "501", "description": "ID кастомного поля (обязательный)" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 10:39:20 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "101" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Custom field with id {501} does not exist\"\n }\n}" } ] } ] }, { "name": "Примечания компаний", "item": [ { "name": "Получить примечания компании", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница поиска", "disabled": true } ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница поиска", "disabled": true } ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:57:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "416" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": [\n {\n \"id\": 9,\n \"creator_id\": 1,\n \"organiz_id\": 77,\n \"text\": \"Второе примечание\",\n \"date_created\": \"14:55:35 16.11.2023\",\n \"date_updated\": \"14:55:40 16.11.2023\",\n \"file\": []\n },\n {\n \"id\": 8,\n \"creator_id\": 1,\n \"organiz_id\": 77,\n \"text\": \"Первое примечание\",\n \"date_created\": \"14:55:29 16.11.2023\",\n \"date_updated\": \"14:55:34 16.11.2023\",\n \"file\": []\n }\n ],\n \"pagination\": {\n \"total\": 2,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница поиска", "disabled": true } ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:58:38 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Компании с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "query": [ { "key": "page", "value": "1", "description": "Страница поиска", "disabled": true } ], "variable": [ { "key": "organization_id", "value": "771", "description": "ID компании (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 11:58:58 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Organization with id {771} does not exist\"\n }\n ]\n}" } ] }, { "name": "Добавить примечание компании", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст примечания", "description": "Текст", "type": "text" }, { "key": "file", "description": "Файл", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "variable": [ { "key": "organization_id", "value": "771", "description": "ID компании (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст примечания", "description": "Текст", "type": "text" }, { "key": "file", "description": "Файл", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:01:40 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "329" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 11,\n \"creator_id\": 1,\n \"organiz_id\": 77,\n \"text\": \"Текст примечания\",\n \"date_created\": \"15:01:40 16.11.2023\",\n \"date_updated\": \"15:01:40 16.11.2023\",\n \"file\": {\n \"name\": \"файл.mkv\",\n \"url\": \"<скрыто>\",\n \"data_type\": \"mkv\"\n }\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст примечания", "description": "Текст", "type": "text" }, { "key": "file", "description": "Файл", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:03:45 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Компании с таким ID не существует", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "Текст примечания", "description": "Текст", "type": "text" }, { "key": "file", "description": "Файл", "type": "file", "src": [] } ] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", "" ], "variable": [ { "key": "organization_id", "value": "771", "description": "ID компании (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:04:28 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "103" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Organization with id {771} does not exist\"\n }\n ]\n}" } ] }, { "name": "Удалить примечание", "request": { "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/:note_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", ":note_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" }, { "key": "note_id", "value": "9", "description": "ID примечания (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/:note_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", ":note_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" }, { "key": "note_id", "value": "9", "description": "ID примечания (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:09:08 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "100" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Note with id {9} successfully deleted\"\n }\n ]\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/:note_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", ":note_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" }, { "key": "note_id", "value": "9", "description": "ID примечания (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:10:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Примечание с таким ID в такой компании не существует", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/:note_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", ":note_id" ], "variable": [ { "key": "organization_id", "value": "77", "description": "ID компании (обязательный)" }, { "key": "note_id", "value": "9", "description": "ID примечания (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:10:24 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "124" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "298" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"s-204\",\n \"title\": \"No content\",\n \"details\": \"Note with id {9} in organizations with id {77} does not exist\"\n }\n ]\n}" }, { "name": "Компании с таким ID не существует", "originalRequest": { "method": "DELETE", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "https://{{url}}/api/v{{version}}/organizations/:organization_id/notes/:note_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "organizations", ":organization_id", "notes", ":note_id" ], "variable": [ { "key": "organization_id", "value": "771", "description": "ID компании (обязательный)" }, { "key": "note_id", "value": "9", "description": "ID примечания (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:11:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "300" }, { "key": "X-Rate-Limit-Remaining", "value": "299" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Organizations with id {771} does not exist\"\n }\n ]\n}" } ] } ] } ] }, { "name": "База знаний", "item": [ { "name": "Список всех категорий", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/categories/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "categories", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "public", "value": "false", "description": "Поиск по публичным категориям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "parent_list", "value": "1, 2", "description": "Поиск категорий по ID родительских категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все категории, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все категории, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все категории, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все категории, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated{desc}", "description": "Сортировка категорий, через запятую. \nКатегории можно сортировать по параметрам:\ndate_created, date_updated, position\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - position{asc}", "disabled": true } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/categories/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "categories", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "public", "value": "false", "description": "Поиск по публичным категориям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "parent_list", "value": "1, 2", "description": "Поиск категорий по ID родительских категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все статьи, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все заявки, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated{desc}", "description": "Сортировка статей, через запятую. \nЗаявки можно сортировать по параметрам:\ndate_created, date_updated, position\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - position{asc}", "disabled": true } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:39:00 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "981" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "60" }, { "key": "X-Rate-Limit-Remaining", "value": "59" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"4\": {\n \"id\": 4,\n \"parent_id\": 0,\n \"position\": 5,\n \"date_created\": \"2023-08-14 14:10:30\",\n \"date_updated\": \"2023-11-10 12:45:45\",\n \"access\": \"public\",\n \"access_by_groups\": [\n 1,\n 6,\n 8,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 2\n ],\n \"title\": {\n \"ru\": \"Тестовые шаблоны\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"5\": {\n \"id\": 5,\n \"parent_id\": 0,\n \"position\": 4,\n \"date_created\": \"2023-11-09 15:55:44\",\n \"date_updated\": \"2023-11-10 12:45:45\",\n \"access\": \"public\",\n \"access_by_groups\": [\n 2\n ],\n \"title\": {\n \"ru\": \"Ответы для саппорта\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"6\": {\n \"id\": 6,\n \"parent_id\": 0,\n \"position\": 3,\n \"date_created\": \"2023-11-10 11:53:46\",\n \"date_updated\": \"2023-11-10 12:45:45\",\n \"access\": \"public\",\n \"access_by_groups\": [\n 1,\n 6,\n 8,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 2\n ],\n \"title\": {\n \"ru\": \"Публичная категория\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n },\n \"9\": {\n \"id\": 9,\n \"parent_id\": 0,\n \"position\": 2,\n \"date_created\": \"2023-11-10 12:52:02\",\n \"date_updated\": \"2023-11-10 12:52:02\",\n \"access\": \"public\",\n \"access_by_groups\": [\n 1,\n 2\n ],\n \"title\": {\n \"ru\": \"Инструкция\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n }\n }\n },\n \"pagination\": {\n \"total\": 4,\n \"per_page\": 30,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/categories/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "categories", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы", "disabled": true }, { "key": "public", "value": "false", "description": "Поиск по публичным категориям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "parent_list", "value": "1, 2", "description": "Поиск категорий по ID родительских категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все статьи, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все заявки, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "date_updated{desc}", "description": "Сортировка статей, через запятую. \nЗаявки можно сортировать по параметрам:\ndate_created, date_updated, position\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - position{asc}", "disabled": true } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 12:42:07 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Список всех статей", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы\n\n", "disabled": true }, { "key": "public", "value": "true", "description": "Поиск по публичным статьям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "category_list", "value": "1, 2", "description": "Поиск статей по ID категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все статьи, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все статьи, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "vievs {asc}", "description": "Сортировка статей, через запятую. \nСтатьи можно сортировать по параметрам:\ndate_created, date_updated, views, pin\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - date_created{desc}", "disabled": true } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы\n\n", "disabled": true }, { "key": "public", "value": "true", "description": "Поиск по публичным статьям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "category_list", "value": "1, 2", "description": "Поиск статей по ID категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все статьи, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все статьи, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "vievs {asc}", "description": "Сортировка статей, через запятую. \nСтатьи можно сортировать по параметрам:\ndate_created, date_updated, views, pin\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - date_created{desc}", "disabled": true } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 13:09:01 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "60" }, { "key": "X-Rate-Limit-Remaining", "value": "59" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" }, { "key": "Content-Encoding", "value": "gzip" } ], "cookie": [], "body": "{\n \"data\": {\n \"1\": {\n \"id\": 1,\n \"date_created\": \"2023-03-07 20:16:00\",\n \"date_updated\": \"2023-11-07 10:02:12\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 16,\n \"categories\": [\n -1\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [\n \"приветствие\"\n ],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n },\n \"3\": {\n \"id\": 3,\n \"date_created\": \"2023-04-24 16:29:00\",\n \"date_updated\": \"2023-04-25 10:51:41\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 9,\n \"categories\": [\n 2\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n },\n \"5\": {\n \"id\": 5,\n \"date_created\": \"2023-07-17 09:23:00\",\n \"date_updated\": \"2023-11-08 10:07:59\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 31,\n \"categories\": [\n -1\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n },\n \"6\": {\n \"id\": 6,\n \"date_created\": \"2023-11-08 12:41:00\",\n \"date_updated\": \"2023-11-08 12:41:49\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 0,\n \"categories\": [\n 4\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n },\n \"7\": {\n \"id\": 7,\n \"date_created\": \"2023-11-09 15:55:00\",\n \"date_updated\": \"2023-11-09 16:00:18\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 19,\n \"categories\": [\n 5\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n },\n \"8\": {\n \"id\": 8,\n \"date_created\": \"2023-11-10 13:22:00\",\n \"date_updated\": \"2023-11-10 13:22:25\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 2,\n \"categories\": [\n 6\n ],\n \"title\": {\n \"ru\": \"[Название статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [],\n \"en\": [],\n \"se\": [],\n \"ua\": []\n },\n \"body\": {\n \"ru\": \"[Содержание статьи]\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n }\n },\n \"pagination\": {\n \"total\": 6,\n \"per_page\": 10,\n \"current_page\": 1,\n \"total_pages\": 1\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", "" ], "query": [ { "key": "page", "value": "1", "description": "Номер страницы\n\n", "disabled": true }, { "key": "public", "value": "true", "description": "Поиск по публичным статьям\ntrue - включить\nfalse - выключить", "disabled": true }, { "key": "category_list", "value": "1, 2", "description": "Поиск статей по ID категорий, через запятую", "disabled": true }, { "key": "from_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"от\".\nПоказывает все статьи, созданные с указанного момента", "disabled": true }, { "key": "to_date_created", "value": "2022-12-31 00:00:00", "description": "Дата создания \"до\".\nПоказывает все статьи, созданные до указанного момента", "disabled": true }, { "key": "from_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"от\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "to_date_updated", "value": "2022-12-31 00:00:00", "description": "Дата изменения \"до\".\nПоказывает все статьи, изменённые с указанного момента", "disabled": true }, { "key": "order_by", "value": "vievs {asc}", "description": "Сортировка статей, через запятую. \nСтатьи можно сортировать по параметрам:\ndate_created, date_updated, views, pin\nПорядок сортировки:\n{asc} - по возрастанию и {desc} - по убыванию\nЗначение по умолчанию - date_created{desc}", "disabled": true } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 13:09:43 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" } ] }, { "name": "Получить статью по ID", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/:article_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", ":article_id" ], "variable": [ { "key": "article_id", "value": "1", "description": "ID статьи (обязательный)" } ] } }, "response": [ { "name": "Пример ответа", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/:article_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", ":article_id" ], "variable": [ { "key": "article_id", "value": "1", "description": "ID статьи (обязательный)" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 13:18:48 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "854" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "60" }, { "key": "X-Rate-Limit-Remaining", "value": "59" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"data\": {\n \"id\": 1,\n \"date_created\": \"2023-03-07 20:16:00\",\n \"date_updated\": \"2023-11-07 10:02:12\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"show_me_only\": false,\n \"access\": \"public\",\n \"pin\": false,\n \"views_count\": 16,\n \"categories\": [\n -1\n ],\n \"title\": {\n \"ru\": \"Приветствие\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"tags\": {\n \"ru\": [\n \"приветствие\"\n ]\n },\n \"body\": {\n \"ru\": \"Всем привет!\",\n \"en\": \"\",\n \"se\": \"\",\n \"ua\": \"\"\n },\n \"files\": []\n }\n}" }, { "name": "Ошибка авторизации", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/:article_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", ":article_id" ], "variable": [ { "key": "article_id", "value": "1", "description": "ID статьи (обязательный)" } ] } }, "status": "Unauthorized", "code": 401, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 13:19:06 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "104" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-401\",\n \"title\": \"Authorization error\",\n \"details\": \"Username or api key is incorrect\"\n }\n ]\n}" }, { "name": "Статья с таким ID не существует", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "https://{{url}}/api/v{{version}}/knowledge_base/articles/:article_id", "protocol": "https", "host": [ "{{url}}" ], "path": [ "api", "v{{version}}", "knowledge_base", "articles", ":article_id" ], "variable": [ { "key": "article_id", "value": "111", "description": "ID статьи (обязательный)" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "nginx" }, { "key": "Date", "value": "Thu, 16 Nov 2023 13:19:27 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Length", "value": "98" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Expires", "value": "Thu, 19 Nov 1981 08:52:00 GMT" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate" }, { "key": "Pragma", "value": "no-cache" }, { "key": "X-Rate-Limit", "value": "60" }, { "key": "X-Rate-Limit-Remaining", "value": "59" }, { "key": "Set-Cookie", "value": "" }, { "key": "X-Xss-Protection", "value": "1; mode=block" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"code\": \"e-404\",\n \"title\": \"Not found\",\n \"details\": \"Article with id {111} does not exist\"\n }\n ]\n}" } ] } ] } ], "auth": { "type": "basic", "basic": [ { "key": "username", "value": "{{login}}", "type": "string" }, { "key": "password", "value": "{{token}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "url", "value": "", "type": "string" }, { "key": "version", "value": "2", "type": "string" }, { "key": "login", "value": "", "type": "string" }, { "key": "token", "value": "", "type": "string" } ] }