POST /v1/deviations/

Creates a new deviation.

Endpoint

http://api.av.vikel.se/v1/deviations/

Method

POST

Parameters

JSONP is supported by providing the query parameter callback with the method name to wrap the response data with.

All parameters is optional, but at least one must be provided.

Name Description Note
line A line number 4
vehicle The vehicle it affects Example train number 568
transport The transport mode Must be one of BUS, METRO, TRAIN
stop_point Stop point
latitude The latitude WSG84 example 59.316331
longitude The longitude WSG84 example 18.034143
comment A comment An optional comment

Example

Request

curl -X POST http://api.av.vikel.se/v1/deviations/ \
     -d "comment=Stopp vid Hornstull" \
     -d "line=4" \
     -d "vehicle=12345" \
     -d "latitude=59.316331" \
     -d "longitude=18.034143" \
     -d "transport=BUS" \
     -d "stop_point=Hornstull"

Response

{
    "id": "4e908ebd0f759d3c6e000000"
}