2024-04-04 00:19:25 +00:00
openapi : 3.0 .3
info :
title : QUIZ AMOCRM integration
description : Интеграция с Амо. Ключевая задача - создавать заявки в соответствующей воронкой подключенного аккаунта
version : 1.0 .0
2024-04-04 09:32:27 +00:00
tags :
- name : account
description : Операции связанные с аккаунтом
- name : different
description : Различные операции связанные с AmoCRM
2024-04-04 00:19:25 +00:00
paths :
/account :
post :
2024-04-04 09:32:27 +00:00
operationId : ConnectAccount
summary : подключение аккаунта амо к аккаунту quiz. Н а вход получает только токен. Н а выход отдаёт ссылку для подключения. Создаёт модель аккаунта, имеющую связь с основным аккаунтом
tags :
- account
2024-04-04 00:19:25 +00:00
responses :
'200' :
description : успешное создание ссылки для авторизации
content :
'application/json' :
schema :
2024-04-04 09:32:27 +00:00
$ref : '#/components/schemas/ConnectAccountResp'
2024-04-04 00:19:25 +00:00
delete :
2024-04-04 09:32:27 +00:00
operationId : SoftDeleteAccount
summary : мягкое удаление аккаунта. Юзер должен иметь возможность создать новый аккаунт, взамен удалённого
tags :
- account
2024-04-04 00:19:25 +00:00
responses :
'200' :
description : успешное удаление аккаунта
get :
2024-04-04 09:32:27 +00:00
operationId : GetCurrentAccount
summary : получение текущего аккаунта
tags :
- account
2024-04-04 00:19:25 +00:00
responses :
'200' :
description : аккаунт интеграции с амо
2024-04-04 09:32:27 +00:00
content :
2024-04-04 00:19:25 +00:00
'application/json' :
schema :
2024-04-04 09:32:27 +00:00
$ref : '#/components/schemas/GetCurrentAccountResp'
2024-04-04 00:19:25 +00:00
/webhook/create :
get :
2024-04-04 09:32:27 +00:00
operationId : WebhookCreate
summary : это метод для получения пары токенов для аккаунта. Пары токенов стоит хранить в отдельной таблице и завести воркер, который будет обновлять рефреш. https://www.amocrm.ru/developers/content/oauth/step-by-step - вот дока для этого метода
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/webhook/delete :
get :
2024-04-04 09:32:27 +00:00
operationId : WebhookDelete
summary : это метод для оповещения о б удалении итеграции из учетки в амо. При е г о вызове надо мягко удалить соответствующий аккаунт. https://www.amocrm.ru/developers/content/oauth/step-by-step#%D0%A5%D1%83%D0%BA-%D0%BE%D0%B1-%D0%BE%D1%82%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B8-%D0%B8%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D0%B8
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/users :
get :
2024-04-04 09:32:27 +00:00
operationId : GetListUsers
summary : получение списка юзеров, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/users-api#users-list
tags :
- account
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : UpdateListUsers
summary : обновление списка юзеров
tags :
- account
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/pipelines :
get :
2024-04-04 09:32:27 +00:00
operationId : GetListPipelines
summary : получение списка воронок, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : UpdateListPipelines
summary : обновление списка воронок
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/steps :
get :
2024-04-04 09:32:27 +00:00
operationId : GetListSteps
summary : получение списка этапов воронок, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA-%D1%81%D1%82%D0%B0%D1%82%D1%83%D1%81%D0%BE%D0%B2-%D0%B2%D0%BE%D1%80%D0%BE%D0%BD%D0%BA%D0%B8-%D1%81%D0%B4%D0%B5%D0%BB%D0%BE%D0%BA
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : UpdateListSteps
summary : обновление списка этапов воронок
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/fields :
get :
2024-04-04 09:32:27 +00:00
operationId : GetListCustom
summary : получение списка кастомных полей, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/custom-fields#%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA-%D0%BF%D0%BE%D0%BB%D0%B5%D0%B9-%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : UpdateListCustom
summary : обновление списка кастомных полей
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
/tags :
get :
2024-04-04 09:32:27 +00:00
operationId : GetListTags
summary : получение списка тегов, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/tags-api#%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA-%D1%82%D0%B5%D0%B3%D0%BE%D0%B2-%D0%B4%D0%BB%D1%8F-%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : UpdateListTags
summary : обновление списка тегов
tags :
- different
responses :
'200' :
description : okay
2024-04-04 09:42:40 +00:00
# блупринт с таким роутом не работает надо будет пересмотреть такие пути
2024-04-04 00:19:25 +00:00
/rules/{quizID}:
2024-04-04 09:32:27 +00:00
get :
operationId : GetQuizSettings
summary : получение настроек интеграции для конкретного квиза
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
post :
2024-04-04 09:32:27 +00:00
operationId : SetQuizSettings
summary : создание настроек интеграции для конкретного квиза
tags :
- different
responses :
'200' :
description : okay
2024-04-04 00:19:25 +00:00
patch :
2024-04-04 09:32:27 +00:00
operationId : ChangeQuizSettings
summary : изменение настроек интеграции для конкретного квиза
tags :
- different
responses :
'200' :
description : okay
components :
schemas :
ConnectAccountResp :
type : object
properties :
link :
type : string
description : ссылка для авторизации в амо
GetCurrentAccountResp :
type : object
properties :
ID :
type : string
description : uuid
AccountID :
type : string
description : связь с аккаунтом в квизе
AmocrmID :
type : integer
description : связь с аккаунтом в амо
Name :
type : string
description : имя аккаунта в амо
Subdomain :
type : string
description : поддомен организации в амо
AmoUserID :
type : integer
description : айдишник пользвателя, который подключал интеграцию
Country :
type : string
description : страна указанная в настройках амо