Deals

Moves a deal to another stage, or to another position within its stage. stage is any stage key from GET /deal_stages, or won or lost. Moving to won or lost records won_at or lost_at; moving back to an open stage clears them. Answers 400 with code invalid_transition for a move the pipeline does not allow, such as straight from won to lost, or to a stage that does not exist.

post/deals/{id}/move

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

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

DealMoveRequest required
stage, string required

Stage to move the deal to. A stage key from GET /deal_stages: one of the account's own stages, or won or lost.

position, integer nullable

1-based position within the stage. Omit to put the deal last.

reason, string nullable

Why the deal was lost, when moving to lost

Response

Deal moved

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