DOCS

Create orders graphql

/

Create orders

Learn how to create orders based from a Landed Cost quote.

GraphQL

Once you have created or calculated a landedCost, you will need to use the orderCreate mutation. This will tie the landedCost quote you received to an order enabling our Landed Cost guarantee. Once an order is created, the Zonos fee will be charged the Zonos fee. If you are performing the orderCreate mutation and the order has shipped, you can include a trackingNumber which will trigger the duty and tax billing. If you still need to ship the order, a trackingNumber is not required and you can use a separate mutation to add trackingNumbers once the order has been shipped. When performing the orderCreate mutation, you are required to pass an accountOrderNumber. This value must be unique and cannot be used for any other orders. You can create multiple orders using the same landedCostId, but it is important to note that landed cost quotes cannot be used for more than 90 days.

Create an order with Zonos 

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
mutation {
  orderCreate(
    input: {
      accountOrderNumber: "12343244"
      billTo: "party_00e63a9e-9735-44d9-b129-3b3e76c5df25"
      currencyCode: USD
      grandTotal: 2346.12
      landedCostId: "landed_cost_32e7f442-8e82-47b3-957a-096088b14e7b"
      trackingNumbers: "9205500000000000000000"
    }
  ) {
    id
    organization
    references {
      key
      value
    }
    landedCosts {
      id
    }
  }
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "orderCreate": {
      "id": "order_ec7084f6-0778-47ce-b848-3ba57af9684d",
      "organization": "organization_dbb64939-12d7-4f12-98ea-7ae5b21acfd0",
      "references": [
        {
          "key": "zonosOrderNumber",
          "value": "1001623"
        }
      ],
      "landedCosts": [
        {
          "id": "landed_cost_32e7f442-8e82-47b3-957a-096088b14e7b"
        }
      ]
    }
  }
}

Was this page helpful?


© 2023 Zonoszonos.com