| POST | /quote | Provide waypoints for a route and return a quote. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 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 |
| QuoteId | body | Guid | No | Specify a quote Id to amend a quote. Required when amending an existing quote. |
| Test | body | bool | Yes | Set this to true to prevent creating the quote |
| 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 |
|---|---|---|---|---|
| WaypointIssue | form | bool | No | Is there an issue for the waypoints details specified? |
| QuoteReady | form | bool | No | Is the quote created successfully and ready to be placed as an order? |
| QuoteExpired | form | bool | No | Is the quote expired? |
| TotalDistance | form | double | No | The total distance for the quote |
| TotalDistanceValue | form | string | No | The total distance for the quote, 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 might be a problem with a scheduled quote |
| 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 |
| QuoteId | form | Guid | No | The ID of the generated quote, needed when you want to change this quote later |
| WayBill | form | string | No | User friendly waybill number |
| DateCreated | form | string | No | The date this order was created |
| LastUpdated | form | string | No | The date this quote was last changed |
| Waypoints | form | List<WaypointQuoteInformation> | No | List of quote 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 /quote HTTP/1.1
Host: api.1fetch.co.za
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Waypoints":[{"WaypointNumber":0,"Latitude":0,"Longitude":0,"ContactName":"String","ContactNumber":"String","DeliveryInstructions":"String","Address":"String"}],"IsScheduled":false,"ScheduleType":0,"ScheduledDate":"String","QuoteId":"00000000-0000-0000-0000-000000000000","Test":false,"ApiKey":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'RequestQuoteResponse' using the custom 'csv' filter}One or more errors occurred. (Object reference not set to an instance of an object.)