curl --request PATCH \
--url https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_primary": true,
"priority": 1,
"title": "Back of package"
}
'import requests
url = "https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}"
payload = {
"is_primary": True,
"priority": 1,
"title": "Back of package"
}
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({is_primary: true, priority: 1, title: 'Back of package'})
};
fetch('https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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([
'is_primary' => true,
'priority' => 1,
'title' => 'Back of package'
]),
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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}"
payload := strings.NewReader("{\n \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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 \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\n}"
response = http.request(request)
puts response.read_body{
"created": "2025-07-01T14:00:00Z",
"id": "keATfB8VP2gSjcnTbsMNQL",
"image_url": "https://cdn.closient.com/products/00012345678905/hero.jpg",
"is_primary": true,
"priority": 0,
"title": "Front of package"
}{
"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 product image
Partially update an image’s caption (title), primary flag, or display order (priority) — only supplied fields change. Setting is_primary=true automatically demotes the previous primary image, same as upload. Requires the organization.contribute_organization permission.
curl --request PATCH \
--url https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_primary": true,
"priority": 1,
"title": "Back of package"
}
'import requests
url = "https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}"
payload = {
"is_primary": True,
"priority": 1,
"title": "Back of package"
}
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({is_primary: true, priority: 1, title: 'Back of package'})
};
fetch('https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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([
'is_primary' => true,
'priority' => 1,
'title' => 'Back of package'
]),
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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}"
payload := strings.NewReader("{\n \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\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/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/dashboard/api/v1/trade-items/{organization_id}/{gtin}/images/{image_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 \"is_primary\": true,\n \"priority\": 1,\n \"title\": \"Back of package\"\n}"
response = http.request(request)
puts response.read_body{
"created": "2025-07-01T14:00:00Z",
"id": "keATfB8VP2gSjcnTbsMNQL",
"image_url": "https://cdn.closient.com/products/00012345678905/hero.jpg",
"is_primary": true,
"priority": 0,
"title": "Front of package"
}{
"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
UUID of the organization that owns the product.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$GTIN-8/12/13/14 of the target product. Normalized to GTIN-14 by zero-padding before lookup.
^\d{8,14}$UUID (or 22-char shortuuid) of the image row. Must belong to the targeted product.
Body
Request body for a partial update to an image. Only supplied fields change (C-6194).
Caption / role label for the image (e.g. "Front of package").
255When true, this image becomes the hero and the previous primary is automatically unmarked.
Display order within a product's image gallery. Lower numbers appear first.
x >= 0Response
OK
Single image attached to a product.
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}$Caption / role label for the image (e.g. "Front of package", "Nutrition facts"). Empty string when not set.
255"Front of package"
True for the single image surfaced as the product's hero. At most one image per product has this set; uploading a new primary unsets the previous one.
Display order within a product's image gallery. Lower numbers appear first; ties break on -created. Primary image always sorts first regardless of priority.
x >= 0ISO-8601 UTC timestamp of when the image was uploaded.
Absolute URL of the original (non-resized) image asset on the configured storage backend. null only when the underlying ImageField is empty, which should not occur for persisted rows.
"https://cdn.closient.com/products/00012345678905/hero.jpg"