deals

PUT /deals/{id}/status

Win, lose or reopen a deal.

Request

  • Base URL
    https://api.agendor.com.br/v3
  • Auth
    API key in header Authorization

Path parameters

idinteger required

Request body

dealStatusText'ongoing' | 'won' | 'lost' required

Status that the deal should transition to.

ownerUserinteger

Owner user ID or email.

endTimestring date-time

When the deal was finished.

checkRequiredFieldsboolean

Check if required fields are filled when changing the deal stage or status.

lossReasonobject

Loss reason for the deal. Use when dealStatusText is 'lost'.

Example: { "id": 1, "description": "Customer chose a competitor" }

Fields:

  • id (integer): Loss reason ID (from GET /v3/loss_reasons).
  • description (string, optional): Specific description for this deal's loss.

Response

OK

Example response

{
  "data": {
    "organization": {
      "contact": {
        "work": "(99) 9999-9999",
        "mobile": "(99) 99999-9999",
        "whatsapp": "+5511999999999"
      },
      "address": {
        "postalCode": "99999-999"
      }
    },
    "person": {
      "contact": {
        "work": "(99) 9999-9999",
        "mobile": "(99) 99999-9999",
        "whatsapp": "+5511999999999"
      },
      "address": {
        "postalCode": "99999-999"
      }
    }
  }
}

Changes

No operation changes recorded.