deals

PUT /deals/{id}

Update a deal. To move it between stages send dealStage (and funnel), as in PUT /v3/deals/:id/stage.

Request

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

Path parameters

idinteger required

Request body

titlestring

Title to identify this deal.

valuenumber float

Monetary value.

currencystring

ISO 4217 code of an active currency for this account (e.g. USD). Omit for BRL.

exchangeRatenumber float

Exchange rate override for this deal. Only accepted when currency is set to a non-BRL currency that allows manual rate override, with a value greater than 0.

descriptionstring

Your own description of this deal.

startTimestring date-time

When this deal was started.

endTimestring date-time

When this deal was finished.

ranking0 | 1 | 2 | 3 | 4 | 5

Ranking displayed as stars in deal page.

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

Status that the deal should transition to.

lossReasonobject

Loss reason for the deal. Only accepted when the deal's status is (or is being set to) '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.
relatedEntityobject

Replaces the organization or person linked to this deal. The previous link is cleared automatically — a deal can only be linked to one entity at a time.

Example: { "type": "person", "id": 123 }

Fields:

  • type (string): Either 'person' or 'organization'.
  • id (integer): ID of the person or organization, which must be visible to the current user.
productsstring
ownerUserinteger

Owner user ID or email

allowedUsersinteger[]

Array of IDs of users that should be able to see this deal.

allowToAllUserstrue

Set true if this deal should be visible to all users.

customFieldsobject

Custom Fields information. A key-value map where each key is the identifier (name) of a custom field and the value is the desired content.

Example: { "customFields": { "custom_field_identifier_1" : "desired value", "custom_field_identifier_2" : "desired value 2" } }

dealStageinteger required

Sequence number of new deal stage. (Starts at 1 for the first stage, this is not the deal Stage ID)

funnelinteger

Funnel ID. (Required if target funnel is not the default funnel)

checkRequiredFieldsboolean

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

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.