Zonos logo
DOCS

Create orders graphql

/

Create orders

Get up and running to create orders with Zonos.

This will tie the landedCost quote you received to an order enabling our Landed Cost guarantee. Once an order is created, you will be charged our Zonos fee. If you are performing the orderCreate mutation and the order has shipped, you must 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. Once you have created or calculated a landedCost, you will need to use the orderCreate mutation


Create an order with Zonos 

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
mutation OrderCreate($input: OrderCreateInput!) {
 orderCreate(input: $input) {
  id
  organization
  references {
   key
   value
  }
  landedCosts {
   id
  }
 }
}

Variables

1
2
3
4
5
6
7
8
9
{
  "input": {
    "accountOrderNumber": "12343244",
    "billTo": "party_393c12af-58a5-454d-9868-bfbc1212e82d",
    "grandTotal": 2346.12,
    "landedCostId": "landed_cost_37e60995-dd97-4fcc-97da-1c71baedcfed",
    "trackingNumber": "9205500000000000000000"
  }
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "orderCreate": {
      "id": "order_41ed89de-26e1-4701-8398-205ef7c00232",
      "organization": "organization_ea9f1c48-a140-43a6-89bb-71b4dea3507e",
      "references": [
        {
          "key": "zonosOrderNumber",
          "value": "1001019"
        }
      ],
      "landedCosts": [
        {
          "id": "landed_cost_37e60995-dd97-4fcc-97da-1c71baedcfed"
        }
      ]
    }
  }
}