Hanzo
OpenapiCrm

Replaces one of the caller org's deals.

Replaces one of the caller org's deals. Every writable field is taken from the request, so a field the request omits is CLEARED — send the whole record.

PUT /v1/crm/opportunities/{id}

Addresshttps://api.hanzo.ai/v1/crm/opportunities/{id}
MethodPUT
Operationput_crm_opportunities_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Replaces one of the caller org's deals. Every writable field is taken from the request, so a field the request omits is CLEARED — send the whole record. A name is required and the stage must be a pipeline stage.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID names the opportunity to update and comes from the path.
amountbodyintegerAmount is the deal value in minor units (cents) of Currency.
closeDatebodyintegerCloseDate is the expected close, as a unix second (0 = unset).
companyIdbodystringCompanyID links the deal to one of the org's companies.
currencybodystringCurrency is the ISO code Amount is denominated in; empty defaults to USD.
idbodystringID names the opportunity to update and comes from the path.
namebodystringName is the deal name.
pointOfContactIdbodystringPointOfContact links the deal to one of the org's contacts.
stagebodystringStage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive).

Response

StatusBodyMeaning
200Opportunityok

200 body — 10 fields.

FieldInTypeAlwaysDescription
amountbodyintegerAmount is the deal value in minor units (cents) of Currency.
closeDatebodyintegerCloseDate is the expected close as a unix second (0 = unset).
companyIdbodystringCompanyID links the deal to one of the org's companies; empty when unlinked, and cleared when that company is deleted.
createdAtbodyintegerCreatedAt is the unix second the opportunity was created.
currencybodystringCurrency is the ISO code Amount is denominated in; a write that names none stores USD.
idbodystringID is the server-minted opportunity id ("oppo_" + 128 random bits).
namebodystringName is the deal name.
pointOfContactIdbodystringPointOfContact links the deal to one of the org's contacts; empty when unlinked, and cleared when that contact is deleted.
stagebodystringStage is the pipeline stage, always one of NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER — stored upper-case whatever case the write used.
updatedAtbodyintegerUpdatedAt is the unix second of the last write.

Failure carries the platform error shape — see Errors.

Examples

hanzo crm opportunities set <id>

CRM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page