Labels
List all available labels
Request
GET http://printer/api/v3/labels
Response
Dictionary of objects.
Get a label
Request
GET http://printer/api/v3/labels/{name}
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Response
Label object.
Delete a label
Request
DELETE http://printer/api/v3/labels/{name}
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Response
None.
Create or modify a label
Request
PUT http://printer/api/v3/labels/{name}
See Label.
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Response
None.
Get a print simulation of a label
Request
GET http://printer/api/v3/labels/{name}/simulation
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Query Parameters
| Name | Type | Description |
|---|---|---|
| tableName | String | Optional table name. |
| keyColumn | String | Optional column to search for a key. |
| key | String | Optional key value to search for. |
Response
A PNG image of the label.
Examples
Without table:
GET http://printer/api/v3/labels/MyLabel/simulation
With table:
GET http://printer/api/v3/labels/MyLabel/simulation?tableName=MyTable&keyColumn=SKU&key=12345
Get a pixmap of a label v5.4
This endpoint was removed in v6.0. To render a label to an image, use Get a print simulation of a label or Get a bitmap of a label.
Render a label for a printer at a given resolution, with the printer's color channels. See getLabelPixmap for details.
Request
GET http://printer/api/v3/labels/{name}/pixmap?dpi={dpi}
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Query Parameters
| Name | Type | Description |
|---|---|---|
| dpi | Integer | Resolution in dots per inch. |
| printer | String | Printer ID. Required if more than one printer is available. |
| tableName | String | Optional table name. |
| keyColumn | String | Optional column to search for a key. |
| key | String | Optional key value to search for. |
Response
A PNG image of the label, or a TIFF image for a CMYK printer, as given by the
Content-Type header. Returns 404 Not Found if the label does not exist,
and 400 Bad Request if dpi is missing or invalid.
Examples
GET http://printer/api/v3/labels/MyLabel/pixmap?dpi=300
Get a bitmap of a label v5.2.4
Render a label to a printer-independent, bi-level (black and white) PNG image at a given resolution. See getLabelBitmap for details.
Request
GET http://printer/api/v3/labels/{name}/bitmap?dpi={dpi}
Path Parameters
| Name | Type | Description |
|---|---|---|
| name | String | Label name |
Query Parameters
| Name | Type | Description |
|---|---|---|
| dpi | Integer | Resolution in dots per inch. |
| tableName | String | Optional table name. |
| keyColumn | String | Optional column to search for a key. |
| key | String | Optional key value to search for. |
Response
A PNG image of the label. Returns 404 Not Found if the label does not exist,
and 400 Bad Request if dpi is missing or invalid.
Examples
GET http://printer/api/v3/labels/MyLabel/bitmap?dpi=300
With table:
GET http://printer/api/v3/labels/MyLabel/bitmap?dpi=300&tableName=MyTable&keyColumn=SKU&key=12345