POST api/Distance/ToFromAirport

Use to calculate distance to/from an airport (drop or recover)

Request Information

URI Parameters

None.

Body Parameters

DistanceToFromAirportParm
NameDescriptionTypeAdditional information
auth

Authorization token

string

None.

PostalCode

Pickup or Delivery postal code

string

None.

CountryID

Pickup or Delivery country ID

string

None.

AirportID

Drop or recover airport

string

None.

DropOrRecover

D=Drop, R=recover

string

None.

Request Formats

application/json, text/json

Sample:
{
  "AirportID": "sample string 4",
  "CountryID": "sample string 3",
  "DropOrRecover": "sample string 5",
  "PostalCode": "sample string 2",
  "auth": "sample string 1"
}

application/xml, text/xml

Sample:
<DistanceToFromAirportParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mnx.WebApi.Shipper.Models">
  <AirportID>sample string 4</AirportID>
  <CountryID>sample string 3</CountryID>
  <DropOrRecover>sample string 5</DropOrRecover>
  <PostalCode>sample string 2</PostalCode>
  <auth>sample string 1</auth>
</DistanceToFromAirportParm>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

DistanceResp
NameDescriptionTypeAdditional 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>