AlmondTill/G3N API

recordCashEntry

mutation · in the family Till and cash management

What it does

Record cash moving in or out of the drawer outside a sale — paid-ins, paid-outs, drops to the safe, pickups.

Requires the unrestricted capability.

Before you call

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

Capability area: Till and cash management — Manual drawer entries and force-closing a till.

Roles that may call it:

What happens

Posts one signed drawer entry with a required reason; the drawer’s expected totals update immediately.

Careful

An entry that would drive the drawer negative is flagged and evented — the drawer story is always auditable.

Arguments

NameTypeRequiredNotes
inputRecordCashEntryInput RecordCashEntryInput!yesRecord-input for recordCashEntry: a positive magnitude (the port stamps the type-law sign — paid_in/pickup into the drawer, paid_out/drop OUT); reason required; glCategory required on paid_in/paid_out

Returns

CashEntry CashEntry! — ONE posted cash-drawer ledger fact: the sign is the direction (positive = cash into the drawer).

Example request

graphql
mutation ExampleRecordCashEntry($input: RecordCashEntryInput!) {
  recordCashEntry(input: $input) {
    id
    type
    caption
    status
    parentId
    rootId
    entryType
    currency
    amountMinor
    reason
    glCategory
    refs
    overdrawn
    createdAt
    updatedAt
    revision
    revisionNum
  }
}

Variables:

json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-4ed885220000",
    "entryType": "paid_in",
    "currency": "USD",
    "amountMinor": 1250,
    "reason": "Correcting a miscount.",
    "glCategory": "<gl category>"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "recordCashEntry": {
      "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",
      "entryType": "float_in",
      "currency": "USD",
      "amountMinor": 1250,
      "reason": "Correcting a miscount.",
      "glCategory": "<gl category>",
      "refs": [
        "<refs>"
      ],
      "overdrawn": true,
      "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": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in