Update a Counterparty
curl --request PATCH \
--url https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "<string>",
"country": "<string>",
"countryArea": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>"
},
"dateOfBirth": "2023-12-25",
"email": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"phone": "<string>",
"taxId": "<string>"
}
'import requests
url = "https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"
payload = {
"address": {
"city": "<string>",
"country": "<string>",
"countryArea": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>"
},
"dateOfBirth": "2023-12-25",
"email": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"phone": "<string>",
"taxId": "<string>"
}
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({
address: {
city: '<string>',
country: '<string>',
countryArea: '<string>',
postalCode: '<string>',
streetAddress: '<string>'
},
dateOfBirth: '2023-12-25',
email: '<string>',
metadata: {},
name: '<string>',
nationality: '<string>',
phone: '<string>',
taxId: '<string>'
})
};
fetch('https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}', 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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}",
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([
'address' => [
'city' => '<string>',
'country' => '<string>',
'countryArea' => '<string>',
'postalCode' => '<string>',
'streetAddress' => '<string>'
],
'dateOfBirth' => '2023-12-25',
'email' => '<string>',
'metadata' => [
],
'name' => '<string>',
'nationality' => '<string>',
'phone' => '<string>',
'taxId' => '<string>'
]),
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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}")
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 \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"object": "counterparty",
"phone": "<string>",
"rejectionReason": "<string>",
"taxId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Counterparties
Update a Counterparty
Update a Counterparty (partial; unknown keys 400).
PATCH
/
counterparties
/
{counterpartyId}
Update a Counterparty
curl --request PATCH \
--url https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "<string>",
"country": "<string>",
"countryArea": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>"
},
"dateOfBirth": "2023-12-25",
"email": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"phone": "<string>",
"taxId": "<string>"
}
'import requests
url = "https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"
payload = {
"address": {
"city": "<string>",
"country": "<string>",
"countryArea": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>"
},
"dateOfBirth": "2023-12-25",
"email": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"phone": "<string>",
"taxId": "<string>"
}
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({
address: {
city: '<string>',
country: '<string>',
countryArea: '<string>',
postalCode: '<string>',
streetAddress: '<string>'
},
dateOfBirth: '2023-12-25',
email: '<string>',
metadata: {},
name: '<string>',
nationality: '<string>',
phone: '<string>',
taxId: '<string>'
})
};
fetch('https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}', 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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}",
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([
'address' => [
'city' => '<string>',
'country' => '<string>',
'countryArea' => '<string>',
'postalCode' => '<string>',
'streetAddress' => '<string>'
],
'dateOfBirth' => '2023-12-25',
'email' => '<string>',
'metadata' => [
],
'name' => '<string>',
'nationality' => '<string>',
'phone' => '<string>',
'taxId' => '<string>'
]),
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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\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://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}")
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 \"address\": {\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"countryArea\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"streetAddress\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"nationality\": \"<string>\",\n \"phone\": \"<string>\",\n \"taxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"nationality": "<string>",
"object": "counterparty",
"phone": "<string>",
"rejectionReason": "<string>",
"taxId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Token from POST /auth/token
Path Parameters
Body
application/json
Partial update: every field optional; omitted fields are unchanged. Unknown fields are rejected with 400 (strict decode) by the handler.
Response
200 - application/json
The request has succeeded.
A third party a customer transacts with: an entry in the customer's address book. Counterparties will own External Accounts (registered payment destinations) in a later slice.
Show child attributes
Show child attributes
Available options:
individual, business Show child attributes
Show child attributes
Full legal name or registered business name.
ISO 3166-1 alpha-2.
Available options:
counterparty Set when status = rejected.
Lifecycle of a counterparty. rejected is reserved for create-time
compliance screening (not yet active); deleted marks a soft-deleted
record that remains readable by id.
Available options:
active, rejected, deleted Was this page helpful?
⌘I