Skip to main content

Identifier Job

The Identifier Job collection manages the bulk generation of unique identifiers for serialized products with GS1 SGTIN (Serialized Global Trade Item Number) codes, assets with GRAI (Global Returnable Asset Id), containers with SSCC (Serial Shipping Container Code), and other identifier types.

Note

Often, TrackVision will configure your solution so code generation jobs are managed automatically to maintain a steady pool of available codes. Jobs won't need to be created by users or scripts.

The identifier_job Object​

Identifier job collection handles the management of bulk identifier generation processes, supporting various identifier types, character sets, and quantities with job status tracking and error handling.

Field NameTypeDescription
iduuidPrimary key. Unique identifier for the identifier generation job (UUID format).
user_createdobjectUser who created the identifier job. Read-only. Links to directus_users.
date_createddatetimeTimestamp in ISO 8601 when the identifier job was created. Read-only.
user_updatedobjectUser who last updated the identifier job. Read-only. Links to directus_users.
date_updateddatetimeTimestamp in ISO 8601 when the identifier job was last updated. Read-only.
lengthintegerLength of the generated identifier codes. Default: 8. Minimum: 6.
quantityintegerNumber of identifier codes to generate in this job. Current max is 1 million, contact us if a larger number is required.
accountobjectAccount this identifier job belongs to. (Multi-tenant installations only)
reference_idstringOptional reference identifier for tracking purposes (e.g., batch name, order number).
typestringType of identifier to generate. Default: "sgtin". Values: "sgtin", "sscc", "grai", "short_code".
productstringProduct this job is generating codes for (primary key from product collection).
character_setstringCharacter set to use for code generation. Default: "alphanumeric".
statusstringCurrent status of the job. Default: "new". Values: "new", "in_progress", "complete", "error".
sscc_start_serialintegerStarting serial number for SSCC generation. Default: 0.
sscc_extension_digitintegerExtension (lead) digit for SSCC generation, 0-9.
sscc_company_prefixstringGS1 company prefix for SSCC generation.
domainobjectReference to the domain configuration for identifier generation.
error_messagestringError message if the job failed during processing.
quantity_createdintegerNumber of identifiers successfully created.

Sub-Objects​

User Object (user_created, user_updated)​

See Users for the full schema.

Account Object (account)​

See Account for the full schema.


List Identifier Jobs​

List existing identifier jobs.

GET /items/identifier_job

Query Parameters​

Supports all global query parameters.

Returns​

An array of up to limit identifier job objects. If no items are available, data will be an empty array.


Retrieve an Identifier Job​

Retrieve a specific identifier job by ID.

GET /items/identifier_job/:id

Returns​

Returns an identifier job object if a valid primary key was provided.


Create an Identifier Job​

Create a new identifier job.

POST /items/identifier_job

{
"length": 8,
"quantity": 100,
"account": "f1b2c3d4-e5f6-7890-1234-567890abcdef",
"reference_id": "BATCH-SGTIN-2024",
"type": "sgtin",
"product": "/01/09312345551927",
"character_set": "alphanumeric"
}

Query Parameters​

Supports all global query parameters.

Request Body​

A partial identifier job object.

Returns​

Returns the identifier job object for the created identifier job.


Update an Identifier Job​

Update an existing identifier job.

PATCH /items/identifier_job/:id

{
"status": "complete",
"quantity_created": 100,
"reference_id": "BATCH-SGTIN-2024-COMPLETED"
}

Query Parameters​

Supports all global query parameters.

Request Body​

A partial identifier job object.

Returns​

Returns the identifier job object for the updated identifier job.


Delete an Identifier Job​

Delete an existing identifier job.

DELETE /items/identifier_job/:id

Returns​

Empty body.


Sample Data​

IDReference IDTypeProductQuantityStatusQuantity Created
6d6cb08a-f9da-4331-adf9-039e350eef1eJon Demosgtin/01/777776661000484complete4
7144c07a-1325-4858-9c22-97b48ac1c09aRGDEMO-OCT-24-CASESsgtin/01/0931234555201696complete96
d9d8bde8-c274-45c3-afed-063d13e3e680RG-Cot-Itemssgtin/01/09361758000003100complete100