CRM deals

Перевести сделку на другую стадию

Для стадии категории lost обязательна причина отказа; закрытая сделка требует отдельного переоткрытия.

post/api/v1/crm/deals/{id}/move

Request

  • Base URL: https://erp.akeda.ru
  • URL: https://erp.akeda.ru/api/v1/crm/deals/{id}/move
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Api-Key
    • OAuth 2 (authorization code, authorization URL https://erp.akeda.ru/oauth2/authorize, token URL https://erp.akeda.ru/oauth2/token, scopes: akeda:delegate)

Request body

stage_idstring uuid required
pipeline_idstring uuid nullable

Целевая воронка. Пусто или текущая - перенос по этапам своей воронки; другая - сделка переезжает в неё, а stage_id должен быть этапом целевой воронки. Закрытую сделку не переносят

loss_reason_idstring uuid nullable

Обязательна для стадии категории lost

Response

Сделка на новой стадии

idstring uuid required
pipeline_idstring uuid required
stage_idstring uuid required
titlestring required
amountstring required

Сумма десятичной строкой: «19990.50». Разрядность берёт валюта (MONEY-ROUNDING.md)

currencystring required

Код валюты из справочника ERP

amount_manualboolean

Сумма набрана руками, а не сложена из состава сделки; сохранение состава снимает признак

prices_include_vatboolean

Цены строк состава включают НДС

sourcestring required

Канал обращения; manual для ручного заведения

probabilityinteger required
expected_close_atstring date-time
owner_idinteger
crm_customer_idstring uuid
next_actionstring required
next_action_atstring date-time
archived_atstring date-time
closed_atstring date-time
loss_reason_idstring uuid
descriptionstring
first_messagestring
utm_sourcestring
utm_mediumstring
utm_campaignstring
utm_termstring
utm_contentstring
landing_pagestring
referrerstring
customobject nullable

Дополнительные поля кабинета: состав задаёт «Настройки → Поля»

created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 2 revisions of this API.