This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
api-trucks-for-you [2018/08/02 10:51] hari [Response if fields are missing or invalid] |
api-trucks-for-you [2018/08/02 10:57] hari [Response if request is successful] |
||
---|---|---|---|
Line 1060: | Line 1060: | ||
Body | Body | ||
<code> | <code> | ||
+ | [ | ||
+ | { | ||
+ | "id": "uuid-of-trip", | ||
+ | "truck": { | ||
+ | "id": "uuid-of-truck", | ||
+ | "registration": "registration-number" | ||
+ | }, | ||
+ | "source":{ | ||
+ | "date": "YYYY-MM-DD, date when truck leaves source", | ||
+ | "city": { | ||
+ | "id": "uuid-of-city", | ||
+ | "name": "name-of-city" | ||
+ | }, | ||
+ | }, | ||
+ | "destination": { | ||
+ | "date": "YYYY-MM-DD, date when truck reaches destination", | ||
+ | "city": { | ||
+ | "id": "uuid-of-city", | ||
+ | "name": "name-of-city" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { ... more trips ... } | ||
+ | ] | ||
+ | </code> | ||
+ | |||
+ | ==== Response when request is successful, but there are no trips ==== | ||
+ | |||
+ | Headers | ||
+ | <code> | ||
+ | HTTP/1.1 204 DONE | ||
</code> | </code> | ||
Line 1077: | Line 1108: | ||
- | ==== Response if underlying objects don't exist ==== | ||
- | |||
- | Headers | ||
- | <code> | ||
- | HTTP/1.1 404 <object-type>-NOT-FOUND | ||
- | </code> | ||
==== Response for any other error ==== | ==== Response for any other error ==== |