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"
}
}
'import requests
url = "https://api.routera.io/deals/{dealId}"
payload = { "fields": { "deal_name": "Enterprise plan" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fields: {deal_name: 'Enterprise plan'}})
};
fetch('https://api.routera.io/deals/{dealId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routera.io/deals/{dealId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'deal_name' => 'Enterprise plan'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.routera.io/deals/{dealId}"
payload := strings.NewReader("{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.routera.io/deals/{dealId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routera.io/deals/{dealId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}Update deal
PATCH /deals/ — update fields on an active object
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"
}
}
'import requests
url = "https://api.routera.io/deals/{dealId}"
payload = { "fields": { "deal_name": "Enterprise plan" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fields: {deal_name: 'Enterprise plan'}})
};
fetch('https://api.routera.io/deals/{dealId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routera.io/deals/{dealId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'deal_name' => 'Enterprise plan'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.routera.io/deals/{dealId}"
payload := strings.NewReader("{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.routera.io/deals/{dealId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routera.io/deals/{dealId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"deal_name\": \"Enterprise plan\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}Endpoint
PATCH https://api.routera.io/deals/{id}
/deals/{dealId}Authentication: Bearer JWT Path parameter:
dealId — object ID
Query parameters
?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 singlefields 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"
}
}
| Key | Description |
|---|---|
fields | Required. Map of internal_name → value for this object type. |
fields.external_id | Optional. External identifier for sync with outside systems. |
fields.
Default response fields
200 returns the updated object using the default property set:| Property | Description |
|---|---|
id | Internal object ID |
deal_name | Custom or system field (flat on the object) |
pipeline | Custom or system field (flat on the object) |
deal_stage | Custom or system field (flat on the object) |
deal_owner | Assigned owner email |
external_id | External identifier (nullable) |
archived | false 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
| Status | When |
|---|---|
400 | Missing dealId, invalid properties, invalid JSON, validation failure, or forbidden system field |
401 | Missing account context |
404 | Object not found |
409 | Object is archived — cannot update |
409 | Duplicate active record (unique key collision) |
{ "message": "Cannot update an archived object", "error": true }
Authorizations
Bearer JWT with valid account context.
Path Parameters
Object identifier
Query Parameters
Comma-separated additional property names to include alongside defaults (e.g. phone). Invalid or disallowed names return 400.
Body
Write payload for POST create and PATCH update. Keys inside fields match field internal names returned in GET responses.
Field values keyed by internal_name. Custom account fields use the same key names.
Hide child attributes
Hide child attributes
Optional external identifier for sync with outside systems
"ext-001"
Value for deal_name (field internal_name)
"Enterprise plan"
Value for pipeline (field internal_name)
"default"
Value for deal_stage (field internal_name)
"qualified"
Response
Updated
Assigned owner email
"jane@example.com"
false when active, or ISO timestamp when archived
Was this page helpful?
