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:
Open a consolidation group — the manifest that shipments are added to.
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.
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.
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).
1mutationShipmentConsolidationCreate(
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.
1queryShipmentConsolidations{
2 shipmentConsolidations(filter:{status: OPEN }, first:50){
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.
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. The manifest sender comes from the origin address on each shipment, so no
fulfillment center is needed.
1mutationShipmentConsolidationUpdate(
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.
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.
GraphQL API ReferenceTypes, inputs, and operations used in this guide
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:
Before you start
Step 1: Open a consolidation group
Create a group with
shipmentConsolidationCreate, usingcarrierCode: AUSTRALIA_POST. The returnedidis 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).mutation ShipmentConsolidationCreate($input: ShipmentConsolidationCreateInput!) {shipmentConsolidationCreate(input: $input) {idnamecarrierCodestatus}}Reuse an open group
To add labels to an existing group instead of creating a new one, query for open groups and use the
idof the one you want.query ShipmentConsolidations {shipmentConsolidations(filter: { status: OPEN }, first: 50) {edges {node {idnamecarrierCodestatus}}}}Step 2: Create a label into the group
Create the shipment and its label with
shipmentCreateWorkflow, passing the groupidasshipmentConsolidationId. 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 groupidfrom 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.See
ShipmentCreateWorkflowInputfor the full list of fields, and Create a shipment for the general (non-Australia Post) shipment mutation.mutation ShipmentCreateWorkflow($input: ShipmentCreateWorkflowInput!) {shipmentCreateWorkflow(input: $input) {idstatustracking {number}shipmentCartons {label {urltrackingNumber}}}}Repeat this step for every parcel you want on the same manifest — pass the same
shipmentConsolidationIdeach time.Step 3: Close the group to generate the manifest
When you are ready to ship, close the group with
shipmentConsolidationUpdateandstatus: CLOSED. This lodges the order with Australia Post and returns the manifest incustomsDocuments(the Order Summary PDF). This is the point at which the merchant is charged. The manifest sender comes from the origin address on each shipment, so no fulfillment center is needed.mutation ShipmentConsolidationUpdate($input: ShipmentConsolidationUpdateInput!) {shipmentConsolidationUpdate(input: $input) {idstatuscustomsDocuments {idfileUrlfileNamedocumentTypefileType}}}Download the manifest from
customsDocuments.fileUrland 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.
ShipmentConsolidationCreateInput ShipmentConsolidationUpdateInput ShipmentCreateWorkflowInput
shipmentConsolidationCreate shipmentConsolidationUpdate shipmentCreateWorkflow
Was this page helpful?