AlmondTill/G3N API

On this page

styleStockMatrix

query · in the family Reading your records

What it does

The cells of one style at one location — on hand, reserved, available and on order per variant, the axes in scheme and size order.

THE MATRIX READ: ONE Style's live cells at ONE LogicalFacility — on hand · reserved · available · on order per Variant, the axes in scheme order and every axis's values in ordinal order, the cells axis-major. Both refs tenant-scoped (a foreign/missing Style or LogicalFacility refuses NOT_FOUND). Bounded by the style: at most 1000 live cells — over refuses VALIDATION naming the count and the cap, never a truncated grid. Doomed products/variants are not cells; inactive ones are. A cell with no (variant × LF) InventoryItem reads zeros with inventoryItemId null. Requires authentication.

What happens

A read — nothing changes. Retired variants are not cells; paused ones are. On order comes from the open purchase orders.

Who may call it

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

Arguments

NameTypeRequiredNotes
styleIdID ID!yesNo further notes.
logicalFacilityIdID ID!yesNo further notes.

Returns

StyleStockMatrix StyleStockMatrix! — ONE Style's stock matrix at ONE LogicalFacility: the axes in scheme order, the live products, the cells sorted axis-major by ordinal, the totals, the cell count.

Example request

query ExampleStyleStockMatrix($styleId: ID!, $logicalFacilityId: ID!) {
  styleStockMatrix(styleId: $styleId, logicalFacilityId: $logicalFacilityId) {
    styleId
    logicalFacilityId
    cellCount
  }
}

Variables:

{
  "styleId": "01900000-0000-7000-8000-2f797c8b0000",
  "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000"
}

Example response

{
  "data": {
    "styleStockMatrix": {
      "styleId": "01900000-0000-7000-8000-2f797c8b0000",
      "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
      "cellCount": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer