AlmondTill/G3N API

On this page

expectedReceipts

query · in the family Reading your records

What it does

What is expected to arrive — open purchase-order lines by item and date.

The derived INBOUND view: every receivable PO (issued / acknowledged / partially_received) flattened to its outstanding lines (ordered − received > 0), shaped {po, line, variant, LF, outstandingQty, expectedArrivalAt}. DERIVED at read off the purchase_orders walk — never stored; fully-received lines and terminal history drop. Requires authentication; scoped server-side to the principal's rootId.

What happens

Reads only — the inbound pipeline.

Who may call it

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

Returns

ExpectedReceipt [ExpectedReceipt!]! — One derived inbound line. DERIVED at read — never stored (the TR outstanding stance).

Example request

query ExampleExpectedReceipts {
  expectedReceipts {
    purchaseOrderId
    purchaseOrderSysId
    orgVendorId
    organizationId
    lineNo
    variantId
    logicalFacilityId
    outstandingQty
    expectedArrivalAt
  }
}

Example response

{
  "data": {
    "expectedReceipts": [
      {
        "purchaseOrderId": "01900000-0000-7000-8000-54a5b8570000",
        "purchaseOrderSysId": "<purchase order sys id>",
        "orgVendorId": "01900000-0000-7000-8000-f885fa720000",
        "organizationId": "01900000-0000-7000-8000-44b781470000",
        "lineNo": 1,
        "variantId": "01900000-0000-7000-8000-8415e73b0000",
        "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
        "outstandingQty": "<outstanding qty>",
        "expectedArrivalAt": "2027-01-31T00:00:00.000Z"
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer