SmartGare
API referenceEndpoints

List a cash-register session's sales

Returns a page of the register's paid sales, newest paid first, and its running figures over all of them — sales, passengers, cash taken, card taken, refunds paid out — in any register state, never its theoretical balance, and the stations the page's sales were sold to (stations). **Required permission:** `ticketing.sale:read`

GET/ticketing/v1/cash-registers/{id}/sales

Returns a page of the register's paid sales, newest paid first, and its running figures over all of them — sales, passengers, cash taken, card taken, refunds paid out — in any register state, never its theoretical balance, and the stations the page's sales were sold to (stations).

Required permission: ticketing.sale:read

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Query Parameters

page?integer

Zero-based page index, at most 10000.

Formatint32
size?integer

Page size, from 1 to 200; 50 when absent.

Formatint32

Response Body

*/*

*/*

curl -X GET "https://example.com/ticketing/v1/cash-registers/string/sales"
{  "figures": {    "card_taken": 0,    "cash_taken": 0,    "currency": "string",    "passengers": 0,    "refunds": {      "count": 0,      "total": 0    },    "sales": 0  },  "sales": {    "data": [      {        "abandoned_at": "2019-08-24T14:15:22Z",        "abandoned_by": "string",        "agent_session_id": "string",        "counterparty": {          "carrier_id": "string",          "coordination": {            "id": "string",            "name": "string"          },          "ticketing_model": "string"        },        "currency": "string",        "departure_id": "string",        "from_station_id": "string",        "id": "string",        "line_code": "string",        "lines": [          {            "amount": 0,            "category": "string",            "currency": "string",            "fare": {              "content_hash": "string",              "inputs": {                "carrier_id": "string",                "category": "string",                "days_ahead": 0,                "departure_date": "2019-08-24",                "departure_time": "string",                "distance_metres": 0,                "from_locality_id": "string",                "from_station_id": "string",                "line_id": "string",                "service_type": "string",                "to_locality_id": "string",                "to_station_id": "string"              },              "row_id": "string",              "steps": [                {                  "amount": 0,                  "kind": "string",                  "row_id": "string"                }              ],              "tariff_release_id": "string"            },            "ordinal": 0,            "seat": "string"          }        ],        "luggage": {          "charge": 0,          "parcel_charge": 0,          "parcels": 0,          "suitcases": 0        },        "paid_at": "2019-08-24T14:15:22Z",        "passengers": 0,        "payments": [          {            "amount": 0,            "card_outcome": "string",            "card_terminal_transaction_id": "string",            "cash_tendered": 0,            "change": 0,            "id": "string",            "means": "string",            "recorded_at": "2019-08-24T14:15:22Z",            "recorded_by": "string",            "reference": "string",            "refund_due": true          }        ],        "recommendation": {          "followed": true,          "id": "string",          "override_reason": "string",          "override_reason_code": "string",          "recommended_departure_id": "string"        },        "reference": "string",        "register_id": "string",        "started_at": "2019-08-24T14:15:22Z",        "started_by": "string",        "status": "string",        "to_station_id": "string",        "total": 0,        "widening": {          "relaxation": "string",          "rule_version_id": "string"        }      }    ],    "page": 0,    "size": 0,    "total": 0  },  "stations": [    {      "code": "string",      "name": "string",      "station_id": "string"    }  ]}