-
Notifications
You must be signed in to change notification settings - Fork 1
Redirection before move commences, journey created after redirection
Martyn Whitwell edited this page May 7, 2021
·
1 revision
Any changes made to the destination by the Authority before the move has been started will not be considered as a redirection for payment, and will be treated as a standard move.
- Move from
A
toB
, redirected toC
before the move starts - Journey from
A
toC
(billable
,proposed -> in_transit -> completed
), assuming the journey is created after the move was redirected
-
Create a billable journey from
A
toC
for the move (in a proposed state)curl --request POST \ --url /api/moves/{MOVE_ID}/journeys \ --header 'Authorization: Bearer {OAUTH_TOKEN}' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: {RANDOM_UUID}' \ --data '{ "data":{ "type":"journeys", "attributes":{ "timestamp":"2021-05-07T11:08:39.276Z", "billable":true, "vehicle":{ "id":"12345678ABC", "registration":"AB12 CDE" } }, "relationships":{ "from_location":{ "data":{ "type":"locations", "id":"AAAAAAAA-413b-48c8-b1cf-85c702c5f465" } }, "to_location":{ "data":{ "type":"locations", "id":"CCCCCCCC-8ded-435c-b0c1-ffcade5f1bef" } } } } }'
-
Start the journey, changing its state from
proposed
toin_progress
curl --request POST \ --url /api/events \ --header 'Authorization: Bearer {OAUTH_TOKEN}' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: {RANDOM_UUID}' \ --data '{ "data":{ "type":"events", "attributes":{ "occurred_at":"2021-05-07T11:13:44.088Z", "recorded_at":"2021-05-07T11:13:44.088Z", "notes":"example note: lorem ipsum dolor sit amet", "details":{ }, "event_type":"JourneyStart" }, "relationships":{ "eventable":{ "data":{ "type":"journeys", "id":"e73f6005-afec-41e2-bcaa-a9747b5af8e3" } } } } }'
-
Complete the journey, changing its state from
in_progress
tocompleted
curl --request POST \ --url /api/events \ --header 'Authorization: Bearer {OAUTH_TOKEN}' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: {RANDOM_UUID}' \ --data '{ "data":{ "type":"events", "attributes":{ "occurred_at":"2021-05-07T11:19:34.624Z", "recorded_at":"2021-05-07T11:19:34.624Z", "notes":"example note: lorem ipsum dolor sit amet", "details":{ }, "event_type":"JourneyComplete" }, "relationships":{ "eventable":{ "data":{ "type":"journeys", "id":"e73f6005-afec-41e2-bcaa-a9747b5af8e3" } } } } }'
- API Guide
- Version 2
- Asked Questions
- Webhook & Email notifications
- Walkthroughs
- Deployment
- Useful Queries
- Data quality improvements
-
Journeys and Payment Related Calls
- Single journey move
- Redirection before move commences
- Redirection after move commences
- Lockouts and Lodgings
- Assessments
- Event Documentation
- GPS Track a move