curl --request PATCH \
--url https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"certificate_number": "NOP-12345-UPDATED",
"metadata": {
"order_id": "6735"
}
}
'import requests
url = "https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id}"
payload = {
"certificate_number": "NOP-12345-UPDATED",
"metadata": { "order_id": "6735" }
}
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({certificate_number: 'NOP-12345-UPDATED', metadata: {order_id: '6735'}})
};
fetch('https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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([
'certificate_number' => 'NOP-12345-UPDATED',
'metadata' => [
'order_id' => '6735'
]
]),
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/{certification_id}"
payload := strings.NewReader("{\n \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\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://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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 \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\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"
}Update certification assignment
Partially update an existing certification assignment on a product your organization owns. Only fields present in the request body are applied; omitted fields are left unchanged. metadata follows Stripe-style merge semantics. Returns 403 when the API key’s role may not contribute (a read-only key), and 404 when the GTIN does not match a product your organization owns or the certification does not match an existing assignment on it.
curl --request PATCH \
--url https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"certificate_number": "NOP-12345-UPDATED",
"metadata": {
"order_id": "6735"
}
}
'import requests
url = "https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id}"
payload = {
"certificate_number": "NOP-12345-UPDATED",
"metadata": { "order_id": "6735" }
}
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({certificate_number: 'NOP-12345-UPDATED', metadata: {order_id: '6735'}})
};
fetch('https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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([
'certificate_number' => 'NOP-12345-UPDATED',
'metadata' => [
'order_id' => '6735'
]
]),
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/{certification_id}"
payload := strings.NewReader("{\n \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\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://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/certifications/api/v1/products/{gtin}/certifications/{certification_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 \"certificate_number\": \"NOP-12345-UPDATED\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\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"
}Path Parameters
Body
Request body for PATCH /products/{gtin}/certifications/{certification_id}.
All fields are optional; only fields present in the request body are
updated. metadata follows the Stripe-style merge convention: keys
with null values delete the key, keys with values upsert, omitted
keys are preserved.
http(s) URL to verify this certificate online. Send "" to clear; omit to leave unchanged; the default shown is not applied unless the field is sent. Not nullable.
200^([Hh][Tt][Tt][Pp][Ss]?://[^\x00-\x20\x7f/?#][^\x00-\x20\x7f]{0,191})?$Response
OK
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