curl --request POST \
--url https://www.closient.com/certifications/api/v1/products/{gtin}/certifications \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"certificate_number": "NOP-12345",
"certification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiration_date": "2025-01-15",
"issuing_body": "Oregon Tilth",
"metadata": {
"order_id": "6735"
},
"valid_from": "2024-01-15"
}
'import requests
url = "https://www.closient.com/certifications/api/v1/products/{gtin}/certifications"
payload = {
"certificate_number": "NOP-12345",
"certification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiration_date": "2025-01-15",
"issuing_body": "Oregon Tilth",
"metadata": { "order_id": "6735" },
"valid_from": "2024-01-15"
}
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({
certificate_number: 'NOP-12345',
certification_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
expiration_date: '2025-01-15',
issuing_body: 'Oregon Tilth',
metadata: {order_id: '6735'},
valid_from: '2024-01-15'
})
};
fetch('https://www.closient.com/certifications/api/v1/products/{gtin}/certifications', 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/certifications/api/v1/products/{gtin}/certifications",
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([
'certificate_number' => 'NOP-12345',
'certification_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'expiration_date' => '2025-01-15',
'issuing_body' => 'Oregon Tilth',
'metadata' => [
'order_id' => '6735'
],
'valid_from' => '2024-01-15'
]),
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/certifications/api/v1/products/{gtin}/certifications"
payload := strings.NewReader("{\n \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\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/certifications/api/v1/products/{gtin}/certifications")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/certifications/api/v1/products/{gtin}/certifications")
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 \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\n}"
response = http.request(request)
puts response.read_body{
"audit_date": "2024-01-10",
"certificate_countries": [
"US",
"CA"
],
"certificate_number": "NOP-12345",
"certification_value": "100% Organic",
"code": "USDA_ORGANIC",
"description": "USDA NOP.",
"expiration_date": "2025-01-15",
"expiry_date": "2025-01-15",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"initial_certification_date": "2020-03-01",
"is_active": true,
"issuing_body": "Oregon Tilth",
"label": "USDA Organic",
"metadata": {
"order_id": "6735"
},
"scope": "Product",
"url": "https://www.usda.gov/topics/organic",
"valid_from": "2024-01-15",
"verification_status": "verified",
"verification_url": "https://organic.ams.usda.gov/integrity/"
}{
"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"
}{
"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"
}Assign certification to product
Create a new certification assignment for a product your organization owns. Returns 201 with the created assignment on success; 403 when the API key’s role may not contribute (a read-only key); 404 if the GTIN does not match a product your organization owns or the certification_id does not exist; 409 if the certification is already assigned to this product (the (product, certification) pair is unique). A product owned by another organization, and one owned by nobody, both return 404: the status code never reveals whether a GTIN exists in the catalog. Claim an unowned GTIN through POST /products/{gtin}/claim first.
curl --request POST \
--url https://www.closient.com/certifications/api/v1/products/{gtin}/certifications \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"certificate_number": "NOP-12345",
"certification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiration_date": "2025-01-15",
"issuing_body": "Oregon Tilth",
"metadata": {
"order_id": "6735"
},
"valid_from": "2024-01-15"
}
'import requests
url = "https://www.closient.com/certifications/api/v1/products/{gtin}/certifications"
payload = {
"certificate_number": "NOP-12345",
"certification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiration_date": "2025-01-15",
"issuing_body": "Oregon Tilth",
"metadata": { "order_id": "6735" },
"valid_from": "2024-01-15"
}
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({
certificate_number: 'NOP-12345',
certification_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
expiration_date: '2025-01-15',
issuing_body: 'Oregon Tilth',
metadata: {order_id: '6735'},
valid_from: '2024-01-15'
})
};
fetch('https://www.closient.com/certifications/api/v1/products/{gtin}/certifications', 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/certifications/api/v1/products/{gtin}/certifications",
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([
'certificate_number' => 'NOP-12345',
'certification_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'expiration_date' => '2025-01-15',
'issuing_body' => 'Oregon Tilth',
'metadata' => [
'order_id' => '6735'
],
'valid_from' => '2024-01-15'
]),
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/certifications/api/v1/products/{gtin}/certifications"
payload := strings.NewReader("{\n \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\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/certifications/api/v1/products/{gtin}/certifications")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/certifications/api/v1/products/{gtin}/certifications")
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 \"certificate_number\": \"NOP-12345\",\n \"certification_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"expiration_date\": \"2025-01-15\",\n \"issuing_body\": \"Oregon Tilth\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"valid_from\": \"2024-01-15\"\n}"
response = http.request(request)
puts response.read_body{
"audit_date": "2024-01-10",
"certificate_countries": [
"US",
"CA"
],
"certificate_number": "NOP-12345",
"certification_value": "100% Organic",
"code": "USDA_ORGANIC",
"description": "USDA NOP.",
"expiration_date": "2025-01-15",
"expiry_date": "2025-01-15",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"initial_certification_date": "2020-03-01",
"is_active": true,
"issuing_body": "Oregon Tilth",
"label": "USDA Organic",
"metadata": {
"order_id": "6735"
},
"scope": "Product",
"url": "https://www.usda.gov/topics/organic",
"valid_from": "2024-01-15",
"verification_status": "verified",
"verification_url": "https://organic.ams.usda.gov/integrity/"
}{
"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"
}{
"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"
}Path Parameters
Body
Request body for POST /products/{gtin}/certifications.
Creates a new CertificationAssignment linking the GTIN's
product to the certification identified by certification_id.
Returns 409 Conflict if the assignment already exists, and 422 if the body names
verification_status (read-only; Closient records it). All
certificate-detail fields are optional; defaults are empty strings,
null dates, or empty lists matching the model column defaults.
Response
Created
A certification assigned to a specific product, with certificate detail.
Mirrors CertificationAssignment.
Most fields proxy through to the linked Certification record
(label, code, description, url, logo_url); the
rest carry the per-instance certificate metadata (number, issuing
body, validity dates, verification status, audit dates, scope, ...).
id and id are the certification's identifiers, not
the assignment's — chosen so callers can deep-link to the
certification record from a product's certification list.
URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Lifecycle state of the certificate's verification. unverified (default) means the brand-claimed certificate has not been audited by Closient; verified means it has been confirmed against the issuing body's registry; expired means the verification record lapsed. Maps to GS1 certificationStatus (ACTIVE / INACTIVE) in JSON-LD exports.
unverified, verified, expired