Skip to main content

UpsShipping Python SDK 1.0.0

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

Versions

  • SDK version: 1.0.0

About the API

Prepare your package for shipment, manage returns, and cancel scheduled shipments. 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-shipping-client

Authentication

Basic Authentication

The UpsShipping 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:

UpsShipping(
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")

Using Union Types

Union types allow you to specify that a variable can have more than one type. This is particularly useful when a function can accept multiple types of inputs. The Union type hint is used for this purpose.

Example Function with Union Types

You can call service method with an instance of TypeA, TypeB, or a dictionary that can be converted to an instance of either type.

# Model Definition
ParamType = Union[TypeA, TypeB]

# Service Method
def service_method(param: ParamType):
...

## Usage
type_a = TypeA(key="value")
type_b = TypeB(key="value")

sdk.service.service_method(type_a)
sdk.service.service_method(type_b)
sdk.service.service_method({"key": "value"})

You cannot create an instance of a Union type itself. Instead, pass an instance of one of the types in the Union, or a dictionary that can be converted to one of those types.

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:

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:
NameDescription
ShipRequestWrapper
ShipResponseWrapperN/A
VoidshipmentResponseWrapperN/A
LabelrecoveryRequestWrapperN/A
LabelrecoveryResponseWrapperN/A
ShipmentRequestShipment Request.
ShipmentRequestRequestRequest Container
ShipmentRequestShipmentShipment Container
ShipmentRequestLabelSpecificationContainer used to define the properties required by the user to print and/or display the UPS shipping label. Required for shipment without return service or shipments with PRL return service. Required for Electronic Return Label or Electronic Import Control Label shipments with SubVersion greater than or equal to 1707.
ShipmentRequestReceiptSpecificationContainer used to allow the user to choose to print a thermal receipt.
RequestTransactionReferenceTransactionReference identifies transactions between client and server.
ShipmentReturnServiceType of Return service. When this container exists, the shipment is a return shipment.
ShipmentShipperContainer for the Shipper's information.
ShipmentShipToShip To Container.
ShipmentAlternateDeliveryAddressAlternateDeliveryAddress Container. Alternate Delivery Address (UPS Access Point Address) required if ShipmentIndicationType is 01 or 02.
ShipmentShipFromShip From Container. Required for return shipment. Required if pickup location is different from the shipper's address.
ShipmentPaymentInformationPayment information container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes. It is required for non-Ground Freight Pricing shipments only.
ShipmentFrsPaymentInformationContainer to hold the Payment information for the Ground Freight Pricing Shipments. Required for Ground Freight Pricing Shipments only.
ShipmentFreightShipmentInformationContainer to hold Freight Shipment information.
ShipmentPromotionalDiscountInformationPromotionalDiscountInformation container. This container contains discount information that the customer wants to request each time while placing a shipment.
ShipmentDgSignatoryInfoDGSignatoryInfo Container DGPaperImage will be returned if DGSignatoryInfo container present
ShipmentShipmentRatingOptionsShipmentRatingOptions container.
ShipmentReferenceNumberReference Number information container.
ShipmentServiceUPS service type.
ShipmentInvoiceLineTotalContainer to hold InvoiceLineTotal Information. Required for forward shipments whose origin is the US and destination is Puerto Rico or Canada. Not available for any other shipments. FOR OTHER DESTINATIONS the InvoiceLineTotal in the International Forms Container must be used.
ShipmentShipmentIndicationTypeContainer for Shipment Indication Type. Required to indicate whether shipment is "Hold For Pickup At UPS Access Point" for use by approved shippers to identify a UPS Access Point location as an alternate delivery option during shipment preparation or "UPS Access Pointâ„¢ Delivery", ship parcels directly to a UPS Access Point location for collection by the receiver.
ShipmentShipmentServiceOptionsContainer for Shipment Service Options.
ShipmentPackagePackage Information container. For Return Shipments up to and including 20 packages are allowed. US/PR origin return movements are limited to only one package. For Mail Innovations and Simple Rate shipments only one package is allowed.
ShipperPhoneContainer tag for Phone Number.
ShipperAddressAddress tag Container. The package should be returned to this address if the package is undeliverable. This address appears on the upper left hand corner of the label. Note: If the ShipFrom container is not present then this address will be used as the ShipFrom address. If this address is used as the ShipFrom the shipment will be rated from this origin address.
ShipToPhoneContainer for Phone Number
ShipToAddressAddress Container.
AlternateDeliveryAddressAddressAddress Container.
ShipFromTaxIdTypeTax Identification Container. Applies to EEI form only.
ShipFromPhoneContainer for Phone Number. If ShipFrom country or territory is US, PR, CA, and VI, the layout is: area code, 7 digit phone number or area code, 7 digit phone number, 4 digit extension number. For other countries or territories, the layout is: country or territory code, area code, 7 digit number. If ShipFrom tag is in the XML and International forms is requested.
ShipFromAddressShip from Address Container. The package will be originating from or being shipped from this address. The shipment will be rated from this origin address to the destination ship to address.
ShipFromVendorInfoVendor Information Container
PaymentInformationShipmentChargeShipment charge container. If Duty and Tax charges are applicable to a shipment and a payer is not specified, the default payer of Duty and Tax charges is Bill to Receiver. There will be no default payer of Duty and Tax charges for DDU and DDP service.
ShipmentChargeBillShipperContainer for the BillShipper billing option. The three payment methods that are available for the Bill Shipper billing option are alternate payment method, account number or credit card. This element or its sibling element, BillReceiver, BillThirdParty or ConsigneeBilledIndicator, must be present but no more than one can be present.
ShipmentChargeBillReceiverContainer for the BillReceiver billing option. This element or its sibling element, BillShipper, BillThirdParty or Consignee Billed, must be present but no more than one can be present. For a return shipment, Bill Receiver is invalid for Transportation charges.
ShipmentChargeBillThirdPartyContainer for the third party billing option. This element or its sibling element, BillShipper, BillReceiver or Consignee Billed, must be present but no more than one can be present.
BillShipperCreditCardCredit card information container. Required if neither of the following is present: /ShipmentRequest/Shipment/PaymentInformation/ShipmentCharge/BillShipper/AccountNumber or /ShipmentRequest/Shipment/PaymentInformation/ShipmentCharge/BillShipper/AlternatePaymentMethod. Credit card payment is valid for shipments without return service only.
CreditCardAddressContainer to hold the Credit card Billing Address. It is required to provide billing address if credit card information is provided and when the ShipFrom country or territory is the US, PR, and CA.
BillReceiverAddressContainer for additional information for the bill receiver's UPS accounts address.
BillThirdPartyAddressContainer for additional information for the third party UPS accounts address.
FrsPaymentInformationTypeContainer to hold the Ground Freight Pricing payment type information. It is required if the request has Ground Freight Pricing shipment indicator.
FrsPaymentInformationAddressContainer to hold the information for the FreightCollect and PrepaidThirdParty Address. Note: The Address is required only when the billing option is Freight collect or ThirdParty.
FreightShipmentInformationFreightDensityInfoFreight Density Info container. Required if DensityEligibleIndicator is present.
FreightDensityInfoAdjustedHeightContainer for the adjusted height. Required if AdjustedHeightIndicator is present.
FreightDensityInfoHandlingUnitsHandling Unit for Density based rating container.
AdjustedHeightUnitOfMeasurementContainer for UnitOfMeasurement for the adjusted height.
HandlingUnitsTypeHandling Unit Type for Density based rating.
HandlingUnitsDimensionsDimension of the HandlingUnit container for density based pricing.
HandlingUnitsUnitOfMeasurementUnitOfMeasurement container.
ShipmentServiceOptionsCodCOD container Indicates COD is requested. Shipment COD is only available for EU origin countries or territories and for shippers account type Daily Pickup and Drop Shipping. Not available to shipment with return service.
ShipmentServiceOptionsAccessPointCodAccess Point COD indicates COD is requested for a shipment. Valid only for "01 - Hold For Pickup At UPS Access Point" Shipment Indication type. Shipment Access Point COD is valid only for countries or territories within E.U. Not valid with (Shipment) COD. Not available to shipment with return service.
ShipmentServiceOptionsNotificationContainer for the Quantum View Notification (QVN) is valid for all shipments including Return service, Import Control and Returns Flexible Access. Valid return service types are: ERL, PRL, PNM, RS1, or RS3. The shipment level notification is valid for forward and return international shipments as well as for domestic shipments (for US and PR).
ShipmentServiceOptionsLabelDeliveryContainer for the Label Delivery accessorial. Note - LabelDelivery is not applicable for GFP and Mail Innovations Forward shipment. Required for shipments with either Electronic Return Label Return Service or ImportControl Electronic LabelMethod type. Optional for shipments with Print Return Label Return Service or ImportControl Print LabelMethod type or Forward movement. If this container is present for shipments with either Electronic Return Label Return Service or ImportControl Electronic LabelMethod type, either of the LabelLinksIndicator or EMail container should be provided. For shipments with Print Return Label Return Service or ImportControl Print LabelMethod type or Forward movement, only LabelLinksIndicator is valid option for LabelDelivery container.
ShipmentServiceOptionsInternationalFormsInternational Forms information.
ShipmentServiceOptionsDeliveryConfirmationDelivery Confirmation container. Valid for forward shipments only. Refer to Delivery Confirmation Origin-Destination Pairs in the Appendix for a list of valid values.
ShipmentServiceOptionsLabelMethodType of ImportControl Label. This container is applicable only for ImportControl shipments. This container is applicable only for ImportControl shipments.
ShipmentServiceOptionsPreAlertNotificationThis container is used for providing Pre-Alert Notifications to the consignee for UPS Exchange movements and Pack & Collect shipments.
ShipmentServiceOptionsRestrictedArticlesRestricted Articles container.
CodCodAmountCOD Amount container.
NotificationEMailContainer for Email Information.
NotificationVoiceMessageVoiceMessage container is used for specifying phone number for receiving voice Alternate Delivery Location notification and UAP Shipper notification. Valid only for Alternate Delivery Location notification and UAP Shipper notification. VoiceMessage phone number or TextMessage phone number or email address is required for ADL notification and UAP Shipper notification.
NotificationTextMessageTextMessage container is used for specifying phone number for receiving text Alternate Delivery Location notification and UAP Shipper notification. Valid only for Alternate Delivery Location notification and UAP Shipper notification. VoiceMessage phone number or TextMessage phone number or email address is required for ADL notification and UAP Shipper notification.
NotificationLocaleThis container is used for providing Language and dialect details for Alternate Delivery Location notifications and UAP Shipper notifications. Valid only for Alternate Delivery Location notification and UAP Shipper notification.
LabelDeliveryEMailContainer for the email message.
InternationalFormsUserCreatedFormData container for DocumentID(s). Required if Form Type is 07.
InternationalFormsUpsPremiumCareFormUPS Premium Care Form is required if UPS Premium Care Indicator is present on a package. Valid only for Canada to Canada movements.
InternationalFormsCn22FormContainer for the CN22 form. Required if the customer wants to use the UPS generated CN22.
InternationalFormsEeiFilingOptionEEI Filing option. Applicable for EEI form and is required.
InternationalFormsContactsHolds the contact information of various parties. Applicable for EEI and NAFTA CO only. Required for NAFTA CO and EEI. Ultimate consignee contact information is required for EEI. Producer contact information is required for NAFTA CO
InternationalFormsProductContains the commodity/product information. Applies to EEI, Invoice, Partial Invoice, CO and NAFTA CO. When any International form is requested, at least one Product must be present. Maximum number of products allowed for different forms are: 50: Package Packing List 100: Commercial Invoice, NAFTA, CO, EEI 1000: Air Freight packing list Note: For Partial Invoice this container is optional.
InternationalFormsDiscountContainer tag that holds the discount. Applies to Invoice and Partial Invoice forms only.
InternationalFormsFreightChargesContainer tag that holds the Freight Charges. Applies to Invoice and Partial Invoice forms only.
InternationalFormsInsuranceChargesContainer tag that holds the Insurance Charges. Applies to Invoice and Partial Invoice forms only.
InternationalFormsOtherChargesContainer tag that holds the information of amount that covers additional charges not already listed on the invoice. Applies to Invoice and Partial Invoice forms only.
InternationalFormsBlanketPeriodThis field should be entered if the NAFTA Certificate covers multiple shipments of identical goods as described in the Description of Goods field that are imported into a NAFTA country or territory for a specified period of up to one year (the blanket period). The importation of a good for which preferential treatment is claimed based on this certificate must occur between these dates. Applies to NAFTA CO form only. Required for NAFTA CO. This is not valid for a paperless shipment.
UpsPremiumCareFormLanguageForUpsPremiumCareContainer to hold languages in which UPS Premium Care Form is required.
Cn22FormCn22ContentContainer for CN22 content. Required if the CN22 form container is present. Note: The maximum number of goods printed on the CN22 form when a combined MI package and CN22 form label is requested is 30.
Cn22ContentCn22ContentWeightContainer for CN22 content weight.
Cn22ContentWeightUnitOfMeasurementContainer for UOM.
EeiFilingOptionUpsFiledIndicates the EEI UPS Filed option. (option 3) Applicable for EEI form.
EeiFilingOptionShipperFiledIndicates the EEI Shipper Filed option or AES Direct. (Option 1 or 2). Applicable for EEI form.
UpsFiledPoaContainer for POA. Applicable for EEI form.
ContactsForwardAgentThe forwarding agent is the company or person acting as agent in the trans-shipping of freight to the destination country or territory. Applicable for EEI form only.
ContactsUltimateConsigneeThe ultimate consignee is the person or company who receives the goods for end-use or the person or company listed on the export license. This is the end-user of the goods. Applicable for EEI form only.
ContactsIntermediateConsigneeThe intermediate consignee is the person or company in the importing country or territory that makes final delivery to the ultimate consignee. Applicable for EEI form only.
ContactsProducerInformation of the producer. The NAFTA Certificate of Origin must be completed, signed, and dated by the exporter. When the Certificate is completed by the producer for use by the exporter, it must be completed, signed, and dated by the producer. The date must be the date the Certificate was completed and signed. Applies to NAFTA CO. Required for NAFTA CO forms.
ContactsSoldToSoldTo Container. The Sold To party's country code must be the same as the Ship To party's country code with the exception of Canada and satellite countries. Applies to Invoice and NAFTA CO Forms. Required if Invoice or NAFTA CO (International Form) is requested.
ForwardAgentAddressAddress information of the Forwarding agent. Applicable for EEI form only.
UltimateConsigneeAddressAddress information of the Ultimate consignee. Applicable for EEI form only.
UltimateConsigneeUltimateConsigneeTypeContainer for providing UltimateConsignee Type. Applicable for EEI form only.
IntermediateConsigneeAddressAddress information of the Intermediate Consignee. Applicable for EEI form only.
ProducerAddressAddress information of the Producer. Applies to NAFTA CO. Only applicable if producer option is empty or not present. Conditionally required for: NAFTA CO, when Producer option is not specified.
ProducerPhonePhone number information of Producer. Applies to NAFTA CO.
SoldToPhonePhone Container.
SoldToAddressSold To Address Container. Applies to NAFTA CO.
ProductUnitContainer tag for the Unit information of each product. (also called as commodity) Required for Invoice forms and optional for Partial Invoice.
ProductNetCostDateRangeDate Range for regional value content (RVC). Applies to NAFTA CO only.
ProductProductWeightThe shipping weight, including containers, for each commodity with a separate Harmonized Tariff Code / Schedule B Number. This weight does not include carrier equipment. Applies to CO and EEI forms only. Required for CO and EEI forms.
ProductScheduleBContainer tag for the schedule B information of a commodity. Applies to EEI forms only. Required for EEI form
ProductExcludeFromFormContainer tag for determining whether or not to exclude product information from a particular form. If this container is not present we assume that the DEFAULT is selected which is "none" and all products will appear on all forms.
ProductPackingListInfoData Container holding package related information. Required for packaging list and Air Freight Packing list.
ProductEeiInformationRequired for EEI form. Applies to EEI form only.
UnitUnitOfMeasurementContainer tag for the Unit of measurement for the commodity. Required for Invoice forms and optional for Partial Invoice.
ProductWeightUnitOfMeasurementContainer tag for the Unit of Measurement of weight. Applies to CO and EEI forms only.
ScheduleBUnitOfMeasurementThe unit of measure indicated on the Export License. Applies to EEI forms only.
PackingListInfoPackageAssociatedData Container holding package/product related information that will break up the product into each package on the packing list. Total product amount must equal the product unit value above. Required for packaging list and Air Freight Packing list. Packaging list max allowed : 20 Air Freight Packaging list max allowed: 200
EeiInformationLicenseLicence information for SDL commodity. Applies to EEI form only.
EeiInformationDdtcInformationDepartment of State/ Directorate of Defense Trade Control Information. This element is a container for additional information that is applicable to SDL products. It will only be evaluated if the provided license code is an SDL code. Applies to EEI Form only.
DdtcInformationUnitOfMeasurementContainer for unit of measurement. Applies to EEI form only. It is required for EEIFilingOption code 3.
PreAlertNotificationEMailMessageThis container is used for Populating EMailMessage details for PreAlertNotification.
PreAlertNotificationVoiceMessageVoiceMessage container is used for specifying phone number for receiving voice PreAlertNotification.
PreAlertNotificationTextMessageTextMessage container is used for specifying phone number for receiving text preAlertNotification.
PreAlertNotificationLocaleThis container is used for providing Language and dialect details for PreAlertNotification.
PackagePackagingPackaging container. Container for Packaging Type.
PackageDimensionsDimensions information container. Note: Currently dimensions are not applicable to Ground Freight Pricing. Length + 2*(Width + Height) must be less than or equal to 165 IN or 330 CM. Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate
PackageDimWeightDimensional weight of shipment. Please visit ups.com for rules on calculating. There is one implied decimal place (e.g. 115 = 11.5). If dimensions are provided, dimensional weight is ignored. For US/PR/CA shipments, dimensional weight is ignored
PackagePackageWeightContainer to hold package weight information. Package weight is a required for Ground Freight Pricing shipments and Heavy Goods service. Package Weight will be ignored for Simple Rate.
PackageReferenceNumberPackage reference number information container. For Mail Innovation shipments, up to 3 reference numbers are supported. If 5 reference numbers are specified (CostCenter, PackageID, and 3 ReferenceNumbers) the 3 desigated by the ReferenceNumber container will not be visible on 4x6 label supported by the API. These additional reference numbers are only be visible on the 4x8 label.. For non-Mail Innovation shipments only the first 2 reference numbers will be visible on labels.
PackageSimpleRateSimpleRate Container
PackageUpsPremierUPS Premier Container.
PackagePackageServiceOptionsPackage Service Options container.
PackageCommodityContainer to hold the Commodity information. It is required if the Ground Freight Pricing Shipment indicator is present in the request.
PackageHazMatPackageInformationRequired when number of hazmat containers in a package is greater than 1. It indicates whether all the hazmat materials are kept in a single box or multiple boxes. Required when number of hazmat container in a package is greater than 1.
DimensionsUnitOfMeasurementUnitOfMeasurement container for dimensions.
DimWeightUnitOfMeasurementUnitOfMeasurement Container.
PackageWeightUnitOfMeasurementContainer to hold UnitOfMeasurement information for package weight.
UpsPremierHandlingInstructionsHandling Instruction Container.
PackageServiceOptionsDeliveryConfirmationDelivery Confirmation container. Refer to Delivery Confirmation Origin- Destination Pairs in the Appendix for a list of valid values. Valid only for forward shipment only.
PackageServiceOptionsDeclaredValueContainer for Declared Value.
PackageServiceOptionsCodContainer for COD. Indicates COD is requested. Package level COD is available for shipment without return service from US/PR to US/PR, CA to CA, and CA to US. CA to US COD is not allowed for package Letter/ Envelope. COD is not valid for return service movements.
PackageServiceOptionsAccessPointCodAccess Point COD indicates Package COD is requested for a shipment. Valid only for "01 - Hold For Pickup At UPS Access Point" Shipment Indication type. Package Access Point COD is valid only for shipment without return service from US/PR to US/PR and CA to CA. Not valid with COD at package level.
PackageServiceOptionsNotificationReceiver Return Notification. Applicable for Shipment with returned service.
PackageServiceOptionsHazMatContainer to hold HazMat Chemical Records.
PackageServiceOptionsDryIceContainer for Dry Ice. Maximum 1 Dry Ice is allowed. Lane check will happen based on postal code/ city.
DeclaredValueTypeContainer for Declared Value Type.
PackageServiceOptionsCodCodAmountCOD Amount container.
PackageServiceOptionsNotificationEMailContainer for the e-mail message.
DryIceDryIceWeightContainer for Dry Ice weight.
DryIceWeightUnitOfMeasurementContainer for Unit of measurement for Dry Ice Weight.
CommodityNmfcContainer to hold the NMFC codes.
LabelSpecificationLabelImageFormatLabelImageFormat Container.
LabelSpecificationLabelStockSizeContainer for the EPL2, ZPL or SPL label size. Valid for EPL2, ZPL and SPL Labels.
LabelSpecificationInstructionRouting Instruction Container.
ReceiptSpecificationImageFormatImageFormat Container.
ShipmentResponseShipment Response.
ShipmentResponseResponseResponse container for Shipment response.
ShipmentResponseShipmentResultsShipment Results container.
ResponseResponseStatusResponse status container.
ResponseAlertAlert Container. There can be zero to many alert containers with code and description.
ResponseTransactionReferenceTransaction Reference Container.
ShipmentResultsDisclaimer
ShipmentResultsShipmentChargesShipment charges Container. Shipment charges info.
ShipmentResultsNegotiatedRateChargesNegotiated Rates Charge Container. For tiered rates and promotional discounts, if a particular shipment based on zone, origin, destination or even shipment size doesn't qualify for the existing discount then no negotiated rates container will be returned. Published rates will be the applicable rate.
ShipmentResultsFrsShipmentDataGround Freight Pricing Shipment data container. Ground Freight Pricing shipment data is only guaranteed to be returned for Ground Freight Pricing shipments only.
ShipmentResultsBillingWeightBilling Weight container.
ShipmentResultsPackageResults
ShipmentResultsControlLogReceipt
ShipmentResultsFormContainer tag for the International forms image. Form is returned for following shipments - Forward shipments, Shipments with PRL ReturnService, Electronic Return Label or Electronic Import Control Label shipments with SubVersion greater than or equal to 1707.
ShipmentResultsCodTurnInPageThe container of the COD Turn In Page.
ShipmentResultsHighValueReportContainer for the High Value Report generated for ImportControl or Return shipments with high package declared value.
ShipmentChargesBaseServiceChargeBase Service Charge container. Transportation charge = BaseServiceCharge + Fuel charge Returned only if Subversion >=1701.
ShipmentChargesTransportationChargesTransportation Charges container.
ShipmentChargesItemizedCharges
ShipmentChargesServiceOptionsChargesService Option Charges container.
ShipmentChargesTaxCharges
ShipmentChargesTotalChargesTotal charges container.
ShipmentChargesTotalChargesWithTaxesTotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request and when Negotiated Rates are not applicable. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
NegotiatedRateChargesItemizedCharges
NegotiatedRateChargesTaxCharges
NegotiatedRateChargesTotalChargeTotal charges container. Account Based Rates info. Total charges are only returned for ABR eligible shipper account/UserId combinations when the user includes the NegotiatedRatesIndicator in the request.
NegotiatedRateChargesTotalChargesWithTaxesTotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
FrsShipmentDataTransportationChargesTransportation charges container. Ground Freight Pricing transportation charges. These are only returned for Ground Freight Pricing enabled shipper account number when the user includes the FRSShipmentIndicator in the request.
FrsShipmentDataFreightDensityRateFreightDensityRate container for Density based rating.
FrsShipmentDataHandlingUnits
TransportationChargesGrossChargeGross Charges container. It indicates the shipment level gross Ground Freight Pricing transportation charges.
TransportationChargesDiscountAmountDiscount Amount container. It indicates the shipment level Ground Freight Pricing discount amount for transportation charges
TransportationChargesNetChargeNet Charges container. It indicates the shipment level net Ground Freight Pricing transportation charges.
HandlingUnitsAdjustedHeightContainer to hold Adjusted Height information.
BillingWeightUnitOfMeasurementBilling weight unit of measurement code. The unit of measurement used in Shipment request is returned.
PackageResultsRateModifierContainer for returned Rate Modifier information. Applies only if SubVersion is 2205 or greater.
PackageResultsBaseServiceChargeBase Service Charge container. Transportation charge = BaseServiceCharge + Fuel charge Returned only if Subversion >=1701.
PackageResultsServiceOptionsChargesShipment charges info. Shipment charges are only guaranteed to be returned for shipments whose origin country or territory is US or Puerto Rico.
PackageResultsShippingLabelThe container for UPS shipping label. Returned for following shipments - Forward shipments, Shipments with PRL returns service, Electronic Return Label or Electronic Import Control Label shipments with SubVersion greater than or equal to 1707. Shipping label wont be returned if BarCodeImageIndicator is present.
PackageResultsShippingReceiptSupported for following shipments - PRL shipments, Electronic Return Label or Electronic Import Control Label shipments with SubVersion greater than or equal to 1707.
PackageResultsAccessorial
PackageResultsSimpleRateSimpleRate will be returned if Simple Rate present in request
PackageResultsFormContainer tag for the International forms image. Currently this container would be returned for UPS Premium Care shipments. Form is returned for following shipments - Forward shipments, Shipments with PRL ReturnService, Electronic Return Label or Electronic Import Control Label shipments with SubVersion greater than or equal to 1707. CN22 data for Worlwide economy services will be returned within the PDF417 barcode of the label.
PackageResultsItemizedCharges
PackageResultsNegotiatedChargesNegotiated Rates Charge Container. These charges are returned when: 1) Subversion is greater than or equal to 1607 2) If negotiated rates were requested for GFP shipments and account number is eligible to receive negotiated rates.
ShippingLabelImageFormatThe container image format.
ShippingReceiptImageFormatContainer for a Image Format.
FormImageContainer tag for the International forms image.
ImageImageFormatContainer tag for the International forms image format information.
NegotiatedChargesItemizedCharges
ControlLogReceiptImageFormatContainer for the High Value report format required if parent exist.
ShipmentResultsFormImageContainer tag for the International forms image.
ShipmentResultsImageImageFormatContainer tag for the International forms image format information.
CodTurnInPageImageThe container of the image for COD Turn In Page.
CodTurnInPageImageImageFormatThe container for format of COD Turn In Page.
HighValueReportImageContainer tag for the High Value Report image.
HighValueReportImageImageFormatContainer for the High Value Report image format information for Import Control Shipments.
VoidShipmentResponseVoid Response Container.
VoidShipmentResponseResponseResponse Container.
VoidShipmentResponseSummaryResultContainer for the Summary Result
VoidShipmentResponsePackageLevelResult
VoidResponseResponseStatusResponse Status Container.
VoidResponseTransactionReferenceTransaction Reference Container.
SummaryResultStatusContainer for the status of the Summary Result
PackageLevelResultStatusContains the status code tags.
LabelRecoveryRequestRequest for obtaining the Label for the return shipment.
LabelRecoveryRequestRequestRequest Container.
LabelRecoveryRequestLabelSpecificationContainer that is used to define the properties required by the user to print and/ or display the UPS shipping label. Required for the shipment without return service, or shipment with PRL return service.
LabelRecoveryRequestTranslateTranslate container allows the user to specify the language he/she would like a specific portion of response to return. The language is specified by the combination of language code and dialect code. Valid combinations are: LanguageCode + DialectCode. Either Translate container or Locale element can be present in a given request. Both can't be requested together in same request. Combinations: eng GB = Queen's English Spa 97 = Castilian Spanish ita 97 = Italian fra 97 = France French fra CA = Canadian French deu 97 = German por 97 = Portugal Portuguese nld 97 = Dutch dan 97 = Danish fin 97 = Finnish swe 97 = Swedish eng CA = Canadian English Eng US = US English Default language is Queen's English If the Ship from country or territory is Canada, the Language defaults to Canadian English. If the ship from country or territory is US, the language defaults to US English. If shipping from some other country or territory, the language defaults to Queens English.
LabelRecoveryRequestLabelDeliveryContainer for the Label Delivery accessorial. One Label Delivery per shipment.
LabelRecoveryRequestReferenceValuesContainer that holds reference number and shipper number If tracking number is not present use reference Number
LabelRecoveryRequestUpsPremiumCareFormUPS Premium Care Form container. Default is PDF when container is not provided. Valid only for Canada to Canada movements. UPS Premium Care Form will be returned in both US English and Canadian French language.
LrRequestTransactionReferenceContainer that identifies transactions between client and server.
LabelRecoveryLabelSpecificationLabelImageFormatThe file format of the label and receipt. Defaults to HTML format if this node does not exist.
LabelRecoveryLabelSpecificationLabelStockSizeContainer to hold Label Height and Width information. Applicable if Label Image Code is ZPL, EPL and SPL. Ignored for other Label Image Code types.
ReferenceValuesReferenceNumberContainer for reference number
LabelRecoveryResponseResponse for the Label recovery request Validates the date range and label being present. Also if the shipment is return or not
LabelRecoveryResponseResponseResponse Container
LabelRecoveryResponseCodTurnInPageContainer for COD Turnin Page.
LabelRecoveryResponseFormContainer tag for the International Forms. Currently, represents Commercial Invoice for Electronic Returns Label and Electronic Import Control Label. Applicable for Electronic Return Label and Electronic Import Control Label shipments only. Returned for request with SubVersion greater than or equal to 1707.
LabelRecoveryResponseHighValueReportContainer tag for the High Value Report for Electronic Returns Label and Electronic Import Control Label. Applicable for Electronic Return Label and Electronic Import Control Label shipments only. Returned for request with SubVersion greater than or equal to 1707.
LrResponseResponseStatusResponse Status container
LrResponseTransactionReferenceTransaction Reference Container
LabelRecoveryResponseLabelResultsContainer that stores the label results. Information containing the results of the user's Label Recovery Request.
LabelResultsLabelImageThe elements needed to render a label on a printer or in a browser. Specifies the format in which GraphicImage is represented. If LabelImageFormat is GIF, LabelImage contains GraphicImage and HTMLImage. Otherwise, it contains only GraphicImage. If LabelImageFormat is PDF, LabelImage is only returned at the first package result. If entered in the request, the response mirrors, else the default values are returned. Returned only if TrackingNumber or Combination of Reference Number and Shipper Number present in request.
LabelResultsMailInnovationsLabelImageContainer to hold Mail Innovations shipments label. The elements needed to render a label on a printer or in a browser. Specifies the format in which GraphicImage is represented. If LabelImageFormat is GIF, LabelImage contains GraphicImage and HTMLImage. Otherwise, it contains only GraphicImage. Applicable for Single Mail Innovations Returns and Dual Mail Innovations Returns shipment. Returned only if MailInnovationsTrackingNumber is provided in request. If LabelImageFormat requested was PDF and TrackingNumber was present along with MailInnovationsTrackingNumber in the request, only LabelImage container is returned. MailInnovationsLabelImage will not be returned. In that case, the labels for Small Package Tracking Number and Mail Innovations Tracking Number will be stitched in single PDF file.
LabelResultsReceiptContainer for the HTML receipt and the receipt link.
LabelResultsFormContainer tag for the International Forms. Currently, represents UPS Premium Care Form for Electronic Returns Label and Electronic Import Control Label. UPS Premium Care Form for Forward shipment if Subverion is 1903 or greater Applicable for Electronic Return Label and Electronic Import Control Label shipments only. Applies only for Canada domestic shipments. Returned for request with SubVersion greater than or equal to 1707. UPS Premium Care Form for Forward shipment if Subverion is 1903 or greater
LabelImageLabelImageFormatThe format of a label image byte stream.
MailInnovationsLabelImageLabelImageFormatThe format of a label image byte stream.
ReceiptImageContainer for the receipt in the format other than HTML.
ReceiptImageImageFormatContainer for the format of the receipt.
LrFormImageContainer tag for the International Forms image.
LrcodTurnInPageImageContainer for COD Turnin Page Image.
LrCodTurnInPageImageImageFormatContainer for the format of image.
LabelRecoveryFormImageContainer tag for the International Forms image.
LabelRecoveryImageImageFormatContainer tag for the International forms image format information.
LabelRecoveryResponseTrackingCandidateInformation containing the results of the users Label Recovery Request. Returned in the event the Shipper Number and Reference Number are supplied in the request.
TrackingCandidatePickupDateRangeA range of time the package was picked up.

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →