SmartGare
API referenceEndpoints

Verify a ticket

Pulls up a ticket for an after-sales enquiry — by the code scanned off it (`qr`), its number (`ticket_id`), or its sale's number (`sale_id`) when the paper is torn or lost, exactly one of them — and answers its state, its departure, its price and its history, oldest first; a sale's number answers every ticket of the sale. Changes nothing and needs no open register. `gate_passages_known` is false while no gate journal reaches the module. **Required permission:** `ticketing.sale:read`

GET/ticketing/v1/tickets/verification

Pulls up a ticket for an after-sales enquiry — by the code scanned off it (qr), its number (ticket_id), or its sale's number (sale_id) when the paper is torn or lost, exactly one of them — and answers its state, its departure, its price and its history, oldest first; a sale's number answers every ticket of the sale. Changes nothing and needs no open register. gate_passages_known is false while no gate journal reaches the module.

Required permission: ticketing.sale:read

AuthorizationBearer <token>

In: header

Query Parameters

qr?string

The code scanned off the ticket.

Length0 <= length <= 2000
ticket_id?string

The ticket's number.

Length0 <= length <= 64
sale_id?string

The number of the ticket's sale.

Length0 <= length <= 64

Response Body

*/*

*/*

curl -X GET "https://example.com/ticketing/v1/tickets/verification"
{  "tickets": [    {      "category": "string",      "currency": "string",      "departure_id": "string",      "eligible_for_refund_or_rebooking": true,      "from_station_id": "string",      "gate_passages_known": true,      "history": [        {          "at": "2019-08-24T14:15:22Z",          "by": "string",          "kind": "string",          "note": "string",          "reference": "string"        }      ],      "id": "string",      "line_code": "string",      "ordinal": 0,      "price": 0,      "qr_active": true,      "rebooked_from_ticket_id": "string",      "sale_id": "string",      "status": "string",      "to_station_id": "string"    }  ]}