AlmondTill/G3N API

Open, run and close a till day

Open the drawer with a counted float, record cash moving in or out outside a sale, open the drawer without a sale when you must, freeze it for the closing count, and close it — the over/short is the shift’s record.

POS estate · a play in 4 steps.

In the office

Open a drawer with a counted float, record the cash that moves outside a sale — a paid-out to the window cleaner, a drop to the safe — with a reason, open the drawer without a sale when you must, then freeze it for the closing count and close it. The over or short against the expected totals is the shift’s permanent record; the Z of the day is a ready-made report you run by the session’s record from the reports room.

Where it starts: the office’s Till sessions page.

Till sessions — /till-sessions
Till sessions — /till-sessions

Step 1. Open the till with a counted float.

Step 2. Record cash in or out outside a sale — paid-ins, paid-outs, drops, pickups — with a reason.

Step 3. Open the drawer without a sale — counted, stamped, reason required.

Step 4. Freeze the drawer for the closing count, then close it — the over/short against the expected totals is permanent.

What you see

On its last closed day the example shop closed 1 till session(s); each one’s Z is a report you run by the session’s record from the reports room.

Try it

Walked with screenshots in the manager’s manual: chapter 5 — Open, run and close a till day — as the manager

For developers — the calls

The steps

  1. Open the till with a counted float. — openTillSession
  2. Record cash in or out outside a sale — paid-ins, paid-outs, drops, pickups — with a reason. — recordCashEntry
  3. Open the drawer without a sale — counted, stamped, reason required. — noSale
  4. Freeze the drawer for the closing count, then close it — the over/short against the expected totals is permanent. — beginCloseTillSession, closeTillSession

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

openTillSession

openTillSession — mutation · Open a till — start a drawer shift with a counted opening float.

Example request

graphql
mutation ExampleOpenTillSession($input: OpenTillSessionInput!) {
  openTillSession(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "registerId": "01900000-0000-7000-8000-2739c9e00000",
    "float": [
      {
        "currency": "USD",
        "amountMinor": 1250
      }
    ]
  }
}

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

Example response

json
{
  "data": {
    "openTillSession": {
      "id": "01900000-0000-7000-8000-4ed885220000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "parentId": "01900000-0000-7000-8000-2739c9e00000",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

recordCashEntry

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

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
        }
      }
    }
  }
}

noSale

noSale — mutation · Open the drawer without a sale.

Example request

graphql
mutation ExampleNoSale($input: NoSaleInput!) {
  noSale(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}

Variables:

json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-4ed885220000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "reason": "Correcting a miscount."
  }
}

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

Example response

json
{
  "data": {
    "noSale": {
      "id": "01900000-0000-7000-8000-4ed885220000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "parentId": "01900000-0000-7000-8000-2739c9e00000",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

beginCloseTillSession

beginCloseTillSession — mutation · Start closing a till — freeze the drawer for the closing count.

Example request

graphql
mutation ExampleBeginCloseTillSession($id: ID!, $revision: ID!, $reason: String) {
  beginCloseTillSession(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-4ed885220000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "beginCloseTillSession": {
      "id": "01900000-0000-7000-8000-4ed885220000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "counting",
      "parentId": "01900000-0000-7000-8000-2739c9e00000",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

closeTillSession

closeTillSession — mutation · Close a till — record the closing count; over/short is computed against the expected totals.

Example request

graphql
mutation ExampleCloseTillSession($input: CloseTillSessionInput!) {
  closeTillSession(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}

Variables:

json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-4ed885220000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "counted": [
      {
        "currency": "USD",
        "amountMinor": 1250
      }
    ]
  }
}

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

Example response

json
{
  "data": {
    "closeTillSession": {
      "id": "01900000-0000-7000-8000-4ed885220000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "closed",
      "parentId": "01900000-0000-7000-8000-2739c9e00000",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}