DOCS

创建订单 - GraphQL

创建订单

了解如何从登陆成本报价创建订单。

GraphQL

一旦您创建或计算了landedCost,您必须使用orderCreate mutation将您收到的landedCost报价与订单绑定,这将启用我们的Landed Cost guarantee。一旦订单创建,Zonos费用将被扣除。

准备mutation输入 

orderCreate mutation需要特定的输入数据。虽然还有其他可选字段,但以下字段是必需的:

  • currencyCode:订单所用的货币。
  • landedCostId:订单中使用的登陆成本报价的ID。
  • accountOrderNumber:您分配的订单号(通常是平台的订单号)。每个订单号在组织内必须是唯一的。

每个landedCostId只能用于单个订单。如果您需要创建多个订单,您必须为每个订单生成新的登陆成本报价。重复使用landedCostId将导致错误。

发送mutation 

一旦您拥有必需的输入数据,使用您选择的客户端库或工具将GraphQL mutation发送到API端点。以下是如何组织mutation的示例:

当您基于登陆成本报价创建订单时使用此mutation。

1mutation CreateOrder($input: OrderCreateInput!) {
2 orderCreate(input: $input) {
3 id
4 organization
5 landedCosts {
6 id
7 }
8 }
9}
GraphQL API ReferenceTypes, inputs, and operations used in this guide
预约演示

这个页面有帮助吗?