SmartGare
API referenceEndpoints

Search stations

Returns stations matching optional text, locality, kind and status filters, paginated. **Required permission:** `referential.station:read`

GET/referential/v1/stations

Returns stations matching optional text, locality, kind and status filters, paginated.

Required permission: referential.station:read

AuthorizationBearer <token>

In: header

Query Parameters

search?string

Matches part of a code or a name.

locality_id?string

Restrict to one locality's calling places.

status?string

Station lifecycle status.

Value in

  • "ACTIVE"
  • "RETIRED"
kind?string

STATION is a gare; STOP is an arrêt and is not counted as a gare.

Value in

  • "STATION"
  • "STOP"
sort?string

Result ordering.

Value in

  • "codeAsc"
  • "codeDesc"
  • "newest"
  • "oldest"
page?integer

Zero-based page index.

Formatint32
Range0 <= value
size?integer

Page size, at most 100.

Formatint32
Range0 <= value <= 100

Response Body

*/*

curl -X GET "https://example.com/referential/v1/stations"
{  "data": [    {      "code": "string",      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "kind": "STATION",      "latitude": 0.1,      "locality_id": "string",      "longitude": 0.1,      "managed": true,      "name": "string",      "opening_changed_at": "2019-08-24T14:15:22Z",      "opening_changed_by": "string",      "opening_state": "OPEN",      "status": "string",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "page": 0,  "size": 0,  "total": 0}