Skip to main content
GET
/
counterparties
/
{counterpartyId}
Get a Counterparty
curl --request GET \
  --url https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox-api.polygon.technology/v0.10/counterparties/{counterpartyId}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

Authorization
string
header
required

Token from POST /auth/token

Path Parameters

counterpartyId
string
required

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.

address
object
createdAt
string<date-time>
customerId
string
dateOfBirth
string<date>
email
string
entityType
enum<string>
Available options:
individual,
business
id
string
metadata
object
name
string

Full legal name or registered business name.

nationality
string

ISO 3166-1 alpha-2.

object
enum<string>
Available options:
counterparty
phone
string
rejectionReason
string

Set when status = rejected.

status
enum<string>

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
taxId
string
updatedAt
string<date-time>