ups-locator-client 1.0.0
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.
License: MIT
Requires Python: >=3.7

# 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](#setup--configuration)
  - [Supported Language Versions](#supported-language-versions)
  - [Installation](#installation)
- [Authentication](#authentication)
  - [Basic Authentication](#basic-authentication)
- [Services](#services)
- [Models](#models)
- [License](#license)

## 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`:

```bash
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:

```py
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:

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

## Services

The SDK provides various services to interact with the API.

<details> 
<summary>Below is a list of all available services with links to their detailed documentation:</summary>

| Name                                                                           |
| :----------------------------------------------------------------------------- |
| [VersionService](documentation/services/VersionService.md)                     |
| [DeprecatedVersionService](documentation/services/DeprecatedVersionService.md) |

</details>

## 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.

<details> 
<summary>Below is a list of all available models with links to their detailed documentation:</summary>

| Name                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [LocatorRequestWrapper](documentation/models/LocatorRequestWrapper.md)                                                                                         | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [LocatorResponseWrapper](documentation/models/LocatorResponseWrapper.md)                                                                                       | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [LocatorRequest](documentation/models/LocatorRequest.md)                                                                                                       | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [LocatorRequestRequest](documentation/models/LocatorRequestRequest.md)                                                                                         | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [LocatorRequestOriginAddress](documentation/models/LocatorRequestOriginAddress.md)                                                                             | Container for origin address information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [LocatorRequestTranslate](documentation/models/LocatorRequestTranslate.md)                                                                                     | Contains the locale information for the request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [LocatorRequestUnitOfMeasurement](documentation/models/LocatorRequestUnitOfMeasurement.md)                                                                     | Distance unit of measurement. This is required for location requests (request option 1).                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [LocatorRequestLocationSearchCriteria](documentation/models/LocatorRequestLocationSearchCriteria.md)                                                           | 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](documentation/models/LocatorRequestSortCriteria.md)                                                                               | Container for Sort Criteria                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [LocatorRequestServiceGeoUnit](documentation/models/LocatorRequestServiceGeoUnit.md)                                                                           | ServiceGeoUnit Container. Required to search for the freight facility information                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [RequestTransactionReference](documentation/models/RequestTransactionReference.md)                                                                             | TransactionReference identifies transactions between client and server.                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [OriginAddressGeocode](documentation/models/OriginAddressGeocode.md)                                                                                           | Geocode is the latitude and longitude of the origin address.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [OriginAddressAddressKeyFormat](documentation/models/OriginAddressAddressKeyFormat.md)                                                                         | 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](documentation/models/LocationSearchCriteriaSearchOption.md)                                                               | 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](documentation/models/LocationSearchCriteriaServiceSearch.md)                                                             | Allows for users to further define the search criteria. Refer to the rules specified in Service Search section.                                                                                                                                                                                                                                                                                                                                                                                                       |
| [LocationSearchCriteriaFreightWillCallSearch](documentation/models/LocationSearchCriteriaFreightWillCallSearch.md)                                             | Freight Will Call Search Container. Required if SearchOption is '05-Freight Will Call Search'                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [LocationSearchCriteriaAccessPointSearch](documentation/models/LocationSearchCriteriaAccessPointSearch.md)                                                     | 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](documentation/models/LocationSearchCriteriaOpenTimeCriteria.md)                                                       | Container to hold open times of the Location.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [SearchOptionOptionType](documentation/models/SearchOptionOptionType.md)                                                                                       | 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](documentation/models/SearchOptionOptionCode.md)                                                                                       | 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](documentation/models/SearchOptionRelation.md)                                                                                           | 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](documentation/models/ServiceSearchServiceCode.md)                                                                                   | Container that contains the service information such as Ground/Air. Required if the customer provides ServiceSearch Time.                                                                                                                                                                                                                                                                                                                                                                                             |
| [ServiceSearchServiceOptionCode](documentation/models/ServiceSearchServiceOptionCode.md)                                                                       | Container for the optional service information such as Saturday Pick up.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [FreightWillCallSearchFacilityAddress](documentation/models/FreightWillCallSearchFacilityAddress.md)                                                           | Facility Address Container                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [AccessPointSearchIncludeCriteria](documentation/models/AccessPointSearchIncludeCriteria.md)                                                                   | This contains elements to refine (include) UPS Access point address or geocode Search.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [AccessPointSearchExcludeFromResult](documentation/models/AccessPointSearchExcludeFromResult.md)                                                               | This contains elements to exclude from UPS Access Point address or geocode search.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [IncludeCriteriaMerchantAccountNumberList](documentation/models/IncludeCriteriaMerchantAccountNumberList.md)                                                   | This contains the list of Merchant Account numbers to be used for finding private network access points.                                                                                                                                                                                                                                                                                                                                                                                                              |
| [IncludeCriteriaSearchFilter](documentation/models/IncludeCriteriaSearchFilter.md)                                                                             | 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](documentation/models/IncludeCriteriaServiceOfferingList.md)                                                               | 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](documentation/models/ServiceOfferingListServiceOffering.md)                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [ExcludeFromResultPostalCodeList](documentation/models/ExcludeFromResultPostalCodeList.md)                                                                     | Container to hold a list of postal codes to exclude from the access point address or geocode search.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [PostalCodeListPostalCode](documentation/models/PostalCodeListPostalCode.md)                                                                                   | Container to hold the postal code .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [LocatorResponse](documentation/models/LocatorResponse.md)                                                                                                     | Container for LocatorResponse.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [LocatorResponseResponse](documentation/models/LocatorResponseResponse.md)                                                                                     | Container for Response.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [LocatorResponseGeocode](documentation/models/LocatorResponseGeocode.md)                                                                                       | 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](documentation/models/LocatorResponseSearchResults.md)                                                                           | Container for search results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [ResponseTransactionReference](documentation/models/ResponseTransactionReference.md)                                                                           | Container for customer provided data and the XPCI Version.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [ResponseError](documentation/models/ResponseError.md)                                                                                                         | 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](documentation/models/ErrorErrorLocation.md)                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [SearchResultsGeocodeCandidate](documentation/models/SearchResultsGeocodeCandidate.md)                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [SearchResultsDropLocation](documentation/models/SearchResultsDropLocation.md)                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [SearchResultsAvailableLocationAttributes](documentation/models/SearchResultsAvailableLocationAttributes.md)                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [GeocodeCandidateAddressKeyFormat](documentation/models/GeocodeCandidateAddressKeyFormat.md)                                                                   | Contains all of the basic information about candidate address.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [GeocodeCandidateGeocode](documentation/models/GeocodeCandidateGeocode.md)                                                                                     | Geocode is the latitude and longitude of the origin candidate.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [DropLocationIvr](documentation/models/DropLocationIvr.md)                                                                                                     | Integrated Voice Response information. ONLY FOR IVR.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [DropLocationGeocode](documentation/models/DropLocationGeocode.md)                                                                                             | 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](documentation/models/DropLocationAddressKeyFormat.md)                                                                           | 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](documentation/models/DropLocationLocationAttribute.md)                                                                         | LocationAttribute is a container that contains the information about the location's Location Type, Retail Location Type, Additional Services, or Program Type.                                                                                                                                                                                                                                                                                                                                                        |
| [DropLocationDistance](documentation/models/DropLocationDistance.md)                                                                                           | Container for the straight line distance from the origin to the UPS location.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [DropLocationSpecialInstructions](documentation/models/DropLocationSpecialInstructions.md)                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [DropLocationAdditionalComments](documentation/models/DropLocationAdditionalComments.md)                                                                       | Container for Additional Comments about Location.Text will be displayed in the Locale requested.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [DropLocationOperatingHours](documentation/models/DropLocationOperatingHours.md)                                                                               | Operating Hours.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [DropLocationLocalizedInstruction](documentation/models/DropLocationLocalizedInstruction.md)                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [DropLocationPromotionInformation](documentation/models/DropLocationPromotionInformation.md)                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [DropLocationSortCode](documentation/models/DropLocationSortCode.md)                                                                                           | This container is only for Freight Will call Search.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [DropLocationServiceOfferingList](documentation/models/DropLocationServiceOfferingList.md)                                                                     | Container to hold the list of service offerings at the end point.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [DropLocationAccessPointInformation](documentation/models/DropLocationAccessPointInformation.md)                                                               | Container for UPS Access Point specific parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [DropLocationLocationImage](documentation/models/DropLocationLocationImage.md)                                                                                 | Location Image container.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [LocationAttributeOptionType](documentation/models/LocationAttributeOptionType.md)                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [LocationAttributeOptionCode](documentation/models/LocationAttributeOptionCode.md)                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [OptionCodeTransportationPickUpSchedule](documentation/models/OptionCodeTransportationPickUpSchedule.md)                                                       | TransportationPickUpSchedule container contains details of Latest Drop Off time/Pickup Time for the transportation services (Ground/Air/Standard/Express/International) of the location.                                                                                                                                                                                                                                                                                                                              |
| [TransportationPickUpSchedulePickUp](documentation/models/TransportationPickUpSchedulePickUp.md)                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [PickUpPickUpDetails](documentation/models/PickUpPickUpDetails.md)                                                                                             | PickUpDetails container contains either pickup time or NoPickupIndicator. Either PickUpTime or NoPickupIndicator                                                                                                                                                                                                                                                                                                                                                                                                      |
| [DistanceUnitOfMeasurement](documentation/models/DistanceUnitOfMeasurement.md)                                                                                 | The unit of measurement the user will see for the distance is based on the user input provided in the search request.                                                                                                                                                                                                                                                                                                                                                                                                 |
| [AdditionalCommentsCommentType](documentation/models/AdditionalCommentsCommentType.md)                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [OperatingHoursStandardHours](documentation/models/OperatingHoursStandardHours.md)                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [StandardHoursDayOfWeek](documentation/models/StandardHoursDayOfWeek.md)                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [AccessPointInformationBusinessClassificationList](documentation/models/AccessPointInformationBusinessClassificationList.md)                                   | Container to hold list for business classification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [AccessPointInformationAccessPointStatus](documentation/models/AccessPointInformationAccessPointStatus.md)                                                     | Container for UPS AccessPoint status.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [AccessPointInformationPrivateNetworkList](documentation/models/AccessPointInformationPrivateNetworkList.md)                                                   | Container to hold the list of private networks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [AccessPointInformationAvailability](documentation/models/AccessPointInformationAvailability.md)                                                               | Container to hold the status of shipping or DRC/DCO availability of a UPS Access Point.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [BusinessClassificationListBusinessClassification](documentation/models/BusinessClassificationListBusinessClassification.md)                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [PrivateNetworkListPrivateNetwork](documentation/models/PrivateNetworkListPrivateNetwork.md)                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [AvailabilityShippingAvailability](documentation/models/AvailabilityShippingAvailability.md)                                                                   | Holds status of shipping availability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [AvailabilityDcrAvailability](documentation/models/AvailabilityDcrAvailability.md)                                                                             | Holds status of DCR/DCO availability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [ShippingAvailabilityUnavailableReason](documentation/models/ShippingAvailabilityUnavailableReason.md)                                                         | Container to hold shipping unavailable reason.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [DcrAvailabilityUnavailableReason](documentation/models/DcrAvailabilityUnavailableReason.md)                                                                   | Container to hold shipping unavailable reason.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [AvailableLocationAttributesOptionType](documentation/models/AvailableLocationAttributesOptionType.md)                                                         | 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](documentation/models/AvailableLocationAttributesOptionCode.md)                                                         | 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](documentation/models/AvailableLocationAttributesOptionCodeTransportationPickUpSchedule.md) | Container to hold information regarding pickup details for each day of the week.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [AvailableLocationAttributesTransportationPickUpSchedulePickUp](documentation/models/AvailableLocationAttributesTransportationPickUpSchedulePickUp.md)         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [AvailableLocationAttributesPickUpPickUpDetails](documentation/models/AvailableLocationAttributesPickUpPickUpDetails.md)                                       | Container to hold information regarding pickup time and pickup availability indicator.                                                                                                                                                                                                                                                                                                                                                                                                                                |

</details>

## License

This SDK is licensed under the MIT License.

See the [LICENSE](LICENSE) file for more details.

<!-- This file was generated by liblab | https://liblab.com/ -->