Queries

Available queries

ShippingOrder - Returns a single shipping order based on the id provided

query {
  ShippingOrder (id: 100012) {
    id
    label
  }
}

ShippingOrders - Returns a list of shipping orders based on the filter define

query {
  ShippingOrders {
    data {
    	id
    	label
    }
  }
}


Available fields

id – Int
Unique identifier of the shipping order
label – String
Title of the shipping order
notes – String
Notes attached to the shipping order
total_units – Float
Total units of the shipping order
status – Enum
Status of the shipping order (enum values : pending, unpublished, make_the_shipment, in_preparation, ready_to_ship, shipped, delivered, cancelled).
dated_at – Date
Date of the order.
shipping_address – Address – Subquery
Shipping address of the order.
shipping_at – Date
Date the shipping is planned.
order – Order – Subquery
Order the shipping order is created from
order_number – String
Order number
line_items – Array of LineItem – Subquery
List of the line items of the shipping order
shipped – Float
Quantities shipped
integrations – Integration – Subquery
List of the ID of the items of the integrated solutions linked to this shipping order.
has_batch_numbers – Boolean
Define if the shipping order has batch numbers
tracking_completed – Boolean
If the shipping order has batch numbers, are they all allocated

Sorting

You can sort data based on following fields : id, label, notes, total_units, status, dated_at, created_at, shipping_at, shipped, order_number, customer_id

Example of a query

query ShippingOrders($search: String, $orderBy: [QueryShippingOrdersOrderByOrderByClause!] = [{column: DATED_AT, order: DESC}, {column: CREATED_AT, order: DESC}], $where: QueryShippingOrdersWhereWhereConditions, $first: Int = 50, $page: Int) {
  ShippingOrders(
    search: $search
    orderBy: $orderBy
    where: $where
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
      count
      currentPage
      perPage
    }
    data {
      id
      label
      order {
        id
        label
        customer {
          id
          label
        }
      }
      dated_at
      shipping_at
      total_units
      status
    }
  }
}
{
  "orderBy": [
    {
      "order": "ASC",
      "column": "DATED_AT"
    }
  ],
  "first": 50,
  "page": 1,
  "search": "",
  "where": {
    "AND": [
      {
        "AND": [
          {
            "column": "STATUS",
            "operator": "EQ",
            "value": {
              "id": "delivered",
              "label": "Delivered",
              "color": "light-green"
            }
          }
        ]
      }
    ]
  }
}

Example of data returned

{
  "data": {
    "ShippingOrders": {
      "paginatorInfo": {
        "total": 2,
        "count": 2,
        "currentPage": 1,
        "perPage": 50
      },
      "data": [
        {
          "id": 100002,
          "label": "SHO00000003",
          "order": {
            "id": 100002,
            "label": "O00000003",
            "customer": {
              "id": 100010,
              "label": "Murray"
            }
          },
          "dated_at": "1990-08-16",
          "shipping_at": "2019-08-24",
          "total_units": 1009335.2583123,
          "status": "delivered"
        },
        {
          "id": 100010,
          "label": "SHO00000011",
          "order": {
            "id": 100000,
            "label": "O00000001",
            "customer": {
              "id": 100010,
              "label": "Murray"
            }
          },
          "dated_at": "1996-12-31",
          "shipping_at": "1997-10-09",
          "total_units": 38921680.639506,
          "status": "delivered"
        }
      ]
    }
  }
}