Deals

Updates a deal's title, contact, value, currency, expected close date, description or next step. Send next_step: null to clear it. stage is ignored here: move a deal with POST /deals/{id}/move.

patch/deals/{id}

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Request body

DealRequest required
contact, string

Contact ID (con_...) the deal is with

title, string
value, integer nullable

Expected value in the currency's smallest unit (cents)

currency, string
expected_close_on, string date nullable

When you expect the deal to close, as YYYY-MM-DD. A value that isn't a date is refused with 422.

description, string nullable

What the deal is about. Running updates go on its timeline: POST /activities with deal.

next_step, string nullable

The next thing to do on the deal, e.g. "Call back about the roof size"

next_step_due_on, string date nullable

When the next step is due, as YYYY-MM-DD. The team is reminded that morning, in the business's time zone, while the deal is open. A value that isn't a date is refused with 422.

stage, string

Starting stage, on create only. A stage key from GET /deal_stages: one of the account's own stages, or won or lost. Defaults to the first stage. Use POST /deals/{id}/move to change it later.

lost_reason, string nullable

Why the deal was lost, on create with stage: lost only

Response

Deal updated

Deal required
id, string required
object, string required
title, string required
stage, string required
position, integer required
value, integer nullable required
currency, string required
expected_close_on, string date nullable required
description, string nullable required
next_step, string nullable required
next_step_due_on, string date nullable required
won_at, string date-time nullable required
lost_at, string date-time nullable required
lost_reason, string nullable required
created_at, string date-time required
updated_at, string date-time required
contact, union required

ID by default, full object when expanded

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision