Skip to main content
PATCH
/
deals
/
{dealId}
Update deal
curl --request PATCH \
  --url https://api.routera.io/deals/{dealId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fields": {
    "deal_name": "Enterprise plan"
  }
}
'
{
  "id": "<string>",
  "external_id": "<string>",
  "deal_name": "<string>",
  "pipeline": "<string>",
  "deal_stage": "<string>",
  "deal_owner": "jane@example.com",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "archived": true,
  "archived_by": "<string>"
}

Endpoint

PATCH https://api.routera.io/deals/{id}
Route: /deals/{dealId}
Authentication: Bearer JWT
Path parameter: dealId — object ID

Query parameters

properties
string
Comma-separated list of additional property names to include alongside the default set for this object type (e.g. ?properties=phone). Names already in the default set are not duplicated. Invalid or disallowed property names return 400.

Request body

The body is a JSON object with a single fields property. Each key inside fields is a field internal_name (the same names returned in GET responses, not nested under fields in the response). Only include keys you want to change. Omitted fields keep their current values.
{
  "fields": {
    "deal_name": "Enterprise plan"
  }
}
KeyDescription
fieldsRequired. Map of internal_name → value for this object type.
fields.external_idOptional. External identifier for sync with outside systems.
Custom fields configured in your account use the same key names inside fields.

Default response fields

200 returns the updated object using the default property set:
PropertyDescription
idInternal object ID
deal_nameCustom or system field (flat on the object)
pipelineCustom or system field (flat on the object)
deal_stageCustom or system field (flat on the object)
deal_ownerAssigned owner email
external_idExternal identifier (nullable)
archivedfalse when active; ISO timestamp when archived
created_at and updated_at are always included in every response (ISO 8601 UTC), even when not listed above. When an object is archived, archived_by is also included automatically.

Errors

StatusWhen
400Missing dealId, invalid properties, invalid JSON, validation failure, or forbidden system field
401Missing account context
404Object not found
409Object is archived — cannot update
409Duplicate active record (unique key collision)
{ "message": "Cannot update an archived object", "error": true }

Authorizations

Authorization
string
header
required

Bearer JWT with valid account context.

Path Parameters

dealId
string
required

Object identifier

Query Parameters

properties
string

Comma-separated additional property names to include alongside defaults (e.g. phone). Invalid or disallowed names return 400.

Body

application/json

Write payload for POST create and PATCH update. Keys inside fields match field internal names returned in GET responses.

fields
object
required

Field values keyed by internal_name. Custom account fields use the same key names.

Response

Updated

id
string
external_id
string | null
deal_name
string | null
pipeline
string | null
deal_stage
string | null
deal_owner
string | null

Assigned owner email

Example:

"jane@example.com"

created_at
string<date-time>
updated_at
string<date-time>
archived

false when active, or ISO timestamp when archived

archived_by
string