purchase_orders

Fetch purchase orders matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
skuStringNo

Filter by SKU. SKU matching is case-insensitive and ignores surrounding whitespace.

warehouse_idStringNo

Filter by public API warehouse ID. Use this ID field when selecting a warehouse; warehouse fields are display values or nested objects.

created_fromISODateTimeNo

Inclusive start of the created range, in ISO-8601 datetime format.

created_toISODateTimeNo

Inclusive end of the created range, in ISO-8601 datetime format.

updated_fromDateTimeNo

Based on updates to the Purchase Order Line Items.

updated_toDateTimeNo

Based on updates to the Purchase Order Line Items.

po_date_fromISODateTimeNo

Inclusive start of the PO date range, in ISO-8601 datetime format.

po_date_toISODateTimeNo

Inclusive end of the PO date range, in ISO-8601 datetime format.

customer_account_idStringNo

If you are a 3PL you can specify one of your customer's account.

date_closed_fromISODateTimeNo

Inclusive start of the date closed range, in ISO-8601 datetime format.

date_closed_toISODateTimeNo

Inclusive end of the date closed range, in ISO-8601 datetime format.

fulfillment_statusStringNo

Filter by fulfillment status; use values returned by the corresponding status field.

po_numberStringNo

Filter by PO number.

analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

PurchaseOrdersQueryResult

Query

query purchase_orders(
  $sku: String,
  $warehouse_id: String,
  $created_from: ISODateTime,
  $created_to: ISODateTime,
  $updated_from: DateTime,
  $updated_to: DateTime,
  $po_date_from: ISODateTime,
  $po_date_to: ISODateTime,
  $customer_account_id: String,
  $date_closed_from: ISODateTime,
  $date_closed_to: ISODateTime,
  $fulfillment_status: String,
  $po_number: String,
  $analyze: Boolean
) {
  purchase_orders(
    sku: $sku,
    warehouse_id: $warehouse_id,
    created_from: $created_from,
    created_to: $created_to,
    updated_from: $updated_from,
    updated_to: $updated_to,
    po_date_from: $po_date_from,
    po_date_to: $po_date_to,
    customer_account_id: $customer_account_id,
    date_closed_from: $date_closed_from,
    date_closed_to: $date_closed_to,
    fulfillment_status: $fulfillment_status,
    po_number: $po_number,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...PurchaseOrderConnectionFragment
    }
  }
}

Variables

{
  "sku": "BLUE-TEE-M",
  "warehouse_id": "V2FyZWhvdXNlOjEyMzQ=",
  "created_from": "2026-07-09T15:30:00Z",
  "created_to": "2026-07-09T15:30:00Z",
  "updated_from": "2026-07-09T15:30:00Z",
  "updated_to": "2026-07-09T15:30:00Z",
  "po_date_from": "2026-07-09T15:30:00Z",
  "po_date_to": "2026-07-09T15:30:00Z",
  "customer_account_id": "QWNjb3VudDoxMjM0",
  "date_closed_from": "2026-07-09T15:30:00Z",
  "date_closed_to": "2026-07-09T15:30:00Z",
  "fulfillment_status": "pending",
  "po_number": "PO-100045",
  "analyze": true
}

Response

{
  "data": {
    "purchase_orders": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": [{id: "T3JkZXI6MTIzNA==", order_number: "SO-100045"}]
    }
  }
}