As mentioned before each API call must be authorized by a valid authorization token. To get the valid authorization token you must authenticate user first.
Get list of movement plans
# Get all movement plans
$ http GET https://secure.yardman.io/api/movement_plans \
> Authorization:"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjozOSwiZXhwIjoxNTE5Mjk3MDIyfQ.R5UoAglylK2i5ov4qDH9bJUqt3qJh7uLVA11dLGlozg"
If the authorization token is valid you should get something similar to the following result:
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Wed, 21 Mar 2018 18:36:52 GMT
ETag: W/"1edb1be12fa24356bee51cbd8e80b4ce"
Server: nginx/1.10.3 (Ubuntu)
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: 5349f7c5-3b65-482e-bb6f-3bde19b039c3
X-Runtime: 0.015545
X-XSS-Protection: 1; mode=block
[
{
"id": 36,
"name": "Others 2h",
"yard": {
"id": 25,
"name": "Hane Court"
},
"checkpoints": [{
"id": 25,
"estimated_arrival_in": 25,
"estimated_departure_in": 2,
"area": {
"id": 26,
"name": "Aurora Court"
}
}]
},
{
"id": 34,
"name": "Suppliers",
"yard": {
"id": 25,
"name": "Hane Court"
},
"checkpoints": [{
"id": 25,
"estimated_arrival_in": 25,
"estimated_departure_in": 2,
"area": {
"id": 26,
"name": "Aurora Court"
}
}]
},
{
"id": 35,
"name": "Traders",
"yard": {
"id": 25,
"name": "Hane Court"
},
"checkpoints": [{
"id": 25,
"estimated_arrival_in": 25,
"estimated_departure_in": 2,
"area": {
"id": 26,
"name": "Aurora Court"
}
}]
},
{
"id": 33,
"name": "Delivery to the shop",
"yard": {
"id": 28,
"name": "Eladio Streets"
},
"checkpoints": [{
"id": 25,
"estimated_arrival_in": 25,
"estimated_departure_in": 2,
"area": {
"id": 26,
"name": "Aurora Court"
}
}]
}
]