| POST | /quote/validatewaypoints | Validate the waypoints for a client. |
|---|
export class ApiServiceRequest implements IServiceRequest, IHasApiKey
{
/** @description The API Key required for authentication */
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public ApiKey: string;
public constructor(init?: Partial<ApiServiceRequest>) { (Object as any).assign(this, init); }
}
export class ApiServiceResponse implements IServiceResponse
{
/** @description Information about the response. */
// @ApiMember(Description="Information about the response.", IsRequired=true)
public Description: string;
/** @description Heading or summary of the response. */
// @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
public Heading: string;
/** @description Did the intended operation for this response complete successfully? */
// @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
public WasSuccessful: boolean;
public constructor(init?: Partial<ApiServiceResponse>) { (Object as any).assign(this, init); }
}
export class WaypointValidationInformation
{
public WaypointNumber: number;
public IsValid: boolean;
public ErrorMessages: string[];
public constructor(init?: Partial<WaypointValidationInformation>) { (Object as any).assign(this, init); }
}
export class LinkedWaypoint
{
public FromWaypointNumber: number;
public ToWaypointNumber: number;
public FromLatitude: number;
public FromLongitude: number;
public ToLatitude: number;
public ToLongitude: number;
public constructor(init?: Partial<LinkedWaypoint>) { (Object as any).assign(this, init); }
}
export class WaypointQuoteInformation extends LinkedWaypoint
{
/** @description Distance between waypoints as a number */
// @ApiMember(Description="Distance between waypoints as a number")
public Distance: number;
/** @description String formatted distance */
// @ApiMember(Description="String formatted distance")
public DistanceValue: string;
public WaypointValid: boolean;
public Message: string;
public ErrorDetails: string[];
/** @description Caculated price between waypoints excluding vat */
// @ApiMember(Description="Caculated price between waypoints excluding vat")
public Price: number;
/** @description Price excluding vat formatted as a string rand value */
// @ApiMember(Description="Price excluding vat formatted as a string rand value")
public PriceValue: string;
/** @description The price between waypoints including vat */
// @ApiMember(Description="The price between waypoints including vat")
public PriceWithVAT: number;
/** @description The price including vat formatted as a rand value string */
// @ApiMember(Description="The price including vat formatted as a rand value string")
public PriceValueWithVAT: string;
public constructor(init?: Partial<WaypointQuoteInformation>) { super(init); (Object as any).assign(this, init); }
}
export class ValidateWaypointsResponse extends ApiServiceResponse
{
/** @description List with validation information for each waypoint */
// @ApiMember(Description="List with validation information for each waypoint")
public WaypointValidations: WaypointValidationInformation[];
/** @description The total distance for the order */
// @ApiMember(Description="The total distance for the order")
public TotalDistance: number;
/** @description The total distance for the order, formatted as a string */
// @ApiMember(Description="The total distance for the order, formatted as a string")
public TotalDistanceValue: string;
/** @description List of information for pricing etc between each waypoint */
// @ApiMember(Description="List of information for pricing etc between each waypoint")
public Waypoints: WaypointQuoteInformation[];
/** @description Is there an issue for the waypoints details specified? */
// @ApiMember(Description="Is there an issue for the waypoints details specified?")
public WaypointIssue: boolean;
public constructor(init?: Partial<ValidateWaypointsResponse>) { super(init); (Object as any).assign(this, init); }
}
export class RequestQuoteWaypoint implements IRequestWaypoint
{
/** @description Number of waypoint for ordering */
// @ApiMember(Description="Number of waypoint for ordering", IsRequired=true)
public WaypointNumber: number;
/** @description Waypoint Latitude */
// @ApiMember(Description="Waypoint Latitude", IsRequired=true)
public Latitude: number;
/** @description Waypoint Longitude */
// @ApiMember(Description="Waypoint Longitude", IsRequired=true)
public Longitude: number;
/** @description Name of contact person at waypoint */
// @ApiMember(Description="Name of contact person at waypoint", IsRequired=true)
public ContactName: string;
/** @description Telephone number of contact person at waypoint */
// @ApiMember(Description="Telephone number of contact person at waypoint", IsRequired=true)
public ContactNumber: string;
/** @description Instructions for driver to follow at waypoint */
// @ApiMember(Description="Instructions for driver to follow at waypoint", IsRequired=true)
public DeliveryInstructions: string;
/** @description Waypoint address */
// @ApiMember(Description="Waypoint address", IsRequired=true)
public Address: string;
public constructor(init?: Partial<RequestQuoteWaypoint>) { (Object as any).assign(this, init); }
}
export class ValidateWaypoints extends ApiServiceRequest implements ILogRequest
{
/** @description Array of waypoints */
// @ApiMember(Description="Array of waypoints", IsRequired=true)
public Waypoints: RequestQuoteWaypoint[];
/** @description Set this to true to prevent while testing the API. */
// @ApiMember(Description="Set this to true to prevent while testing the API.", IsRequired=true)
public Test: boolean;
public constructor(init?: Partial<ValidateWaypoints>) { super(init); (Object as any).assign(this, init); }
}
TypeScript ValidateWaypoints DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /quote/validatewaypoints HTTP/1.1
Host: 1fetch.api.client.prod.86degrees.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Waypoints":[{"WaypointNumber":0,"Latitude":0,"Longitude":0,"ContactName":"String","ContactNumber":"String","DeliveryInstructions":"String","Address":"String"}],"Test":false,"ApiKey":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{Unable to show example output for type 'ValidateWaypointsResponse' using the custom 'other' filter}One or more errors occurred. (Object reference not set to an instance of an object.)