purchase_orders

Arguments

ArgumentTypeRequiredDefaultDescription
skuStringNo
warehouse_idStringNo
created_fromISODateTimeNo
created_toISODateTimeNo
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
po_date_toISODateTimeNo
customer_account_idStringNo

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

date_closed_fromISODateTimeNo
date_closed_toISODateTimeNo
fulfillment_statusStringNo
po_numberStringNo
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": "abc123",
  "warehouse_id": "abc123",
  "created_from": ISODateTime,
  "created_to": ISODateTime,
  "updated_from": DateTime,
  "updated_to": DateTime,
  "po_date_from": ISODateTime,
  "po_date_to": ISODateTime,
  "customer_account_id": "abc123",
  "date_closed_from": ISODateTime,
  "date_closed_to": ISODateTime,
  "fulfillment_status": "abc123",
  "po_number": "abc123",
  "analyze": true
}

Response

{
  "data": {
    "purchase_orders": {
      "request_id": "abc123",
      "complexity": 987,
      "data": PurchaseOrderConnection
    }
  }
}