CRM deals

Изменить сделку

Изменяет указанную сделку CRM.

patch/api/v1/crm/deals/{id}

Request

  • Base URL: https://erp.akeda.ru
  • URL: https://erp.akeda.ru/api/v1/crm/deals/{id}
  • 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

titlestring
amountstring

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

currencystring
sourcestring
descriptionstring
probabilityinteger
expected_close_atstring date-time nullable
owner_idinteger nullable
customer_idstring uuid nullable

Прежний вход: контрагент справочника ERP. Сервер находит или заводит по нему клиента CRM и записывает crm_customer_id; в ответе поля нет.

crm_customer_idstring uuid nullable
clear_customerboolean

Отвязать клиента от сделки. Пустой crm_customer_id значит «не менять», поэтому отвязка — этим признаком

next_actionstring
next_action_atstring date-time nullable
customobject nullable

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

archivedboolean

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 1 revision of this API.