nShift Delivery Help Center

Shipments

Create, print and follow-up shipments.

POST /shipments

Creates and prints a shipment.

Notice

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

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.

Important

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.

Notice

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.

Notice

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

URI parameters

shipmentId

string

The shipment

ID

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.

Notice

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.

Important

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

URI parameters

shipmentId

string

The shipment ID

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.

Notice

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

shipmentId

string

The shipment ID

Required

printId

string

The PDF or ZPL document ID

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.