inventory_snapshots

Fetch inventory snapshots matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
warehouse_idStringNo

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

customer_account_idStringNo

Filter by 3PL child/customer account ID; omit to use the authenticated account.

statusStringNo

Any of the following statuses:

pending: Request received

enqueued: Queued for processing

processing: Being processed

success: Finished successfully

error: Terminated early due to an exception

aborted: Aborted by the user

Multiple statuses can be combined using: , e.g. status: "pending,processing"

One or more statuses can be excluded using: ! e.g. status: "!error_all,error_partial"

analyzeBooleanNo

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

Return Type

InventorySnapshotsQueryResult

Query

query inventory_snapshots(
  $warehouse_id: String,
  $customer_account_id: String,
  $status: String,
  $analyze: Boolean
) {
  inventory_snapshots(
    warehouse_id: $warehouse_id,
    customer_account_id: $customer_account_id,
    status: $status,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...InventorySnapshotConnectionFragment
    }
    snapshots {
      ...InventorySnapshotConnectionFragment
    }
  }
}

Variables

{
  "warehouse_id": "V2FyZWhvdXNlOjEyMzQ=",
  "customer_account_id": "QWNjb3VudDoxMjM0",
  "status": "pending",
  "analyze": true
}

Response

{
  "data": {
    "inventory_snapshots": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": [{id: "SW52ZW50b3J5U25hcHNob3Q6MTIzNA=="}],
      "snapshots": [{id: "SW52ZW50b3J5U25hcHNob3Q6MTIzNA=="}]
    }
  }
}