201Successful Response
Schema: SuccessEnvelope_DealResponse_
successbooleanmessagestringcodestringdataDealResponse
/api/v1/o2c/dealsCreate 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.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: DealCreate
prospect_namestringFree-text prospect/company name, used before a real customer record exists. Required unless customer_id is set.
customer_idstringExisting customer this deal is for (expansion deal). Required unless prospect_name is set.
namestringDeal name. Defaults to the prospect/customer name.
contact_namestringSales contact.
contact_emailstringSales contact email. Never written to the customer record -- may later become the order signer.
sourcestringOne of ['event', 'expansion', 'inbound', 'other', 'outbound', 'partner', 'referral'].
stagestringOne of ['closed_lost', 'closed_won', 'negotiation', 'proposal', 'prospecting', 'qualified']. Defaults to 'prospecting'.
is_expansionbooleanTrue if this is expansion revenue on an existing customer.
expected_value_centsintegerEstimated deal value in cents.
expected_hoursnumber | stringEstimated hours.
expected_term_monthsintegerEstimated contract term in months.
expected_start_datestring · dateEstimated start date.
expected_close_datestring · dateEstimated close date.
notesstringFree-text notes.
owner_namestringSales rep / deal owner. Free text (reps are often not DayZero users); the pipeline's owner filter matches on it exactly.
deal_typestringBusiness-defined deal category, e.g. 'Subcontractor', 'EPC', 'Developer'. Free text -- every business slices deals differently.
revenue_typestringHow the money arrives: 'recurring' (monthly) or 'one_time' (prepaid up front).
Schema: SuccessEnvelope_DealResponse_
successbooleanmessagestringcodestringdataDealResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.