{{ activeApiMethod.description }}

Resource information

Rate Limited?
No
Requests per rate limit window
-
Authentication
Basic Auth
Response Formats
json
HTTP Methods
POST
Resource family
Labels
Response object
Label
API Version
v1.0

Service capabilities

This service initiates the generation of labels for the requested shipments that have been previously created using the Create Domestic Shipments service.

Labels for a subset of items in a shipment can be generated by providing a list of item IDs.

Please Note: The maximum number of items for Parcel Post and Express Post domestic despatch movements is 20 items.

Two Modes of Label Printing

There is a one-step and a two-step process to generate a label:

The one-step process can be switched on by including the 'wait_for_label_url' parameter.

Please note: If using ZPL labels, there is a strict limit of 50 parcels per request for both modes of label printing

Example Request

POST
https://digitalapi.auspost.com.au/shipping/v1/labels

Example Response

HTTP Response Code: 200

Example Error Response

HTTP Response Code: 400

References

Request Field Reference

Element NameDescriptionOptional / MandatoryTypeLength
preferencesThe required preferences to be applied.MandatoryArray
typeFor printing preferences the type is "PRINT".MandatoryString
groupsThe required page format for the labels.Mandatory
groupThe label group to apply the print preference. Valid types are:
  • Parcel Post
  • Express Post
MandatoryString
layoutThe layout specifies the number of labels per page and the size of the page. The layout must be valid for the product types of the items in the shipment. Valid Layouts are:
  • A4-1pp
  • A4-3pp
  • A4-4pp
  • A6-1pp
Note that for international shipments, only A4-1pp layout is available. If you specify any other layout, it will be ignored and the label will be generated in A4-1pp layout.
MandatoryString
brandedWhether the Australia Post branding should be included on the labels. If you are using purchased stationery from Australia Post, then the generated labels should not include the branding. Note that for international shipments, this field is ignored.MandatoryBoolean - true or false
left_offsetUse this field to adjust the left margin of the page.MandatoryInteger
top_offsetUse this field to adjust the top margin of the page.MandatoryInteger
shipmentsList each shipment for which you want labels generated. The print preferences will be applied to all the items in the shipments.MandatoryArray
shipment_idThe Australia Post generated unique identifier for the shipment.MandatoryString50

Response Field Reference

Element nameDescriptionTypeLength
messageA message related to the generation progress.String
codeA code related to the generation progress. Currently, the only code returned is 'Request actioned'.String
errorsThe error codes and descriptions related to the action attempted.Array
codeThe code associated with the error.String
nameThe name category for the error.String
messageThe human readable error message.String

Error Code Reference

CodeNameExample MessageMore information
44013SHIPMENT_NOT_FOUND_ERRORThe shipment with shipment id SHIPMENT you requested can not be found. Please check the shipment id requested and submit the request again.
44033NO_SHIPMENT_IN_REQUEST_ERRORThe Request you have entered does not contain any shipments to process.