POST api/Distance/PointToPoint
Use to calculate distance to/from an airport (drop or recover)
Request Information
URI Parameters
None.
Body Parameters
DistancePointToPointParmName | Description | Type | Additional information |
---|---|---|---|
auth |
Authorization token |
string |
None. |
FromPostalCode |
Pickup postal code |
string |
None. |
FromCountryID |
Pickup country ID |
string |
None. |
ToPostalCode |
Delivery postal code |
string |
None. |
ToCountryID |
Delivery country ID |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "FromCountryID": "sample string 3", "FromPostalCode": "sample string 2", "ToCountryID": "sample string 5", "ToPostalCode": "sample string 4", "auth": "sample string 1" }
application/xml, text/xml
Sample:
<DistancePointToPointParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mnx.WebApi.Shipper.Models"> <FromCountryID>sample string 3</FromCountryID> <FromPostalCode>sample string 2</FromPostalCode> <ToCountryID>sample string 5</ToCountryID> <ToPostalCode>sample string 4</ToPostalCode> <auth>sample string 1</auth> </DistancePointToPointParm>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
DistanceRespName | Description | Type | Additional information |
---|---|---|---|
IsSuccessful |
Used to determine if method call was successful (true) or failure (false) |
boolean |
None. |
ErrorMessage |
The error message if method call was not successful |
string |
None. |
Kilometer |
Distance in kilometers |
integer |
None. |
Mile |
Distance in miles |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "ErrorMessage": "sample string 2", "IsSuccessful": true, "Kilometer": 3, "Mile": 4 }
application/xml, text/xml
Sample:
<DistanceResp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mnx.WebApi.Shipper.Models"> <ErrorMessage>sample string 2</ErrorMessage> <IsSuccessful>true</IsSuccessful> <Kilometer>3</Kilometer> <Mile>4</Mile> </DistanceResp>