For courier type
The Orders endpoints allow creating, updating, cancelling, and cloning orders. This module is designed to be used by courier-client users with the appropriate permissions. An Order is a linked pair of tasks consists of one pickup and one dropoff.
The base API URL is http://onfleet.com/api/v2/taskOrders .
To Create an order - POST - https://onfleet.com/api/v2/taskOrders
To Update an order - PUT - https://onfleet.com/api/v2/taskOrders/:orderId
To Cancel an order - POST - https://onfleet.com/api/v2/taskOrders/cancel
To Clone an order - POST - https://onfleet.com/api/v2/taskOrders/:orderId/clone
To Get an order - GET - https//onfleet.com/api/v2/taskOrders/:order_shortid
To Reject an order as the Courier - POST - https//onfleet.com/api/v2/taskOrders/:orderId/reject
The Orders endpoints can now be used by both the Client or the Courier using each of their respective API keys. Here a reference table on which endpoints can be accessed by each.
Endpoints | Clients | Couriers |
---|---|---|
Create Order | Yes | Yes |
Get Order | Yes | Yes |
Update Order | Yes | Yes |
Cancel Order | Yes | Yes |
Clone Order | Yes, only if the original order does not have rates/services | No |
Reject Order | No | Yes |