Edit deal

PATCH/api/v1/o2c/deals/{deal_id}

Edit a deal's stage, notes, owner / deal type / revenue type, and expected-commercials estimates. Blocked once the deal has converted to an order (order_id set) -- manage it from Orders instead. Stage changes are validated against the model's allowed transitions.

Operation ID: update_deal_api_v1_o2c_deals__deal_id__patch·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Path

deal_idstringrequired

Request body

stagestring

One of ['closed_lost', 'closed_won', 'negotiation', 'proposal', 'prospecting', 'qualified'] (open stages only).

notesstring

Free-text notes.

owner_namestring

Sales rep / deal owner. Free text (reps are often not DayZero users); the pipeline's owner filter matches on it exactly.

deal_typestring

Business-defined deal category, e.g. 'Subcontractor', 'EPC', 'Developer'. Free text -- every business slices deals differently.

revenue_typestring

How the money arrives: 'recurring' (monthly) or 'one_time' (prepaid up front).

expected_value_centsinteger

Estimated deal value in cents.

expected_hoursnumber | string

Estimated hours.

expected_term_monthsinteger

Estimated contract term in months.

expected_start_datestring · date

Estimated start date.

expected_close_datestring · date

Estimated close date.

Responses

200Successful Response

successboolean
messagestring
codestring
dataDealResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject