curl --request POST \
--url https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contact_email": "sam@riverbend.example",
"gln": "9520001000013",
"is_exempt": false,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}
'import requests
url = "https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners"
payload = {
"contact_email": "sam@riverbend.example",
"gln": "9520001000013",
"is_exempt": False,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_email: 'sam@riverbend.example',
gln: '9520001000013',
is_exempt: false,
location_description: 'Dock 4, 100 Example Way, Salinas CA',
name: 'Riverbend Produce (Demo)'
})
};
fetch('https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners', 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://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contact_email' => 'sam@riverbend.example',
'gln' => '9520001000013',
'is_exempt' => false,
'location_description' => 'Dock 4, 100 Example Way, Salinas CA',
'name' => 'Riverbend Produce (Demo)'
]),
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://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners"
payload := strings.NewReader("{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}"
response = http.request(request)
puts response.read_body{
"contact_email": "sam@riverbend.example",
"contact_name": "Sam Rivera",
"contact_phone": "+1 831 555 0100",
"fda_fei": "3001234567",
"gln": "9520001000013",
"id": "7Qm2xKd9TgYhVnR4aLz8Pw",
"is_exempt": false,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Create a trading partner
Add a trading partner. The name must be unique within the organization. Requires the Owner, Manager or Editor role; a read-only key is refused with 403.
curl --request POST \
--url https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contact_email": "sam@riverbend.example",
"gln": "9520001000013",
"is_exempt": false,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}
'import requests
url = "https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners"
payload = {
"contact_email": "sam@riverbend.example",
"gln": "9520001000013",
"is_exempt": False,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_email: 'sam@riverbend.example',
gln: '9520001000013',
is_exempt: false,
location_description: 'Dock 4, 100 Example Way, Salinas CA',
name: 'Riverbend Produce (Demo)'
})
};
fetch('https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners', 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://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contact_email' => 'sam@riverbend.example',
'gln' => '9520001000013',
'is_exempt' => false,
'location_description' => 'Dock 4, 100 Example Way, Salinas CA',
'name' => 'Riverbend Produce (Demo)'
]),
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://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners"
payload := strings.NewReader("{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/compliance/api/v1/organizations/{organization_id}/trading-partners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_email\": \"sam@riverbend.example\",\n \"gln\": \"9520001000013\",\n \"is_exempt\": false,\n \"location_description\": \"Dock 4, 100 Example Way, Salinas CA\",\n \"name\": \"Riverbend Produce (Demo)\"\n}"
response = http.request(request)
puts response.read_body{
"contact_email": "sam@riverbend.example",
"contact_name": "Sam Rivera",
"contact_phone": "+1 831 555 0100",
"fda_fei": "3001234567",
"gln": "9520001000013",
"id": "7Qm2xKd9TgYhVnR4aLz8Pw",
"is_exempt": false,
"location_description": "Dock 4, 100 Example Way, Salinas CA",
"name": "Riverbend Produce (Demo)"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Path Parameters
Identifier of the organization.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Body
A trading partner to create.
Name of the partner, up to 255 characters, unique within the organization.
1 - 255^[^\x00]{1,255}$Free-text description of the partner's location.
^[^\x00]{0,}$The partner's Global Location Number. One that is not in the registry is refused with 422.
^[^\x00]{0,}$The partner's FDA Establishment Identifier, up to 32 characters.
32^[^\x00]{0,32}$Name of a contact at the partner, up to 255 characters.
255^[^\x00]{0,255}$Email address of the contact. One that is not a valid address is refused with 422.
^[^\x00]{0,}$Phone number of the contact, up to 40 characters.
40^[^\x00]{0,40}$Whether the partner is exempt from FSMA 204 recordkeeping.
Response
Created
A supplier, customer or other party the organization exchanges food with (FSMA 204 IPS / ISR).
Identifier of the trading partner.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Name of the partner, unique within the organization.
Free-text description of the partner's location; may be empty.
The partner's FDA Establishment Identifier; empty when not set.
Name of a contact at the partner; empty when not set.
Email address of the contact; empty when not set.
Phone number of the contact; empty when not set.
Whether the partner is exempt from FSMA 204 recordkeeping, so the organization assigns lots.
The partner's Global Location Number, or null when none is recorded.