| POST | /order | Provide waypoints for a route and place an order. This will bill the order to your account. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ClientReference | body | string | No | Optionally provide your own reference identifier |
| CustomerReference | body | string | No | Optionally provide a reference for the customer/business |
| Waypoints | body | List<RequestQuoteWaypoint> | Yes | Array of waypoints |
| IsScheduled | body | bool | Yes | Is this a scheduled order? |
| ScheduleType | body | ScheduleType | No | Specify the scheduling type, required if IsScheduled is trueAllowable Values
|
| ScheduledDate | body | string | No | Specify the scheduled date for this delivery in ISO 8601 string format, required if IsScheduled is true and ScheduleType is SpecificTime |
| Test | body | bool | Yes | Set this to true to prevent creating an order and billing for it |
| IsUrgent | body | bool | No | Is your account allows Urgent Orders, you can use this flag to indicate when an Order is urgent. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ApiKey | form | string | Yes | The API Key required for authentication |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| WaypointNumber | form | int | Yes | Number of waypoint for ordering |
| Latitude | form | double | Yes | Waypoint Latitude |
| Longitude | form | double | Yes | Waypoint Longitude |
| ContactName | form | string | Yes | Name of contact person at waypoint |
| ContactNumber | form | string | Yes | Telephone number of contact person at waypoint |
| DeliveryInstructions | form | string | Yes | Instructions for driver to follow at waypoint |
| Address | form | string | Yes | Waypoint address |
| Name | Value | |
|---|---|---|
| NextAvailable | 0 | |
| SpecificTime | 1 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OrderId | form | Guid | No | The ID of the order. |
| WaypointIssue | form | bool | No | Were there any validation issues for any waypoints |
| TotalDistance | form | double | No | The total distance for the order |
| TotalDistanceValue | form | string | No | The total distance for the order, formatted as a string |
| ScheduledDate | form | string | No | The date and time the order is scheduled for in ISO 8601 string format, will be set if IsScheduled is true |
| SubTotal | form | string | No | The subtotal of the order before VAT |
| FinalPrice | form | string | No | The total of the order after VAT |
| VATValue | form | string | No | The amount of VAT |
| SchedulingNotice | form | string | No | Will contain a message if there a problem with a scheduled order |
| SchedulingError | form | string | No | Will contain a message if there is a problem with a scheduled quote, if the order is scheduled to soon to opening times |
| WayBill | form | string | No | User friendly waybill number |
| Waypoints | form | List<WaypointQuoteInformation> | No | List of order information for pricing etc between each waypoint |
| WaypointValidations | form | List<WaypointValidationInformation> | No | List with validation information for each waypoint |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Description | form | string | Yes | Information about the response. |
| Heading | form | string | Yes | Heading or summary of the response. |
| WasSuccessful | form | boolean | Yes | Did the intended operation for this response complete successfully? |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Distance | form | double | No | Distance between waypoints as a number |
| DistanceValue | form | string | No | String formatted distance |
| WaypointValid | form | bool | No | |
| Message | form | string | No | |
| ErrorDetails | form | List<string> | No | |
| Price | form | decimal | No | Caculated price between waypoints excluding vat |
| PriceValue | form | string | No | Price excluding vat formatted as a string rand value |
| PriceWithVAT | form | decimal | No | The price between waypoints including vat |
| PriceValueWithVAT | form | string | No | The price including vat formatted as a rand value string |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| FromWaypointNumber | form | int | No | |
| ToWaypointNumber | form | int | No | |
| FromLatitude | form | double | No | |
| FromLongitude | form | double | No | |
| ToLatitude | form | double | No | |
| ToLongitude | form | double | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| WaypointNumber | form | int | No | |
| IsValid | form | bool | No | |
| ErrorMessages | form | List<string> | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /order HTTP/1.1
Host: 1fetch.api.client.prod.86degrees.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ClientReference":"String","CustomerReference":"String","Waypoints":[{"WaypointNumber":0,"Latitude":0,"Longitude":0,"ContactName":"String","ContactNumber":"String","DeliveryInstructions":"String","Address":"String"}],"IsScheduled":false,"ScheduleType":0,"ScheduledDate":"String","Test":false,"IsUrgent":false,"ApiKey":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"OrderId":"00000000-0000-0000-0000-000000000000","WaypointIssue":false,"TotalDistance":0,"TotalDistanceValue":"0","ScheduledDate":"String","SubTotal":"String","FinalPrice":"String","VATValue":"String","SchedulingNotice":"String","SchedulingError":"String","WayBill":"String","Waypoints":[{}],"WaypointValidations":[{}],"Description":"String","Heading":"String","WasSuccessful":false}