AlmondTill/G3N API

inventoryItems

query · in the family Inventory item

What it does

The inventory item list — each entry is an inventory item — one variant’s stock identity.

The InventoryItems your organization group holds today. Doomed records leave the listing but stay readable by id; inactive ones stay listed. Paged: limit clamps to 1–200, default 100; nextToken is the previous page's cursor, passed back exactly as received (a malformed or foreign token is refused as VALIDATION/INVALID). Walk until nextToken is null; a page may hold fewer than limit, and doomed records leave the listing. The optional filters — present, only the matching records; absent, all of them; a filtered page may hold fewer than limit. logicalFacilityId — ONE facility’s positions. Present, the read switches lane to the by-facility index: that facility’s junctions, a bounded page per call, never the whole family. The cursor binds to that facility; a tenant-page cursor refuses VALIDATION/INVALID, and the reverse. Absent (and no variantId), the tenant’s positions page by page. A missing facility is NOT_FOUND/CONSTRUCT, and so is a foreign one. Status-blind: an inactive facility’s positions still list. variantId — ONE variant’s positions at every facility. Present, the read switches lane to the tree-children index: that variant’s junctions at every facility, a bounded page per call. At most the facility count, never the whole family. The cursor binds to that variant; a tenant-page or facility cursor refuses VALIDATION/INVALID, and the reverse. Pass ONE lane argument a call: with logicalFacilityId beside it the read refuses VALIDATION/INVALID naming both. A missing variant is NOT_FOUND/CONSTRUCT, and so is a foreign one. Status-blind: an inactive variant’s positions still list.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing.

Arguments

NameTypeRequiredNotes
logicalFacilityIdIDno
variantIdIDno
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

InventoryItemPage InventoryItemPage! — One page of the inventoryItems listing — the records + the opaque resume cursor.

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. limit clamps to 1–200, default 100; nextToken continues the page. See paging.

Example request

graphql
query ExampleInventoryItems($logicalFacilityId: ID) {
  inventoryItems(logicalFacilityId: $logicalFacilityId) {
    items {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      logicalFacilityId
      styleType
      controlClass
      onHandQty
      reservedQty
      inTransitQty
      damagedQty
      heldQty
      onOrderQty
      availableQty
    }
    nextToken
  }
}

Variables:

json
{
  "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000"
}

Example response

json
{
  "data": {
    "inventoryItems": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-ab0d13b80000",
          "sysId": "IV-EXMP-0000-000F",
          "type": "InventoryItem",
          "caption": "Blue jeans",
          "status": "active",
          "parentId": "01900000-0000-7000-8000-8433b0260000",
          "rootId": "01900000-0000-7000-8000-a1295a650000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-53c6eea90000",
          "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
          "styleType": "<style type>",
          "controlClass": "<control class>",
          "onHandQty": "<on hand qty>",
          "reservedQty": "<reserved qty>",
          "inTransitQty": "<in transit qty>",
          "damagedQty": "<damaged qty>",
          "heldQty": "<held qty>",
          "onOrderQty": "<on order qty>",
          "availableQty": "<available qty>"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer