DOCS

Create orders graphql

/

Create orders

Learn how to create orders from a Landed Cost quote.

GraphQL

Once you have created or calculated a landedCost, you must use the orderCreate mutation to tie the landedCost quote you received to an order which will enable our Landed Cost guarantee. Once an order is created, the Zonos fee will be charged.

Create an order via the API 

When performing the orderCreate mutation, you are required to pass an accountOrderNumber. This value must be unique and cannot be used for 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 in most circumstances.

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?