Skip to main content

Search for UPS shipping locations based on type and available services. In order to obtain your bearer token please follow the instructions at https://developer.ups.com/get-started, or use the UPS Authorization API.

Project description

UpsLocator Python SDK 1.0.0

Welcome to the UpsLocator SDK documentation. This guide will help you get started with integrating and using the UpsLocator SDK in your project.

Versions

  • SDK version: 1.0.0

About the API

Search for UPS shipping locations based on type and available services. In order to obtain your bearer token please follow the instructions at https://developer.ups.com/get-started, or use the UPS Authorization API.

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install ups-locator-client

Authentication

Basic Authentication

The UpsLocator API uses Basic Authentication.

You need to provide your username and password when initializing the SDK.

Setting the Username and Password

When you initialize the SDK, you can set the username and password as follows:

UpsLocator(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD"
)

If you need to set or update the username and password after initializing the SDK, you can use:

sdk.set_basic_auth("YOUR_USERNAME", "YOUR_PASSWORD")

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
VersionService
DeprecatedVersionService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
LocatorRequestWrapper N/A
LocatorResponseWrapper N/A
LocatorRequest N/A
LocatorRequestRequest N/A
LocatorRequestOriginAddress Container for origin address information.
LocatorRequestTranslate Contains the locale information for the request.
LocatorRequestUnitOfMeasurement Distance unit of measurement. This is required for location requests (request option 1).
LocatorRequestLocationSearchCriteria The Location search criteria container allows the user to further define the basis to which they wish to receive the UPS locations. Only relevant when the user requests a Location search (request option 1).
LocatorRequestSortCriteria Container for Sort Criteria
LocatorRequestServiceGeoUnit ServiceGeoUnit Container. Required to search for the freight facility information
RequestTransactionReference TransactionReference identifies transactions between client and server.
OriginAddressGeocode Geocode is the latitude and longitude of the origin address.
OriginAddressAddressKeyFormat Contains all of the basic information about the origin such as: Address Lines, City, State/Province, Postal Code and Country or Territory Code. The element CountryCode is required.
LocationSearchCriteriaSearchOption SearchOption contains the information that forms the basis of the location search, It contains the criteria for search by Locations, Retail Locations, Additional Services, or Program Types. There should be one container for each type of search the user may wish to do. The user can specify either search by Locations or Retail Locations, but not both. If this container is missing, the default search would be for The UPS Store, UPS Center, UPS Drop Box, and Authorized Shipping Outlet location types.
LocationSearchCriteriaServiceSearch Allows for users to further define the search criteria. Refer to the rules specified in Service Search section.
LocationSearchCriteriaFreightWillCallSearch Freight Will Call Search Container. Required if SearchOption is '05-Freight Will Call Search'
LocationSearchCriteriaAccessPointSearch Applicable for request option 64 only. This contains inclusion and exclusion criteria for address search. It also contains Account Number and Access Point Public ID search elements.
LocationSearchCriteriaOpenTimeCriteria Container to hold open times of the Location.
SearchOptionOptionType OptionType is a container that indicates the type of search for locations. There are 5 types of search. They are search by: Location, Retail Location, Additional Services, Program Type, and a Service Level Option. If search criteria by Location or Retail Location is not provided the default search of The UPS Store, UPS Center, UPS Drop Box, and Authorized Shipping Outlet location types will be performed.
SearchOptionOptionCode Option code contains the information of a particular Location, Retail Location, Additional Service, Program Type or End Point Service Offering depending on the option type. The SearchOptions can contain one or more OptionCodes which forms the criteria for the location search.
SearchOptionRelation The relation container will contain the relation parameter (And/Or) that has to be used among multiple option codes in the location search. This is only applicable to option type Additional Services and Program Types. If this container is not present for Additional Services and Program Types, the default relation of And is used.
ServiceSearchServiceCode Container that contains the service information such as Ground/Air. Required if the customer provides ServiceSearch Time.
ServiceSearchServiceOptionCode Container for the optional service information such as Saturday Pick up.
FreightWillCallSearchFacilityAddress Facility Address Container
AccessPointSearchIncludeCriteria This contains elements to refine (include) UPS Access point address or geocode Search.
AccessPointSearchExcludeFromResult This contains elements to exclude from UPS Access Point address or geocode search.
IncludeCriteriaMerchantAccountNumberList This contains the list of Merchant Account numbers to be used for finding private network access points.
IncludeCriteriaSearchFilter Container to hold one or more search criteria for UPS Access Points that allow DCR, Shipping and ClickAndCollect access. Only applicable when the UPS access point candidate list is obtained in search by address or geocode search.
IncludeCriteriaServiceOfferingList Container to hold end point service offering List for UPS Access point. Applicable only when a UPS Access Point candidate list is obtained in search by address or geocode search.
ServiceOfferingListServiceOffering
ExcludeFromResultPostalCodeList Container to hold a list of postal codes to exclude from the access point address or geocode search.
PostalCodeListPostalCode Container to hold the postal code .
LocatorResponse Container for LocatorResponse.
LocatorResponseResponse Container for Response.
LocatorResponseGeocode Geocode is the latitude and longitude of the origin address. The Geocode is provided in the first successful response. Required to be returned when the origin address or phone number is submitted in the request.Will not be returned when the requestoption =64
LocatorResponseSearchResults Container for search results.
ResponseTransactionReference Container for customer provided data and the XPCI Version.
ResponseError If an error is encountered during the interchange, the Response contains an error. If the error is present, then the ErrorSeverity and ErrorCode are required.
ErrorErrorLocation
SearchResultsGeocodeCandidate
SearchResultsDropLocation
SearchResultsAvailableLocationAttributes
GeocodeCandidateAddressKeyFormat Contains all of the basic information about candidate address.
GeocodeCandidateGeocode Geocode is the latitude and longitude of the origin candidate.
DropLocationIvr Integrated Voice Response information. ONLY FOR IVR.
DropLocationGeocode Geocode is the latitude and longitude of the location address. The Geocode for the location address will be returned when Location is requested in the Request Option.
DropLocationAddressKeyFormat Contains all of the basic information about a location, Consignee Name, Building Name, Address Lines, City, State/Province, Postal Code and Country or Terriotry Code.
DropLocationLocationAttribute LocationAttribute is a container that contains the information about the location's Location Type, Retail Location Type, Additional Services, or Program Type.
DropLocationDistance Container for the straight line distance from the origin to the UPS location.
DropLocationSpecialInstructions
DropLocationAdditionalComments Container for Additional Comments about Location.Text will be displayed in the Locale requested.
DropLocationOperatingHours Operating Hours.
DropLocationLocalizedInstruction
DropLocationPromotionInformation
DropLocationSortCode This container is only for Freight Will call Search.
DropLocationServiceOfferingList Container to hold the list of service offerings at the end point.
DropLocationAccessPointInformation Container for UPS Access Point specific parameters.
DropLocationLocationImage Location Image container.
LocationAttributeOptionType
LocationAttributeOptionCode
OptionCodeTransportationPickUpSchedule TransportationPickUpSchedule container contains details of Latest Drop Off time/Pickup Time for the transportation services (Ground/Air/Standard/Express/International) of the location.
TransportationPickUpSchedulePickUp
PickUpPickUpDetails PickUpDetails container contains either pickup time or NoPickupIndicator. Either PickUpTime or NoPickupIndicator
DistanceUnitOfMeasurement The unit of measurement the user will see for the distance is based on the user input provided in the search request.
AdditionalCommentsCommentType
OperatingHoursStandardHours
StandardHoursDayOfWeek
AccessPointInformationBusinessClassificationList Container to hold list for business classification.
AccessPointInformationAccessPointStatus Container for UPS AccessPoint status.
AccessPointInformationPrivateNetworkList Container to hold the list of private networks.
AccessPointInformationAvailability Container to hold the status of shipping or DRC/DCO availability of a UPS Access Point.
BusinessClassificationListBusinessClassification
PrivateNetworkListPrivateNetwork
AvailabilityShippingAvailability Holds status of shipping availability.
AvailabilityDcrAvailability Holds status of DCR/DCO availability.
ShippingAvailabilityUnavailableReason Container to hold shipping unavailable reason.
DcrAvailabilityUnavailableReason Container to hold shipping unavailable reason.
AvailableLocationAttributesOptionType OptionType is a container that indicates the type of the location attribute that are available. For example if the Option Type is RetailLocation the list of all available retail locations will be returned in 1 or many corresponding OptionCodes.
AvailableLocationAttributesOptionCode Option code is a container that contains the information of a particular retail location type or additional service or program type that is available currently. One or more of this container will be returned to give all the available codes for Retail Type or Additional Services or Program Type.
AvailableLocationAttributesOptionCodeTransportationPickUpSchedule Container to hold information regarding pickup details for each day of the week.
AvailableLocationAttributesTransportationPickUpSchedulePickUp
AvailableLocationAttributesPickUpPickUpDetails Container to hold information regarding pickup time and pickup availability indicator.

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ups-locator-client-1.0.0.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

ups_locator_client-1.0.0-py3-none-any.whl (99.7 kB view details)

Uploaded Python 3

File details

Details for the file ups-locator-client-1.0.0.tar.gz.

File metadata

  • Download URL: ups-locator-client-1.0.0.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for ups-locator-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ec8d12a7fe029ca73cdabc427092e69460faf8c239813a546a4f82cce9299ed0
MD5 f8ccb83f08b201e7008d8ac6a5b35922
BLAKE2b-256 3575add29d5ffbe57d245846a8f918876fcea09592a81d5afa327ecdcdf5a90a

See more details on using hashes here.

File details

Details for the file ups_locator_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ups_locator_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97ca9eec9bf55a92e7e9dacf4e96f7d3498ac5e3deea674062c1426087329493
MD5 384a4e5885aee656a7d3ce4f8d240b82
BLAKE2b-256 5832065b2887cce54dc4d7f5602781423db7f1d4011e495fcf866cbceb4ee94d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page