CRM

Update a deal

Corrects what a trattativa says: its title, customer, contact, figure, currency, probability, forecast date, owner or source. It CANNOT move a stage and cannot close the deal — both write the funnel’s append-only stage history, and both belong to crm_advance_deal. Name at least one field. On a WON or LOST deal the figures the reports count — amount, currency, probability and expected_close_date — are locked and a change to them is refused: reopen it with crm_reopen_deal first; its title, customer, contact, owner and source stay editable. Editing a figure is bookkeeping rather than contact with the customer, so this never resets a deal’s idle clock; and pushing expected_close_date later is recorded as a slip, so never resend the same values just to «touch» a deal.

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

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/crm/deals/{id}
  • Auth: HTTP bearer

Path parameters

idstring uuid required

The deal id, from crm_list_deals or crm_get_deal.

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Request body

titlestring

Rename it.

party_idstring uuid

Re-point it at another customer, from anagrafiche_search_parties.

contact_idstring uuid nullable

The person at that customer — an anagrafica of kind person, from anagrafiche_search_parties.

amountnumber

The expected value, in the deal’s own currency.

currencystring

ISO-4217, three uppercase letters — EUR, USD, CHF.

probabilitynumber

0–100, never 0–1. A stage move does not overwrite a figure typed here.

expected_close_datestring nullable

A calendar day, YYYY-MM-DD. Call custodo_whoami if you are unsure of today’s date.

owner_user_idstring uuid

Hand it to another colleague.

sourcestring nullable

Where it came from — «sito», «passaparola», «fiera». Free text.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.