使用 GraphQL API 为 Australia Post 创建标签并生成清单。
GraphQL
Australia Post 将货物作为合并组(即清单)进行投递。与标签是独立操作的其他承运商不同,Australia Post 的货物必须属于一个合并组,投递给 Australia Post 的正是该组。
该流程分为三个部分:
计费: 商家会在组被关闭(投递)时被收费,而不是在创建标签时。在组关闭之前,可以自由创建和作废标签。
使用 shipmentConsolidationCreate 并设置 carrierCode: AUSTRALIA_POST 来创建一个组。返回的 id 就是您要向其添加标签的组。如果您当天已经有一个打开的组,请重复使用它,而不是新建一个(请参阅下方的重复使用打开的组)。
shipmentConsolidationCreate
carrierCode: AUSTRALIA_POST
id
mutation ShipmentConsolidationCreate(
$input: ShipmentConsolidationCreateInput!
) {
shipmentConsolidationCreate(input: $input) {
name
carrierCode
status
}
要将标签添加到现有组而不是创建新组,请查询打开的组,并使用您想要的组的 id。
query ShipmentConsolidations {
shipmentConsolidations(filter: { status: OPEN }, first: 50) {
edges {
node {
使用 shipmentCreateWorkflow 创建货物及其标签,将组的 id 作为 shipmentConsolidationId 传递。该变更会在 Australia Post 注册货物,并返回标签 URL 和跟踪号。此时尚未产生费用 — 货物会保留在 Australia Post 的暂存篮中,直到组被关闭。
shipmentCreateWorkflow
shipmentConsolidationId
Australia Post 特定字段:
serviceLevel
itnNumber
电话号码必须只包含数字 — Australia Post 会拒绝包含空格和标点符号的号码。
完整字段列表请参阅 ShipmentCreateWorkflowInput,通用(非 Australia Post)货物变更请参阅创建发货单。
ShipmentCreateWorkflowInput
mutation ShipmentCreateWorkflow($input: ShipmentCreateWorkflowInput!) {
shipmentCreateWorkflow(input: $input) {
tracking {
number
shipmentCartons {
label {
url
trackingNumber
对您想要放在同一份清单中的每个包裹重复此步骤 — 每次都传递相同的 shipmentConsolidationId。
准备好发货时,使用 shipmentConsolidationUpdate 并设置 status: CLOSED 来关闭组。这会将订单投递给 Australia Post,并在 customsDocuments 中返回清单(订单摘要 PDF)。这正是商家被收费的时间点。 清单的寄件人来自每个货物的发货地址,因此不需要履行中心。
shipmentConsolidationUpdate
status: CLOSED
customsDocuments
mutation ShipmentConsolidationUpdate(
$input: ShipmentConsolidationUpdateInput!
shipmentConsolidationUpdate(input: $input) {
customsDocuments {
fileUrl
fileName
documentType
fileType
从 customsDocuments.fileUrl 下载清单,并在投递或取件时提交。组关闭后,其中的货物即被投递,无法再更改。
customsDocuments.fileUrl
由于费用是在关闭时产生的,您可以在组关闭之前的任何时候通过作废其标签,将货物从组中移除。作废会将货物从 Australia Post 的暂存篮中移除,因此该货物永远不会被投递,也不会被收费。
ShipmentConsolidationCreateInput ShipmentConsolidationUpdateInput ShipmentCreateWorkflowInput
shipmentConsolidationCreate shipmentConsolidationUpdate shipmentCreateWorkflow
创建标签和清单 - GraphQL
创建 Australia Post 标签和清单
使用 GraphQL API 为 Australia Post 创建标签并生成清单。
GraphQL
Australia Post 将货物作为合并组(即清单)进行投递。与标签是独立操作的其他承运商不同,Australia Post 的货物必须属于一个合并组,投递给 Australia Post 的正是该组。
该流程分为三个部分:
开始之前
步骤 1:打开一个合并组
使用
shipmentConsolidationCreate并设置carrierCode: AUSTRALIA_POST来创建一个组。返回的id就是您要向其添加标签的组。如果您当天已经有一个打开的组,请重复使用它,而不是新建一个(请参阅下方的重复使用打开的组)。mutation ShipmentConsolidationCreate($input: ShipmentConsolidationCreateInput!) {shipmentConsolidationCreate(input: $input) {idnamecarrierCodestatus}}重复使用打开的组
要将标签添加到现有组而不是创建新组,请查询打开的组,并使用您想要的组的
id。query ShipmentConsolidations {shipmentConsolidations(filter: { status: OPEN }, first: 50) {edges {node {idnamecarrierCodestatus}}}}步骤 2:向组中创建标签
使用
shipmentCreateWorkflow创建货物及其标签,将组的id作为shipmentConsolidationId传递。该变更会在 Australia Post 注册货物,并返回标签 URL 和跟踪号。此时尚未产生费用 — 货物会保留在 Australia Post 的暂存篮中,直到组被关闭。Australia Post 特定字段:
shipmentConsolidationId— 来自步骤 1 的组id。将货物添加到清单所必需。serviceLevel— 该货物的 Australia Post 服务等级(例如国际标准或国际快递服务等级)。itnNumber— 出口申报号(EDN)。当商品总价值超过 2,000 澳元 时为必填项。完整字段列表请参阅
ShipmentCreateWorkflowInput,通用(非 Australia Post)货物变更请参阅创建发货单。mutation ShipmentCreateWorkflow($input: ShipmentCreateWorkflowInput!) {shipmentCreateWorkflow(input: $input) {idstatustracking {number}shipmentCartons {label {urltrackingNumber}}}}对您想要放在同一份清单中的每个包裹重复此步骤 — 每次都传递相同的
shipmentConsolidationId。步骤 3:关闭组以生成清单
准备好发货时,使用
shipmentConsolidationUpdate并设置status: CLOSED来关闭组。这会将订单投递给 Australia Post,并在customsDocuments中返回清单(订单摘要 PDF)。这正是商家被收费的时间点。 清单的寄件人来自每个货物的发货地址,因此不需要履行中心。mutation ShipmentConsolidationUpdate($input: ShipmentConsolidationUpdateInput!) {shipmentConsolidationUpdate(input: $input) {idstatuscustomsDocuments {idfileUrlfileNamedocumentTypefileType}}}从
customsDocuments.fileUrl下载清单,并在投递或取件时提交。组关闭后,其中的货物即被投递,无法再更改。投递前作废
由于费用是在关闭时产生的,您可以在组关闭之前的任何时候通过作废其标签,将货物从组中移除。作废会将货物从 Australia Post 的暂存篮中移除,因此该货物永远不会被投递,也不会被收费。
ShipmentConsolidationCreateInput ShipmentConsolidationUpdateInput ShipmentCreateWorkflowInput
shipmentConsolidationCreate shipmentConsolidationUpdate shipmentCreateWorkflow
这个页面有帮助吗?