Create a deal

POST/api/v1/o2c/deals

Create a pipeline deal. Provide either prospect_name (before a real customer record exists) or customer_id (an expansion deal on an existing customer). stage defaults to prospecting.

Operation ID: create_deal_api_v1_o2c_deals_post·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.

Request body

prospect_namestring

Free-text prospect/company name, used before a real customer record exists. Required unless customer_id is set.

customer_idstring

Existing customer this deal is for (expansion deal). Required unless prospect_name is set.

namestring

Deal name. Defaults to the prospect/customer name.

contact_namestring

Sales contact.

contact_emailstring

Sales contact email. Never written to the customer record -- may later become the order signer.

sourcestring

One of ['event', 'expansion', 'inbound', 'other', 'outbound', 'partner', 'referral'].

stagestring

One of ['closed_lost', 'closed_won', 'negotiation', 'proposal', 'prospecting', 'qualified']. Defaults to 'prospecting'.

is_expansionboolean

True if this is expansion revenue on an existing customer.

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.

notesstring

Free-text notes.

Responses

201Successful 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