Print is how you manage print client applications, printers and print jobs on your nShift Delivery account.
Go to:
- Fetch print clients
- Fetch a print client
- Fetch printers for a print client
- Fetch printers
- Fetch a printer
- Fetch print jobs
- Fetch a print job
- Send a print job to a printer
Print is how you manage print client applications, printers and print jobs on your nShift Delivery account.
The REST API endpoints are only accessible via HTTPS and are located at api.unifaun.com.
https://api.unifaun.com/rs-extapi/v1
Before getting started you need to know your developer ID and create an API key.
Fetch print clients
GET /print/clients
Fetches a list of all Print client applications. Returns only a partial list using pagination parameters page and size, which provides a way to narrow down the Print client selection.
Specifications
Query parameters
Parameter | Type | Description | Category |
page | number | Specifies which page to fetch. A page contains up to 50 items, if "size" is not provided. Pagination starts at zero (0). | Required |
size | number | Number of items per page. Default: 50 items per page | Optional |
Response example
[
{
"id": 12,
"name": "AnalyticalEngine",
"inet": null,
"inet6": null,
"hostname": null,
"version": null,
"jre": null,
"createTimestamp": "2015-11-16T23:14:12.354Z",
"state": "disconnected"
},
{
"id": 13,
"name": "TUNSTEN",
"inet": "192.168.56.1",
"inet6": null,
"hostname": "Pete@TUNGSTEN",
"version": "4.8.1",
"jre": null,
"createTimestamp": "2015-11-17T13:02:36.589Z",
"state": "disconnected"
}
]
Fetch a print client
GET /print/clients/{clientId}
Fetches a specific Print client application, identified by client ID.
Specifications
URI parameters
Parameter | Type | Description | Category |
clientId |
string |
Identifies a print client. |
Required |
Response example
{
"id": 12,
"name": "AnalyticalEngine",
"inet": null,
"inet6": null,
"hostname": null,
"version": null,
"jre": null,
"createTimestamp": "2015-11-16T23:14:12.354Z",
"state": "disconnected"
}
Fetch printers for a print client
GET /print/clients/{clientId}/printers
Fetches a list of all printers that are connected to a specific Print client application, identified by client ID. Returns only partial list using pagination parameters page and size.
Specifications
URI parameters
Parameter | Type | Description | Category |
clientId |
string |
Identifies a print client. |
Required |
Query parameters
Parameter | Type | Description | Category |
medias |
string |
Fetches printers that support a specific media type. |
Optional |
page |
number |
Specifies which page to fetch. A page contains up to 50 items, if "size" is not provided. Pagination starts at zero (0). |
Required |
size |
number |
Number of items per page. Default: 50 items per page |
Optional |
Response example
[
{
"printerId": 71153066,
"clientId": 419133,
"name": "Test",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
},
{
"printerId": 71153550,
"clientId": 419166,
"name": "CUPS-BRF-Printer",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
}
]
Fetch printers
GET/print/printers
Fetches a list of all printers that are connected to any Print client application. Returns only partial list using pagination parameters page and size.
Specifications
Query parameters
Parameter | Type | Description | Category |
page |
number |
Specifies which page to fetch. A page contains up to 50 items, if "size" is not provided. Pagination starts at zero (0). |
Required |
size |
number |
Number of items per page. Default: 50 items per page |
Optional |
Response example
[
{
"printerId": 71153066,
"clientId": 419133,
"name": "Test",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
},
{
"printerId": 71153550,
"clientId": 419166,
"name": "CUPS-BRF-Printer",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
}
]
Fetch a printer
GET/print/printers/{printerId}
Fetches printer details for a printer, identified by printer ID, that is connected to a Print client.
Specifications
URI parameters
Parameter | Type | Description | Category |
printerId |
string |
Identifies the physical printer. |
Required |
Response example
[
{
"printerId": 71153066,
"clientId": 419133,
"name": "Test",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
},
{
"printerId": 71153550,
"clientId": 419166,
"name": "CUPS-BRF-Printer",
"options": [
{
"key": "collate",
"value": "true"
},
{
"key": "color",
"value": "true"
},
{
"key": "copies",
"value": "9999"
},
{
"key": "duplex",
"value": "true"
},
{
"key": "supports_custom_paper_size",
"value": "false"
}
],
"medias": [
{
"id": "laser-3part",
"description": "Laser (3 parts, 210 x 297 mm)"
},
{
"id": "laser-a4",
"description": "Standard A4 (A4, 210 x 297 mm)"
}
]
}
]
Fetch print jobs
GET/print/printjobs
Fetches a list of all print jobs sent to any Print client, possibly filtered by date and/or status. Returns only partial list using pagination parameters page and size.
Specifications
Query parameters
Parameter | Type | Description | Category |
dateFrom |
string |
The lower limit of a date interval ISO-8601 date format, for example, 2020-01-01T01:00:00+00:00. Must be used together with dateTo. |
Optional |
dateTo |
string |
The upper limit of a date interval. ISO-8601 date format, for example, 2020-01-01T01:00:00+00:00. Must be used together with dateFrom. |
Optional |
page |
number |
Specifies which page to fetch. A page contains up to 50 items, if "size" is not provided. Pagination starts at zero (0). |
Required |
size |
number |
Number of items per page. Default: 50 items per page |
Optional |
status |
string |
Fetches print jobs with a specific status. |
Optional |
Response example
{
"page": 0,
"totalPages": 1,
"printJobs": [
{
"id": 10,
"status": "Info > Received",
"type": "raw_uri",
"created": "2022-12-02 11:51:38.963"
},
{
"id": 11,
"status": "Info > Received",
"type": "raw_uri",
"created": "2022-12-02 11:52:42.346"
}
]
}
Fetch a print job
GET/print/printjobs/{printJobId}
Fetches a specific print job that has been sent to a Print client, using print job ID.
Specifications
The response can contain the following print job statuses:
- RECEIVED - Print job received by nShift Delivery.
- SENT - Print job sent to server. FAILED - Failed to print.
- PRINTED - Successfull printing.
- REGISTERED - Registered for physical printing.
- READY_FOR PRINTING - Sent to physical printer.
URI parameters
Parameter | Type | Description | Category |
printJobId |
string |
Identifies the print job. |
Required |
Response example
{
"id": 40,
"status": "PRINTED",
"type": "application/octet-stream",
"created": "Mon Mar 21 14:15:36 CET 2022"
}
Send a print job to a printer
POST/print/shipments/{shipmentId}/prints/{printId}/printjobs
Sends a print job to any connected printer using shipment ID and print ID as identifiers. Returns the resulting print job.
Specifications
Define printer ID and other print job settings in the request body.
The endpoint works only with pdf/zpl format as for pdf_uri/zpl_uri.
contentType can only be one of the following: pdf_base64, pdf_uri, raw_base64, raw_uri.
URI parameters
Parameter | Type | Description | Category |
printId |
string |
Identifies the PDF or ZPL document. |
Required |
shipmentId |
string |
Identifies the shipment. |
Required |
Body example
{
"name": "Printer name",
"printerId": 1,
"reference": "Reference",
"contentType" : "pdf_base64",
"options": [{
"key": "tray",
"value": "bin1"
}]
}
Response example
{
"id": 12345,
"status": "PRINTED",
"type": "application/octet-stream",
"created": "Mon Mar 21 14:15:36 CET 2022",
"href": "https://api.unifaun.com/ufoweb-prod-202306141018/rs-extapi/v1/printjob/12345"
}
For schema and testing, please refer to https://api.unifaun.com/rs-docs/.
For a description of properties, please see the Property reference guide.
For information about some crucial objects, please refer to REST API Objects.