REST API

Labels API

Inventory label and barcode API for label templates, single-item labels, bulk label sheets, and printable PDFs.

Generated from the Celerp 2.8.0 OpenAPI schema, 2 November 2026.

POST /api/labels/bulk-print

Generate Bulk Inventory Labels

Generate a PDF label sheet for multiple items.

Request body

FieldTypeRequiredDescription
entity_idsarray of stringyesIdentifiers of the business records included in the operation.
template_idstring, optional--Identifier of the label template to use.

Responses

StatusDescriptionBody
200Returns the label sheet as a PDF file.--
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/api/labels/bulk-print \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /api/labels/print-source

Print Source

A PDF label sheet for records of a registered kind, on the chosen template, else the first of the company's that the rows can fill.

Request body

FieldTypeRequiredDescription
sourcestringyesSource
idsarray of stringyesIds
template_idstring, optional--Template Id

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/api/labels/print-source \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /api/labels/print/{entity_id}

Generate Inventory Item Label

Generate a PDF label for a single item.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns the label as a PDF file.--
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/api/labels/print/:entity_id \
  -H "Authorization: Bearer $TOKEN"

GET /api/labels/source-rows

Source Rows

The label rows of the records ``ids`` (comma separated), in the order asked.

Parameters

NameInRequiredTypeDescription
sourcequeryyesstringKind of record that another module registers for labels. An unregistered kind is refused.
idsqueryyesstringComma-separated identifiers of the records to print labels for. Rows come back in the order given.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/api/labels/source-rows \
  -H "Authorization: Bearer $TOKEN"

GET /api/labels/sources/{source}

Get Source

A kind of record labels print for: the fields its rows carry and the company's templates its rows can fill.

Parameters

NameInRequiredTypeDescription
sourcepathyesstringKind of record that another module registers for labels. An unregistered kind is refused.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/api/labels/sources/:source \
  -H "Authorization: Bearer $TOKEN"

GET /api/labels/templates

List Label Templates

Return the available label templates.

Responses

StatusDescriptionBody
200Returns the requested label templates.object

Example

curl -X GET http://localhost:8000/api/labels/templates \
  -H "Authorization: Bearer $TOKEN"

POST /api/labels/templates

Create Label Template

Create a label template from the supplied request data.

Request body

FieldTypeRequiredDescription
namestringyesHuman-readable name of the label template.
formatstring--Output or label format selected for the template.
orientationstring--Page or label orientation used when rendering the template.
width_mmnumber, optional--Template or label width in millimeters.
height_mmnumber, optional--Template or label height in millimeters.
fieldsarray of object--Field definitions or field updates included in the request.
copiesinteger--Number of label copies to generate.
notesstring, optional--Optional notes associated with the record or operation.

Responses

StatusDescriptionBody
201Returns the created label template or creation result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/api/labels/templates \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /api/labels/templates/{template_id}

Get Label Template

Return label template.

Parameters

NameInRequiredTypeDescription
template_idpathyesstringIdentifier of the requested template.

Responses

StatusDescriptionBody
200Returns the requested label template result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X GET http://localhost:8000/api/labels/templates/:template_id \
  -H "Authorization: Bearer $TOKEN"

PUT /api/labels/templates/{template_id}

Update Label Template

Update label template with the supplied fields.

Parameters

NameInRequiredTypeDescription
template_idpathyesstringIdentifier of the requested template.

Request body

FieldTypeRequiredDescription
namestring, optional--Updated human-readable name of the label template.
formatstring, optional--Output or label format selected for the template.
orientationstring, optional--Page or label orientation used when rendering the template.
width_mmnumber, optional--Template or label width in millimeters.
height_mmnumber, optional--Template or label height in millimeters.
fieldsarray of object, optional--Field definitions or field updates included in the request.
copiesinteger, optional--Number of label copies to generate.
notesstring, optional--Optional notes associated with the record or operation.

Responses

StatusDescriptionBody
200Returns the updated label template or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PUT http://localhost:8000/api/labels/templates/:template_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /api/labels/templates/{template_id}

Delete Label Template

Delete a saved label template.

Parameters

NameInRequiredTypeDescription
template_idpathyesstringIdentifier of the requested template.

Responses

StatusDescriptionBody
204Success. No response body is returned.--
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/api/labels/templates/:template_id \
  -H "Authorization: Bearer $TOKEN"