expiration_lots

Fetch expiration lots matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
skuStringNo

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

po_idStringNo

Filter by PO ID; pass the public API ID unless the field name says legacy ID.

analyzeBooleanNo

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

Return Type

LotsQueryResult

Query

query expiration_lots(
  $sku: String,
  $po_id: String,
  $analyze: Boolean
) {
  expiration_lots(
    sku: $sku,
    po_id: $po_id,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...LotConnectionFragment
    }
  }
}

Variables

{
  "sku": "BLUE-TEE-M",
  "po_id": "UHVyY2hhc2VPcmRlcjoxMjM0",
  "analyze": true
}

Response

{
  "data": {
    "expiration_lots": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": [{id: "TG90OjEyMzQ="}]
    }
  }
}