# Orders

Orders are delivery workflows for courier organizations, composed of a single pickup and a corresponding dropoff task, that couriers and or clients create and manage for fulfillment.

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 that consists of one pickup and one dropoff.

The base API URL is [https://onfleet.com/api/v2/taskOrders](http://onfleet.com/api/v2/taskOrders) .

To Create an order - POST - [https://onfleet.com/api/v2/taskOrders](https://docs.onfleet.com/reference/create-order)

To Update an order - PUT - [https://onfleet.com/api/v2/taskOrders/:orderShortId](https://docs.onfleet.com/reference/update-order)

To Cancel an order - POST - [https://onfleet.com/api/v2/taskOrders/cancel](https://docs.onfleet.com/reference/cancel-order)

To Clone an order - POST - [https://onfleet.com/api/v2/taskOrders/:orderId/clone](https://docs.onfleet.com/reference/clone-orders)

To Get an order - GET - [https//onfleet.com/api/v2/taskOrders/:orderShortId](https://docs.onfleet.com/reference/get-order)

To Reject an order as the Courier - POST - [https//onfleet.com/api/v2/taskOrders/:orderShortId/reject](https://docs.onfleet.com/reference/reject-order)

To quote an order before accepting - [https://onfleet.com/api/v2/deliveryServices/quote?clientId=clientId](https://onfleet.com/api/v2/deliveryServices/quote?clientId=clientId)

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      |