Skip to main content

Shipments

Create, print and follow-up shipments.

POST /shipments

Creates and prints a shipment.

Note

The shipment data in the request body must fulfill the specific requirements of the shipment's service.

PDF or ZPL documents will be created according to the provided print configuration.

Tip

Compression of printjob data based on ZPL supported features will reduce the size of the file that is transferred between Delivery and the physical printer. It results in faster printouts and helps avoiding memory overflow problems in printers. Use the key-value pair setting in the target1Options field.

By default the documents are returned as a URL. As an option the documents can be inline in the print.data object in the result. The print.data object is encoded in base64.

The generated documents will only be available for one (1) hour.

Query parameters

returnFile

boolean

'true' if the PDF/ZPL file should be returned inline.

Optional

For description of properties, please refer to the Property reference guide.

For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /shipments POST.

GET /shipments

Fetch printed shipments.

Note

Max. 100 shipments are returned per call. If more shipments are available the done value in the result will be "false" and you should make another call to fetch the remaining shipments.

If calls are made too fast the minDelay value in the result will return how many milliseconds you have to wait before calling again. To avoid an uneven call, max.one (1) call per five (5) minutes is recommended.

Query parameters

fetchId

string

The ID of the next batch of shipments to fetch. Save the fetchId returned by a previous call and use it as parameter value for the next call.

If a fetchId is not available, use the value -1 to make a call that will return a fetchId to use in a subsequent call.

Optional

For description of properties, please refer to the Property reference guide.

For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /shipments GET.

DELETE /shipments/{shipmentId}

Deletes a printed shipment.

Note

No response body is returned when a shipment is successfully deleted.

The shipment will get the status "cancelled". If supported by the carrier they will receive a message about the cancellation.

URI parameters

Shipment ID

string

Identifies the shipment

Required

For description of properties, please refer to the Property reference guide.

For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /shipments/{shipmentId} DELETE.

GET /shipments/{shipmentId}/prints

Fetch a list of all PDF or ZPL documents for a shipment.

Note

By default the documents are returned as a URL. As an option the documents can be inline in the prints.data object in the result. The prints.data object is encoded in base64.

Charset options are set in the target1Options array in the printConfig object.

Generated documents are only available for one (1) hour.

URI parameters

Shipment ID

string

Identifies the shipment

Required

Query parameters

returnFile

boolean

'true' if the PDF/ZPL file should be returned inline.

Optional

For description of properties, please refer to the Property reference guide.

For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /shipments/{shipmentId}/prints GET.

GET /shipments/{shipmentId}/prints/{printId}

Fetches a PDF or ZPL document for a shipment.

Note

The document is returned as a raw binary stream from this endpoint. Make sure the request has the Accept header set to application/pdf for PDF documents or application/octet-stream for ZPL documents.

Charset options are set in the target1Options array in the printConfig object.

URI parameters

Shipment ID

string

Identifies the shipment

Required

Print ID

string

Identifies the PDF or ZPL document

Required

For description of properties, please refer to the Property reference guide.

For schema and testing, please refer to https://api.unifaun.com/rs-docs/ and navigate to /shipments/{shipmentId}/prints/{printId} GET.