Hanzo AI
OpenapiCrm

Replace opportunities

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.
amountbodyinteger—Amount is the deal value in minor units (cents) of Currency.
closeDatebodyinteger—CloseDate is the expected close, as a unix second (0 = unset).
companyIdbodystring—CompanyID links the deal to one of the org's companies.
currencybodystring—Currency is the ISO code Amount is denominated in; empty defaults to USD.
idbodystring—ID names the opportunity to update and comes from the path.
namebodystring—Name is the deal name.
pointOfContactIdbodystring—PointOfContact links the deal to one of the org's contacts.
stagebodystring—Stage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive).

Response

StatusBodyMeaning
200Opportunityok

200 body — 10 fields.

FieldInTypeAlwaysDescription
amountbodyinteger—Amount is the deal value in minor units (cents) of Currency.
closeDatebodyinteger—CloseDate is the expected close as a unix second (0 = unset).
companyIdbodystring—CompanyID links the deal to one of the org's companies; empty when unlinked, and cleared when that company is deleted.
createdAtbodyinteger—CreatedAt is the unix second the opportunity was created.
currencybodystring—Currency is the ISO code Amount is denominated in; a write that names none stores USD.
idbodystring—ID is the server-minted opportunity id ("oppo_" + 128 random bits).
namebodystring—Name is the deal name.
pointOfContactIdbodystring—PointOfContact links the deal to one of the org's contacts; empty when unlinked, and cleared when that contact is deleted.
stagebodystring—Stage is the pipeline stage, always one of NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER — stored upper-case whatever case the write used.
updatedAtbodyinteger—UpdatedAt 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