Skip to main content
PATCH
Update product document metadata

Authorizations

X-API-Key
string
header
required

Path Parameters

organization_id
string<shortuuid>
required

UUID of the organization that owns the product.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
gtin
string
required

GTIN-8/12/13/14 of the target product. Normalized to GTIN-14 by zero-padding before lookup.

Pattern: ^\d{8,14}$
document_id
string
required

UUID (or 22-char shortuuid) of the document row. Must belong to the targeted product.

Body

application/json

Request body for updating a document's metadata. Only supplied fields change.

File replacement is not done here — upload a new document instead. This keeps the update path a plain JSON body (Django doesn't populate request.FILES for PATCH multipart without extra middleware).

title
string | null

New caption for the document. Omit to leave unchanged.

Maximum string length: 255
description
string | null

New description. Omit to leave unchanged.

Response

200 - application/json

OK

A single PDF document attached to a product.

id
string<shortuuid>
required

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).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
title
string
required

Caption entered for the document. Empty string when not set.

Maximum string length: 255
Example:

"Safety Data Sheet"

description
string
required

Free-text description of the document. Empty string when not set.

display_title
string
required

Best available title: the entered title, else the PDF's embedded title, else the filename.

Example:

"Safety Data Sheet"

created
string<date-time>
required

ISO-8601 UTC timestamp of when the document was uploaded.

file_url
string<uri>

Absolute URL of the stored PDF. Null only when the underlying file is missing.

Example:

"https://cdn.closient.com/products/00012345678905/sds.pdf"

page_count
integer | null

Number of pages, extracted asynchronously after upload. Null until the PDF-processing task has run.

Required range: x >= 0
file_size_bytes
integer | null

Size of the stored file in bytes. Null when not yet computed.

Required range: x >= 0
thumbnail_url
string<uri>

URL of the first-page thumbnail, generated asynchronously. Empty string / null until processing has run.