DOCS

Create labels and manifests - GraphQL

Create Australia Post labels and manifests

Create labels and generate a manifest for Australia Post using the GraphQL API.

GraphQL

Australia Post lodges shipments as a consolidation (a manifest). Unlike carriers where a label is a standalone action, an Australia Post shipment must belong to a consolidation group, and the group is what gets lodged with Australia Post.

The flow has three parts:

  1. Open a consolidation group — the manifest that shipments are added to.
  2. Create labels into the group — each shipment is registered with Australia Post and a label is returned. Shipments sit in Australia Post's basket, unlodged.
  3. Close the group — this lodges the order with Australia Post and produces the Order Summary (the paper manifest) you present at drop-off.

Billing: the merchant is charged when the group is closed (lodged), not when a label is created. Labels can be created and voided freely until the group is closed.

Before you start 

  • A connected Australia Post account with an account number.
  • A credential with the SHIPMENT_WRITE permission.
  • The id of the fulfillment center you ship from (used when closing the group).

Step 1: Open a consolidation group 

Create a group with shipmentConsolidationCreate, using carrierCode: AUSTRALIA_POST. The returned id is the group you add labels to. If you already have an open group for the day, reuse it instead of creating a new one (see Reuse an open group below).

1mutation ShipmentConsolidationCreate(
2$input: ShipmentConsolidationCreateInput!
3) {
4 shipmentConsolidationCreate(input: $input) {
5 id
6 name
7 carrierCode
8 status
9 }
10}

Reuse an open group

To add labels to an existing group instead of creating a new one, query for open groups and use the id of the one you want.

1query ShipmentConsolidations {
2 shipmentConsolidations(filter: { status: OPEN }, first: 50) {
3 edges {
4 node {
5 id
6 name
7 carrierCode
8 status
9 }
10 }
11 }
12}

Step 2: Create a label into the group 

Create the shipment and its label with shipmentCreateWorkflow, passing the group id as shipmentConsolidationId. The mutation registers the shipment with Australia Post and returns a label URL and tracking number. No charge occurs yet — the shipment is held in Australia Post's basket until the group is closed.

Australia Post-specific fields:

  • shipmentConsolidationId — the group id from Step 1. Required to add the shipment to the manifest.
  • serviceLevel — the Australia Post service level for the shipment (for example, an International Standard or International Express service level).
  • itnNumber — the export declaration number (EDN). Required when the total article value exceeds AUD 2,000.

Phone numbers must contain digits only — Australia Post rejects spaces and punctuation.

See ShipmentCreateWorkflowInput for the full list of fields, and Create a shipment for the general (non-Australia Post) shipment mutation.

1mutation ShipmentCreateWorkflow($input: ShipmentCreateWorkflowInput!) {
2 shipmentCreateWorkflow(input: $input) {
3 id
4 status
5 tracking {
6 number
7 }
8 shipmentCartons {
9 label {
10 url
11 trackingNumber
12 }
13 }
14 }
15}

Repeat this step for every parcel you want on the same manifest — pass the same shipmentConsolidationId each time.

Step 3: Close the group to generate the manifest 

When you are ready to ship, close the group with shipmentConsolidationUpdate and status: CLOSED. This lodges the order with Australia Post and returns the manifest in customsDocuments (the Order Summary PDF). This is the point at which the merchant is charged.

Pass the fulfillmentCenterId you ship from so the manifest reflects the correct sender.

1mutation ShipmentConsolidationUpdate(
2$input: ShipmentConsolidationUpdateInput!
3) {
4 shipmentConsolidationUpdate(input: $input) {
5 id
6 status
7 customsDocuments {
8 id
9 fileUrl
10 fileName
11 documentType
12 fileType
13 }
14 }
15}

Download the manifest from customsDocuments.fileUrl and present it at drop-off or pickup. Once the group is closed, its shipments are lodged and can no longer be changed.

Voiding before lodgement 

Because charging happens at close, you can back a shipment out of a group any time before it is closed by voiding its label. Voiding removes the shipment from Australia Post's basket, so it is never lodged and never charged.

Book a demo

Was this page helpful?