curl --request PATCH \
--url https://api.tomorro.com/v2/counterparties/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"d0667922-d880-4e9f-8c9e-a2acd0174436": "value1",
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value2"
}
}
'import requests
url = "https://api.tomorro.com/v2/counterparties/{id}"
payload = {
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"d0667922-d880-4e9f-8c9e-a2acd0174436": "value1",
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value2"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Corporation',
status: 'active',
logoUrl: 'https://example.com/logo.png',
fields: {
'd0667922-d880-4e9f-8c9e-a2acd0174436': 'value1',
'ff093e5d-39af-4cf6-8920-c07c9e3f5921': 'value2'
}
})
};
fetch('https://api.tomorro.com/v2/counterparties/{id}', 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.tomorro.com/v2/counterparties/{id}",
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([
'name' => 'Acme Corporation',
'status' => 'active',
'logoUrl' => 'https://example.com/logo.png',
'fields' => [
'd0667922-d880-4e9f-8c9e-a2acd0174436' => 'value1',
'ff093e5d-39af-4cf6-8920-c07c9e3f5921' => 'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.tomorro.com/v2/counterparties/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.tomorro.com/v2/counterparties/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/counterparties/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value1"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-02T00:00:00.000Z"
}Update counterparty
Updates a counterparty with the provided fields. Only the fields provided in the request body will be updated.
curl --request PATCH \
--url https://api.tomorro.com/v2/counterparties/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"d0667922-d880-4e9f-8c9e-a2acd0174436": "value1",
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value2"
}
}
'import requests
url = "https://api.tomorro.com/v2/counterparties/{id}"
payload = {
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"d0667922-d880-4e9f-8c9e-a2acd0174436": "value1",
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value2"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Corporation',
status: 'active',
logoUrl: 'https://example.com/logo.png',
fields: {
'd0667922-d880-4e9f-8c9e-a2acd0174436': 'value1',
'ff093e5d-39af-4cf6-8920-c07c9e3f5921': 'value2'
}
})
};
fetch('https://api.tomorro.com/v2/counterparties/{id}', 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.tomorro.com/v2/counterparties/{id}",
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([
'name' => 'Acme Corporation',
'status' => 'active',
'logoUrl' => 'https://example.com/logo.png',
'fields' => [
'd0667922-d880-4e9f-8c9e-a2acd0174436' => 'value1',
'ff093e5d-39af-4cf6-8920-c07c9e3f5921' => 'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.tomorro.com/v2/counterparties/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.tomorro.com/v2/counterparties/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/counterparties/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"status\": \"active\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"fields\": {\n \"d0667922-d880-4e9f-8c9e-a2acd0174436\": \"value1\",\n \"ff093e5d-39af-4cf6-8920-c07c9e3f5921\": \"value2\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"status": "active",
"logoUrl": "https://example.com/logo.png",
"fields": {
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value1"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-02T00:00:00.000Z"
}Authorizations
API key for authentication. Get your key at https://app.tomorro.com/settings/integrations?integration=api-key
Path Parameters
The unique identifier (UUID) of the counterparty
"550e8400-e29b-41d4-a716-446655440000"
Body
Name of the counterparty (company or individual name)
"Acme Corporation"
Status of the counterparty
active, archived "active"
URL of the counterparty logo
"https://example.com/logo.png"
Custom field values for the counterparty. Keys are field IDs, values are the field values.
Show child attributes
Show child attributes
{
"d0667922-d880-4e9f-8c9e-a2acd0174436": "value1",
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value2"
}
Response
Counterparty updated successfully
Unique identifier for the counterparty
"550e8400-e29b-41d4-a716-446655440000"
Name of the counterparty (company or individual name)
"Acme Corporation"
Current status of the counterparty
active, archived "active"
URL of the counterparty logo
"https://example.com/logo.png"
Custom field values for the counterparty
{
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value1"
}
Time at which the counterparty was created. Formatted as an ISO 8601 date-time string.
"2024-01-01T00:00:00.000Z"
Time at which the counterparty was last updated. Formatted as an ISO 8601 date-time string.
"2024-01-02T00:00:00.000Z"