Download OpenAPI specification:Download
This API documentation will help developers in understanding how to communicate with the delivery-api server in order to design user interfaces based on that api signature.
Get list of parcel details based on the user role, by default parcels with new status is returned.
| status | string Default: "new" |
| authorization | string Access token should be to authorize the use to access protected resource |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}A user with sender role can only create parcel details
| authorization | string Access token should be to authorize the use to access protected resource |
From & to addresss should be present
| from_address required | string non-empty |
| to_address required | string non-empty |
{- "from_address": "0518 Tennessee Drive",
- "to_address": "424 Daystar Avenue"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}Get a parcel detail by parcel id, if the user or biker tries to access resource which is not associated with them an is error sent
| id required | string Parcel id |
| authorization | string Access token should be to authorize the use to access protected resource |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}User with sender role can only update the parcel.
| id required | string Parcel id |
| authorization | string Access token should be to authorize the use to access protected resource |
| from_address required | string non-empty |
| to_address required | string non-empty |
{- "from_address": "0518 Tennessee Drive",
- "to_address": "424 Daystar Avenue"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}A user with biker role can only pick-up a parcel with status new.
| id required | string Parcel id |
| authorization | string Access token should be to authorize the use to access protected resource |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}A user with biker role can only deliver parcel which he as pick-up earlier
| id required | string Parcel id |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_time": "2019-08-24T14:15:22Z",
- "from_address": "string",
- "status": "new",
- "to_address": "string",
- "pick_up_time": "2019-08-24T14:15:22Z",
- "deliver_time": "2019-08-24T14:15:22Z"
}User can get access & refresh tokens to access protected API's by authenticating using email and password
Email and password is required to authentication an user
| email required | string <email> non-empty |
| password required | string <password> non-empty |
{- "email": "user@example.com",
- "password": "pa$$word"
}{- "access_token": "string",
- "refresh_token": "string"
}