Start a sale
Prices a sale for passengers travelling on a departure from one of our stations to a station it calls at afterwards, at the fare in force for its line, against the caller's open register. The sale awaits payment, holding its passengers' seats until hold_expires_at. **Required permission:** `ticketing.sale:write`
/ticketing/v1/salesPrices a sale for passengers travelling on a departure from one of our stations to a station it calls at afterwards, at the fare in force for its line, against the caller's open register. The sale awaits payment, holding its passengers' seats until hold_expires_at.
Required permission: ticketing.sale:write
Authorization
oauth2 In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
*/*
*/*
*/*
*/*
curl -X POST "https://example.com/ticketing/v1/sales" \ -H "Content-Type: application/json" \ -d '{ "departure_id": "string", "from_station_id": "string", "passengers": [], "reference": "string", "to_station_id": "string" }'{ "currency": "string", "departure_id": "string", "from_station_id": "string", "hold_expires_at": "2019-08-24T14:15:22Z", "id": "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 }, "passengers": 0, "recommendation": { "followed": true, "id": "string", "override_reason": "string", "override_reason_code": "string", "recommended_departure_id": "string" }, "reference": "string", "started_at": "2019-08-24T14:15:22Z", "status": "string", "to_station_id": "string", "total": 0, "widening": { "relaxation": "string", "rule_version_id": "string" }}Read a ruling back
Answers one ruling as it was issued: what was asked, what was chosen, what became of every candidate, and the policy and engine versions it can be replayed against. Only a ruling issued at a station this deployment runs, and to the caller unless they hold ticketing.recommendation:read-any; any other is answered as not found. **Required permission:** `ticketing.recommendation:read`
Read a sale
Returns a sale and every payment attempt recorded against it. **Required permission:** `ticketing.sale:read`