amocrm/openapi.yaml

985 lines
37 KiB
YAML
Raw Normal View History

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:
2024-04-09 07:43:11 +00:00
- name: main
description: Операции связанные с AmoCRM
2024-04-04 09:32:27 +00:00
2024-04-04 00:19:25 +00:00
paths:
/account:
post:
2024-04-04 09:32:27 +00:00
operationId: ConnectAccount
2024-04-04 00:19:25 +00:00
description: подключение аккаунта амо к аккаунту quiz. На вход получает только токен. На выход отдаёт ссылку для подключения. Создаёт модель аккаунта, имеющую связь с основным аккаунтом
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
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-11 09:55:26 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
delete:
2024-04-04 09:32:27 +00:00
operationId: SoftDeleteAccount
2024-04-04 00:19:25 +00:00
description: мягкое удаление аккаунта. Юзер должен иметь возможность создать новый аккаунт, взамен удалённого
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
responses:
'200':
2024-04-11 09:55:26 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
get:
2024-04-04 09:32:27 +00:00
operationId: GetCurrentAccount
2024-04-04 00:19:25 +00:00
description: получение текущего аккаунта
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
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-05-03 09:25:43 +00:00
$ref: '#/components/schemas/User'
2024-04-11 09:55:26 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/webhook/create:
get:
2024-04-04 09:32:27 +00:00
operationId: WebhookCreate
2024-04-04 00:19:25 +00:00
description: это метод для получения пары токенов для аккаунта. Пары токенов стоит хранить в отдельной таблице и завести воркер, который будет обновлять рефреш. https://www.amocrm.ru/developers/content/oauth/step-by-step - вот дока для этого метода
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 17:13:17 +00:00
description: Success
2024-04-04 00:19:25 +00:00
/webhook/delete:
get:
2024-04-04 09:32:27 +00:00
operationId: WebhookDelete
2024-04-04 00:19:25 +00:00
description: это метод для оповещения об удалении итеграции из учетки в амо. При его вызове надо мягко удалить соответствующий аккаунт. 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
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 17:13:17 +00:00
description: Success
2024-05-17 19:13:22 +00:00
# /utms/{quizID}:
# get:
# operationId: GettingUserUTM
# tags:
# - main
# description: получение списка заданных юзером utm меток. Это чисто наша сущность, в амо она представлена кастомными полями сделки
# parameters:
# - in: path
# name: quizID
# required: true
# schema:
# type: string
# description: Id квиза
# - in: query
# name: Pagination
# description: Параметры пагинации
# required: false
# schema:
# type: object
# properties:
# page:
# type: integer
# description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
# example: 1
# size:
# type: integer
# description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
# example: 25
# required:
# - page
# - size
# responses:
# '200':
# description: успешное получение заданных юзером utm меток
# content:
# 'application/json':
# schema:
# $ref: '#/components/schemas/GetListUserUTMResp'
# '401':
# $ref: '#/components/responses/401'
# '400':
# $ref: '#/components/responses/400'
# '500':
# $ref: '#/components/responses/500'
# post:
# operationId: SavingUserUTM
# tags:
# - main
# description: сохранение списка заданных юзером utm меток
# parameters:
# - in: path
# name: quizID
# required: true
# schema:
# type: string
# description: Id квиза
# requestBody:
# content:
# application/json:
# schema:
# $ref: "#/components/schemas/SaveUserListUTMReq"
# responses:
# '200':
# description: успешное сохранение списка utm меток
# content:
# 'application/json':
# schema:
# $ref: '#/components/schemas/ListSavedIDUTMResp'
# '401':
# $ref: '#/components/responses/401'
# '400':
# $ref: '#/components/responses/400'
# '500':
# $ref: '#/components/responses/500'
# delete:
# operationId: DeletingUserUTM
# tags:
# - main
# description: удаление utm по айдишникам
# parameters:
# - in: path
# name: quizID
# required: true
# schema:
# type: string
# description: Id квиза
# requestBody:
# content:
# 'application/json':
# schema:
# $ref: '#/components/schemas/ListDeleteUTMIDsReq'
# responses:
# '200':
# $ref: '#/components/responses/200'
# '400':
# $ref: '#/components/responses/400'
# '500':
# $ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/users:
get:
2024-05-03 09:25:43 +00:00
operationId: GettingUserWithPagination
2024-04-07 17:13:17 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение списка юзеров, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/users-api#users-list
2024-04-07 13:22:11 +00:00
parameters:
2024-04-08 07:34:54 +00:00
- in: query
name: Pagination
description: Параметры пагинации
required: false
schema:
type: object
properties:
page:
type: integer
description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 1
size:
type: integer
description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 25
required:
- page
- size
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение списка пользователей
content:
'application/json':
schema:
$ref: "#/components/schemas/UserListResp"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
2024-04-23 11:18:45 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: UpdateListUsers
2024-04-04 00:19:25 +00:00
description: обновление списка юзеров
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-23 11:18:45 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/pipelines:
get:
2024-05-03 09:25:43 +00:00
operationId: GetPipelinesWithPagination
2024-04-07 17:13:17 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение списка воронок, закешированных у нас, с пагинацией https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines
2024-04-07 13:22:11 +00:00
parameters:
2024-04-08 07:34:54 +00:00
- in: query
name: Pagination
description: Параметры пагинации
required: false
schema:
type: object
properties:
page:
type: integer
description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 1
size:
type: integer
description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 25
required:
- page
- size
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение списка воронок
content:
'application/json':
schema:
$ref: "#/components/schemas/UserListPipelinesResp"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
2024-04-23 11:18:45 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: UpdateListPipelines
2024-04-04 00:19:25 +00:00
description: обновление списка воронок
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-23 11:18:45 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/steps:
get:
2024-05-03 09:25:43 +00:00
operationId: GetStepsWithPagination
2024-04-07 17:13:17 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение списка этапов воронок, закешированных у нас, с пагинацией 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
2024-04-07 13:22:11 +00:00
parameters:
2024-04-08 07:34:54 +00:00
- in: query
name: Pagination
description: Параметры пагинации
required: false
schema:
type: object
properties:
pipelineID:
type: integer
description: id воронки которой принадлежат шаги
example: 123
2024-04-08 07:34:54 +00:00
page:
type: integer
description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 1
size:
type: integer
description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 25
required:
- pipelineID
2024-04-08 07:34:54 +00:00
- page
- size
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение списка шагов воронок
content:
'application/json':
schema:
$ref: "#/components/schemas/UserListStepsResp"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
2024-04-23 11:18:45 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: UpdateListSteps
2024-04-04 00:19:25 +00:00
description: обновление списка этапов воронок
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-23 11:18:45 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/fields:
get:
2024-05-03 09:25:43 +00:00
operationId: GetFieldsWithPagination
2024-04-07 17:13:17 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение списка кастомных полей, закешированных у нас, с пагинацией 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
2024-04-07 13:22:11 +00:00
parameters:
2024-04-08 07:34:54 +00:00
- in: query
name: Pagination
description: Параметры пагинации
required: false
schema:
type: object
properties:
page:
type: integer
description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 1
size:
type: integer
description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 25
required:
- page
- size
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение списка тегов
content:
'application/json':
schema:
$ref: "#/components/schemas/UserListFieldsResp"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
2024-04-23 11:18:45 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: UpdateListCustom
2024-04-04 00:19:25 +00:00
description: обновление списка кастомных полей
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-23 11:18:45 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
/tags:
get:
2024-05-03 09:25:43 +00:00
operationId: GetTagsWithPagination
2024-04-07 17:13:17 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение списка тегов, закешированных у нас, с пагинацией 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
2024-04-07 13:22:11 +00:00
parameters:
2024-04-08 07:34:54 +00:00
- in: query
name: Pagination
description: Параметры пагинации
required: false
schema:
type: object
properties:
page:
type: integer
description: Номер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 1
size:
type: integer
description: Размер страницы пагинации. Если не указан, используется значение по умолчанию.
example: 25
required:
- page
- size
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение списка тегов
content:
'application/json':
schema:
$ref: "#/components/schemas/UserListTagsResp"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
2024-04-23 11:18:45 +00:00
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: UpdateListTags
2024-04-04 00:19:25 +00:00
description: обновление списка тегов
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-23 11:18:45 +00:00
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-08 08:20:10 +00:00
# таких запросах для блупринта обязательно нужно указывать параметры
2024-04-04 00:19:25 +00:00
/rules/{quizID}:
2024-04-04 09:32:27 +00:00
get:
2024-04-07 17:13:17 +00:00
operationId: GettingQuizRules
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-04 00:19:25 +00:00
description: получение настроек интеграции для конкретного квиза
2024-04-08 08:20:10 +00:00
parameters:
- in: path
name: quizID
required: true
schema:
type: string
description: Id квиза
2024-04-04 09:32:27 +00:00
responses:
'200':
2024-04-07 13:22:11 +00:00
description: успешное получение настройки интеграции
content:
'application/json':
schema:
$ref: "#/components/schemas/Rule"
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
post:
2024-04-04 09:32:27 +00:00
operationId: SetQuizSettings
2024-05-03 07:49:29 +00:00
description: создание настроек интеграции для конкретного квиза, при успешном исходе кладет задачу в кафку, на 1 квиз 1 правило
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-08 15:24:50 +00:00
parameters:
- in: path
name: quizID
required: true
schema:
type: string
description: Id квиза
2024-04-08 08:20:10 +00:00
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/RulesReq"
2024-04-04 09:32:27 +00:00
responses:
'200':
$ref: '#/components/responses/200'
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 00:19:25 +00:00
patch:
2024-04-04 09:32:27 +00:00
operationId: ChangeQuizSettings
2024-05-03 07:49:29 +00:00
description: изменение настроек интеграции для конкретного квиза, при успешном исходе кладет задачу в кафку, на 1 квиз 1 правило
2024-04-04 09:32:27 +00:00
tags:
2024-04-09 07:43:11 +00:00
- main
2024-04-08 15:24:50 +00:00
parameters:
- in: path
name: quizID
required: true
schema:
type: string
description: Id квиза
2024-04-08 08:20:10 +00:00
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/RulesReq"
2024-04-04 09:32:27 +00:00
responses:
'200':
$ref: '#/components/responses/200'
2024-04-23 12:22:12 +00:00
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
2024-04-04 09:32:27 +00:00
components:
schemas:
2024-04-07 13:22:11 +00:00
Rule:
2024-04-04 09:32:27 +00:00
type: object
2024-04-07 13:22:11 +00:00
description: объект настройки правил сохранения данных в амо
2024-04-04 09:32:27 +00:00
properties:
2024-04-07 13:22:11 +00:00
ID:
type: integer
2024-04-16 18:41:51 +00:00
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AccountID:
2024-04-16 18:41:51 +00:00
type: integer
description: связь с аккаунтом в интеграции амо id в амо
2024-04-07 13:22:11 +00:00
QuizID:
type: integer
description: айдишник опроса
PerformerID:
type: integer
description: айдишник ответственного за сделку
PipelineID:
type: integer
description: айдишник воронки
StepID:
type: integer
description: айдишник этапа
2024-05-17 19:13:22 +00:00
# UTMs:
# type: array
# items:
# type: integer
# description: список UTM для этого опроса
2024-04-07 13:22:11 +00:00
FieldsRule:
type: object
description: правила заполнения полей сущностей в амо
properties:
lead:
type: array
items:
$ref: '#/components/schemas/FieldRule'
contact:
type: array
items:
2024-05-07 13:28:35 +00:00
$ref: '#/components/schemas/ContactRules'
2024-04-07 13:22:11 +00:00
company:
type: array
items:
$ref: '#/components/schemas/FieldRule'
customer:
type: array
items:
$ref: '#/components/schemas/FieldRule'
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания воронки в нашей системе
FieldRule:
type: object
description: правила сопоставления вопроса полю
properties:
QuestionID:
type: integer
2024-04-17 08:35:56 +00:00
additionalProperties:
type: integer
description: сопоставление айдишника вопроса полю, которое будет заполняться ответом. соответственно QuestionID это айдишник вопроса. это я так мэпу пытался записать. Мапа, где ключи - QuestionID, значения - ID кастомного поля
2024-04-07 13:22:11 +00:00
Pipeline:
type: object
description: объект воронки амо
properties:
ID:
type: integer
2024-04-16 18:41:51 +00:00
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AmoID:
type: integer
description: айдишник воронки в амо
AccountID:
2024-04-11 15:10:18 +00:00
type: integer
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в интеграции амо id аккаунта в амо
2024-04-07 13:22:11 +00:00
Name:
type: string
description: название воронки в амо
IsArchive:
type: boolean
description: флаг архивной воронки в амо
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания воронки в нашей системе
Step:
type: object
description: объект шага воронки амо
properties:
ID:
2024-04-16 18:41:51 +00:00
type: integer
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AmoID:
type: integer
description: айдишник шага воронки в амо
PipelineID:
type: integer
description: айдишник воронки в амо
AccountID:
2024-04-16 18:41:51 +00:00
type: integer
description: связь с аккаунтом в интеграции амо id в амо
2024-04-07 13:22:11 +00:00
Name:
type: string
description: название воронки в амо
Color:
type: string
description: цвет шага в амо
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания воронки в нашей системе
Field:
2024-04-04 09:32:27 +00:00
type: object
2024-04-07 13:22:11 +00:00
description: объект кастомного поля амо
2024-04-04 09:32:27 +00:00
properties:
ID:
2024-04-16 18:41:51 +00:00
type: integer
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AmoID:
type: integer
description: айдишник кастомного поля в амо
Code:
2024-04-04 09:32:27 +00:00
type: string
2024-04-07 13:22:11 +00:00
description: кодовое слово в амо
AccountID:
2024-04-12 11:52:38 +00:00
type: integer
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в интеграции амо id аккаунта в амо
2024-04-07 13:22:11 +00:00
Name:
type: string
description: название воронки в амо
EntityType:
type: string
description: тип сущности в амо, для которой это кастомное поле
Type:
type: string
description: тип поля https://www.amocrm.ru/developers/content/crm_platform/custom-fields#%D0%94%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%BD%D1%8B%D0%B5-%D1%82%D0%B8%D0%BF%D1%8B-%D0%BF%D0%BE%D0%BB%D0%B5%D0%B9
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания воронки в нашей системе
UTM:
type: object
description: объект настройки UTM, данные о которых мы сохраняем в амо
properties:
ID:
2024-04-16 18:41:51 +00:00
type: integer
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AmoFieldID:
type: integer
description: айдишник кастомного поля в амо
QuizID:
type: integer
description: айдишник квиза
2024-04-04 09:32:27 +00:00
AccountID:
2024-04-15 15:44:04 +00:00
type: integer
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в интеграции амо id амо
2024-04-07 13:22:11 +00:00
Name:
type: string
description: название тега в амо
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания тега в нашей системе
Tag:
type: object
description: объект тега из амо
properties:
ID:
2024-04-16 18:41:51 +00:00
type: integer
description: айдишник в нашей системе Primary Key
2024-04-07 13:22:11 +00:00
AmoID:
type: integer
description: айдишник тега в амо
AccountID:
type: integer
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в интеграции амо id аккаунта в амо
2024-04-07 13:22:11 +00:00
Entity:
type: string
description: сущность, к которой принадлежит этот тег. Наверное, стоит сделать через enum в базе
2024-04-04 09:32:27 +00:00
Name:
type: string
2024-04-07 13:22:11 +00:00
description: название тега в амо
Color:
2024-04-04 09:32:27 +00:00
type: string
2024-04-07 13:22:11 +00:00
description: цвет тега в амо
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
2024-04-04 09:32:27 +00:00
type: integer
2024-04-07 13:22:11 +00:00
description: таймштамп создания тега в нашей системе
User:
type: object
description: объект пользователя из амо
properties:
ID:
2024-04-11 09:29:17 +00:00
type: integer
2024-04-16 18:41:51 +00:00
description: айдишник в нашей системе Primary Key
AccountID:
type: string
description: id пользователя из токена в нашей системе
AmoID:
2024-04-07 13:22:11 +00:00
type: integer
description: айдишник пользователя в амо
Name:
type: string
description: имя пользователя в амо
Email:
type: string
description: почта пользователя из амо
Role:
type: string
description: роль пользователя в амо
Group:
2024-05-03 09:25:43 +00:00
type: integer
description: группа пользователя в амо
2024-04-07 13:22:11 +00:00
Deleted:
type: boolean
description: флаг мягкого удаления
CreatedAt:
type: integer
description: таймштамп создания тега в нашей системе
2024-05-03 09:25:43 +00:00
Subdomain:
2024-04-11 09:29:17 +00:00
type: string
2024-05-03 09:25:43 +00:00
description: поддомен организации
Amoiserid:
type: integer
description: id в amo пользователя который подключал интеграцию
Country:
2024-04-11 09:29:17 +00:00
type: string
2024-05-03 09:25:43 +00:00
description: страна указанная в настройках аккаунта амо
2024-04-07 13:22:11 +00:00
ConnectAccountResp:
type: object
properties:
link:
type: string
description: ссылка для авторизации в амо
GetCurrentAccountResp:
type: object
properties:
ID:
2024-04-16 18:41:51 +00:00
type: integer
description: id аккаунта в амо сервисе тут Primary Key
2024-04-07 13:22:11 +00:00
AccountID:
type: string
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в квизе id из токена
2024-04-07 13:22:11 +00:00
AmocrmID:
type: integer
2024-04-16 18:41:51 +00:00
description: связь с аккаунтом в амо id аккаунта из амо
2024-04-07 13:22:11 +00:00
Name:
type: string
description: имя аккаунта в амо
Subdomain:
type: string
description: поддомен организации в амо
AmoUserID:
type: integer
description: айдишник пользвателя, который подключал интеграцию
Country:
type: string
description: страна указанная в настройках амо
CreatedAt:
type: integer
description: таймштамп создания аккаунта
GetListUserUTMResp:
type: object
properties:
count:
type: integer
description: общее количество юзеров, которые у нас закешированы для этого пользователя
items:
type: array
description: список юзеров, которые были закешированы нашим сервисом
items:
$ref: "#/components/schemas/UTM"
SaveUserListUTMReq:
type: object
properties:
utms:
type: array
description: список utm для сохранения. сохранять только те, которых в этом аккаунте ещё нет
items:
2024-04-15 15:44:04 +00:00
$ref: "#/components/schemas/UTM"
2024-04-07 13:22:11 +00:00
ListSavedIDUTMResp:
type: object
properties:
IDs:
type: array
description: список айдишников сохранённых меток
items:
type: string
ListDeleteUTMIDsReq:
type: object
properties:
utms:
type: array
description: список айдишников utm которые удалить
items:
2024-05-03 09:25:43 +00:00
type: integer
2024-04-07 13:22:11 +00:00
UserListResp:
type: object
properties:
count:
type: integer
description: общее количество юзеров, которые у нас закешированы для этого пользователя
items:
type: array
description: список юзеров, которые были закешированы нашим сервисом
items:
$ref: "#/components/schemas/User"
UserListPipelinesResp:
type: object
properties:
count:
type: integer
description: общее количество воронок, которые у нас закешированы для этого пользователя
items:
type: array
description: список воронок, которые были закешированы нашим сервисом
items:
$ref: "#/components/schemas/Pipeline"
UserListStepsResp:
type: object
properties:
count:
type: integer
description: общее количество шагов воронок, которые у нас закешированы для этого пользователя
items:
type: array
description: список шагов воронок, которые были закешированы нашим сервисом
items:
2024-04-08 07:22:03 +00:00
$ref: "#/components/schemas/Step"
2024-04-07 13:22:11 +00:00
UserListFieldsResp:
type: object
properties:
count:
type: integer
description: общее количество кастомных полей, которые у нас закешированы для этого пользователя
items:
type: array
description: список кастомных полей, которые были закешированы нашим сервисом
items:
$ref: "#/components/schemas/Field"
UserListTagsResp:
type: object
properties:
count:
type: integer
description: общее количество тегов, которые у нас закешированы для этого пользователя
items:
type: array
description: список тегов, которые были закешированы нашим сервисом
items:
$ref: "#/components/schemas/Tag"
2024-04-07 17:13:17 +00:00
PaginationReq:
type: object
properties:
page:
type: integer
description: указание страницы пагинации. Если страница не указана, применять 0
size:
type: integer
description: указание размера страницы пагинации. По умолчанию применять 25
2024-04-08 08:20:10 +00:00
RulesReq:
type: object
properties:
2024-04-23 11:18:45 +00:00
PerformerID:
type: integer
description: "айдишник ответственного за сделку"
PipelineID:
type: integer
description: "айдишник воронки"
StepID:
type: integer
description: "айдишник этапа"
2024-05-17 19:16:12 +00:00
# Utms:
# type: array
# items:
# type: integer
# description: "список UTM для этого опроса"
2024-04-23 11:18:45 +00:00
Fieldsrule:
type: object
properties:
Lead:
type: array
items:
$ref: "#/components/schemas/FieldRule"
description: "правила заполнения полей сущностей в амо"
Contact:
type: array
items:
2024-05-07 13:25:57 +00:00
$ref: "#/components/schemas/ContactRules"
description: "правила заполнения полей контакта в амо, передавать не стоит, будут парситься из конфига опроса переданного в правиле"
2024-04-23 11:18:45 +00:00
Company:
type: array
items:
$ref: "#/components/schemas/FieldRule"
description: "правила заполнения полей сущностей в амо"
Customer:
type: array
items:
$ref: "#/components/schemas/FieldRule"
description: "правила заполнения полей сущностей в амо"
2024-05-07 13:25:57 +00:00
ContactRules:
type: object
description: правила заполнения сущности контакта, название поля = id кастомного поля в амо
properties:
ContactRuleMap:
type: string
additionalProperties:
type: integer
2024-04-08 08:20:10 +00:00
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
description: Success
'201':
description: Created
content:
application/json:
schema:
type: string
description: Created
'204':
description: No content
content:
application/json:
schema:
type: string
description: No content
'400':
description: Bad Request
content:
application/json:
schema:
type: string
description: Bad Request
'401':
description: Unauthorized
content:
application/json:
schema:
type: string
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
type: string
description: Forbidden
'404':
description: Not Found
content:
application/json:
schema:
type: string
description: Not Found
'500':
description: Internal Server Error
content:
application/json:
schema:
type: string
description: Internal Server Error