Skip to main content
GET
/
products
/
api
/
v1
/
labels
/
export
/
{job_id}
Poll a bulk label-export job
curl --request GET \
  --url https://www.closient.com/products/api/v1/labels/export/{job_id}/ \
  --header 'X-API-Key: <api-key>'
{
  "job_id": "<string>",
  "status": "pending",
  "total_items": 0,
  "processed_items": 0,
  "progress_percent": 0,
  "download_url": "<string>",
  "expires_at": "<string>",
  "output_filename": "<string>",
  "file_size_bytes": 0,
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.closient.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Path Parameters

job_id
string
required

LabelExportJob.short_id returned by POST /labels/export/. 22-char shortuuid. Malformed ids are rejected with 422 before hitting the DB.

Response

OK

Response for GET /labels/export/{job_id}/.

Two terminal states (completed, failed) and two in-flight states (pending, processing). When status='completed', download_url, expires_at, output_filename, and file_size_bytes are populated; when status='failed', error carries the failure reason.

job_id
string
required

Job identifier (echoed from the request) used to look up this status.

status
enum<string>
required

Lifecycle state — pending (queued, not yet picked up), processing (worker is rendering), completed (artifact uploaded; download_url populated), or failed (error populated).

Available options:
pending,
processing,
completed,
failed
total_items
integer
default:0

Total entity count the job's filters resolved to. Populated as soon as the worker has resolved the filter set; 0 while the job is still queued.

Required range: x >= 0
processed_items
integer
default:0

Number of entities written so far. Equals total_items when status='completed'. Useful for surfacing progress in a polling client.

Required range: x >= 0
progress_percent
integer
default:0

Convenience field — processed_items / total_items * 100, capped at 100.

Required range: 0 <= x <= 100
download_url
string | null

Temporary signed download URL for the completed artifact. Only present when status='completed'; null in every other state. URL expires at expires_at; refetch the status endpoint if expired.

expires_at
string | null

ISO-8601 timestamp (with timezone) at which download_url stops working. Null when download_url is null.

output_filename
string | null

Human-readable filename of the completed artifact (e.g. sheet-AbCd-42.pdf or datamatrix-lots-AbCd-42.zip). Null until the job reaches completed.

file_size_bytes
integer
default:0

Size of the completed artifact in bytes; 0 while in-flight.

Required range: x >= 0
error
string | null

Human-readable error message. Populated only when status='failed'; null otherwise.