Shipping Integrator V5 - Online Help
Shipping Integrator V5
Questions / Feedback?

GetShippingTime Method

Provides the average estimated time to ship a package from an origin to a destination address.

Syntax

public void getShippingTime();

Remarks

This method call issues a Time in Transit request to the UPS Server and parses the response.

The following can be set when this method is called:

  • SenderAddress (required: the City is required for requests outside the US if the ZipCode is not used in the origin country; the State is optional; the CountryCode is required; the ZipCode is required if the CountryCode supports postal code system. If not provided, a candidate list will be returned for the user to enter a valid Postal Code for the specified City.
  • RecipientAddress (required: the City is required for requests outside the US if the ZipCode is not used in the destination country; the State is optional; the CountryCode is required; the ZipCode is required if the CountryCode supports postal code system. If not provided, a candidate list will be returned for the user to enter a valid Postal Code for the specified City.
  • SenderTown is optional, applicable to non-US addresses, and used to make the origin address more precise;
  • RecipientTown is optional, applicable to non-US addresses, and used to make the destination address more precise;
  • ShipDate (required)
  • TotalWeight (conditional)
  • WeightUnit (conditional - applicable when the TotalWeight is provided in the request)
  • Documents (optional)
  • TotalValue (conditional - required for Document shipments when the origin or destination is Canada or non-document shipments outside the US)
  • CurrencyCode (conditional - applicable when the TotalValue is provided in the request)

The minimum information returned in the response include a summary of the user's input as well as:

If the SenderAddress and RecipientAddress addresses provided in the request are found in UPS system exactly as entered, then the Services is filled upon server's response.

Otherwise, if those do not match any data located in UPS system, then the server returns a list of candidates for the origin and/or destination addresses, which will be stored as strings (formatted as XML) in SenderCandidateAggregate (for origin) and RecipientCandidateAggregate (for destination).

To read an address, set the Aggregate property of an UPSAddress component to this value, and read the values of the desired fields for each candidate from 0 to UPSAddress's MatchCount - 1 .

The returned candidate list will be ordered according to a level of confidence. The first candidate returned has the highest level of confidence based on the information provided in the request. You can choose the correct address and resubmit the Time-in-Transit request (by calling the GetShippingTime method again) using any of these candidates as the origin and/or destination addresses to get service specific values. You can then resubmit the Time-in-Transit request using any of these candidates as the origin and/or destination addresses (when calling the GetShippingTime method).

So, after submitting the request, you will either receive a successful response containing time-in-transit information (as described above), or an error if error conditions were found.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 5.0.6240.0