AlmondTill/G3N API

orderTenders

query · in the family Reading your records

What it does

The payments applied to one order — the tender-by-tender money story.

With the order GET (tenderedNetMinor/tipTotalMinor/paymentState) this IS the settlement story — sale tenders + refund tenders, Return-ref'd.

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.

Arguments

NameTypeRequiredNotes
orderIdID ID!yes
limitIntnoHow many records to answer at most; a page may hold fewer.
beforeIDno

Returns

Tender [Tender!]! — Posted only by applyTender, refundTender, and the refund writers (refundReturn/posReturn method=cash) — each in ONE transaction with the Order rollup stamp (+ the drawer entries for cash).

Example request

graphql
query ExampleOrderTenders($orderId: ID!, $limit: Int) {
  orderTenders(orderId: $orderId, limit: $limit) {
    id
    type
    caption
    status
    parentId
    rootId
    tenderType
    appliedMinor
    currency
    collectedMinor
    changeMinor
    tipMinor
    roundingDeltaMinor
    paymentId
    instrumentId
    orgCustomerId
    returnId
    tillSessionId
    reason
    refs
    createdAt
    updatedAt
    revision
    revisionNum
  }
}

Variables:

json
{
  "orderId": "01900000-0000-7000-8000-18e782370000",
  "limit": 1
}

Example response

json
{
  "data": {
    "orderTenders": [
      {
        "id": "01900000-0000-7000-8000-37386ae00000",
        "type": "<type>",
        "caption": "Blue jeans",
        "status": "<status>",
        "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
        "rootId": "01900000-0000-7000-8000-a1295a650000",
        "tenderType": "cash",
        "appliedMinor": 1250,
        "currency": "USD",
        "collectedMinor": 1250,
        "changeMinor": 0,
        "tipMinor": 0,
        "roundingDeltaMinor": 0,
        "paymentId": "01900000-0000-7000-8000-20f641110000",
        "instrumentId": "01900000-0000-7000-8000-87615d500000",
        "orgCustomerId": "01900000-0000-7000-8000-7c3b96a50000",
        "returnId": "01900000-0000-7000-8000-cc01b1df0000",
        "tillSessionId": "01900000-0000-7000-8000-4ed885220000",
        "reason": "Correcting a miscount.",
        "refs": [
          "<refs>"
        ],
        "createdAt": "2027-01-31T00:00:00.000Z",
        "updatedAt": "2027-01-31T00:00:00.000Z",
        "revision": "01900000-0000-7000-8000-53c6eea90000",
        "revisionNum": 1
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer