Skip to main content

UPS Address Validation REST API Configuration - Knowledgebase / SalesPad / Miscellaneous - Cavallo Technical Support

UPS Address Validation REST API Configuration

Authors list

Overview

UPS has deprecated access key authentication in favor of an OAuth 2.0 security model and REST API. Beginning Aug 5, 2024, access keys will no longer be supported for authentication to any UPS APIs. After this date, all integrations must utilize OAuth 2.0 authentication and REST API to continue to transact with UPS services.

For more information, please see UPS's Access Key to OAuth 2.0 Migration Guide.

Required Modules

The following modules are required to use the new UPS REST API:

Module

Replaces

Requires

SalesPad.Module.UPS

SalesPad.Module.UPSValidation

N/A

SalesPad.Module.ShippingV2

SalesPad.Module.Shipping

SalesPad.Module.UPS


Access Token Maintenance

Overview

The Access Token Maintenance screen allows you to generate new access tokens for the UPS REST API.

BVlPEIsM3jx3hWXp4CNH6TNcPh19erUa-E4NtkEIv944VcYJBUuBjj3k7EXoRqPN_2QeFyHib_EOIFj9FgaFMIW_SzETItndCHJQ.png?access_token=snclbe-rlgvnnwdkl-08bba6c6e1c7893a50c851664f01a6d9aea9c21a

Security

Enable the Access Token Maintenance screen by going to the Security Editor (Modules -> System -> Security Editor) and making sure the Access Token Maintenance checkmark is checked.

dIMUI77Juc0Kt7CW01T5TbtOpFHiNXWZkATSw9Day2f3qHqIV2_SwZXAWELc8kM8PaIn-rTWkFS7DlwBszc9mql1hamYwxgChm4c.png?access_token=snclbe-asabkajgwi-2135a9bf7c17c57c4f1979a170cf076c25cd8801

Can Generate Tokens - Can generate new access tokens.

Can Revoke Tokens - Can revoke access tokens.

Can Delete Tokens - Can delete access tokens. This action will not revoke tokens from service.

Can View Token Properties - Can view access token properties.

Generate Token

1. To generate a new access token, click the Generate Token button.

2. A New Access Token window will open. Select the endpoint type and click OK to start the token generation process. Note that production and test environments require separate access tokens.

04ytuXES6tOLAif9Jx3ZKTYuM2g-VqStdS-9SL_ilPNTQpB6vSzJYzdRRY11hWaZnAMWtPrXf3WqxyA_HRYH2W6aRGkqGXgl08uY.png?access_token=snclb7-mscahmscnl-1a27271655ae9eae82becc4cf3fbefd94323d977

3. The UPS login screen will open and request that you log in using your UPS credentials. Enter your UPS username and password and click the Log In button to continue.

LUY3YqHXKoTfVAS7krBQvjJYPa80L0WSIBoP912eDZCORcbQndSxlduQ8dUfinz2dnTxZiutqKcRj1LvdIKP5m4AvrTX2hDlS0p8.png?access_token=snclbb-aeuomxkskc-2a92a415a1289f91aa63980dc3926622323ac98f

A prompt should display that the token was generated successfully.

NOTE: If there are any issues with the built-in UPS login, a manual login method is available. Hold the ALT key when clicking the Generate Token button and a separate browser window will open. After logging in, copy the resulting URL from the browser’s address bar into the prompt in SalesPad and click OK. SalesPad will parse out the authorization code and generate an access token.

OvVHPkeEOTW4fd4lldSn4puBzyAM9WpdHCRFvCGVXArZUGYZYhftZCC7srXRa-qQ_EE1ctbpSjBs-gaWinTMvVKM0V5qxuXe9-9E.png?access_token=snclbc-jdtuudgcci-f9b3552e7b35c170ae34779aba9e8bd2b328cf7d

Revoke Token

UPS access tokens cannot be revoked. The following message will appear if a user attempts to revoke an existing access token.

1kOJl9P2El0gaU9LdmjyS2zyH9bJakTfLuk5XlfzUu7I7DpuIDZbgWHHYbg5u7iuZQB_TjHpQtWtyDn4ir6igdF80F_bGr73QRv8.png?access_token=snclbg-ojuflqyaha-f5449c7d1474e1bcaa16d85a3e3e61b6eecb3f88

Delete Token

To delete an access token, click the Delete Token button. Click Yes on the following prompt to confirm deletion.

lKI1K_PO0DQhvlwICfUECspvQoUIwh2Af5Nh7IMst21kS4oO0-AoJWyUoYA7w8NttpmypjlM3vYQnATJby1GwKTJRD0tQLhVAfqw.png?access_token=snclbe-onwlexvswy-2f8e3e89e2933404434dc1b4e60653403516377a

View Token Properties

To view token properties, click the Key Information button.

iv4dEYwrpmeCai8DqHIRaKw3EiL7jUSPbN2PjtqqNxKnzbbNySv-GZ8keuJsFKTzrXZulZCROXmj9-6v3OwqBIA5xjvUrMYtrCho.png?access_token=snclbh-rhjgllxtsl-806e8085d6973e4f9b9e2700236e6ccf431bb85f

This will open the Token Properties window which displays various token properties, such as issue date, expiration date, and status.

xc-GG-aBxkyBRZM7f1zqasO-CaMnEB3SnBwn6Hia9IeV3AxbxRm_fwlfzl5dyhjY2y1DshTKfVhwzIFT_TgSN91Qen52q9_tb4mk.png?access_token=snclba-bcghytpayu-7e26e749611899cf4a981a61bb7a25ecca4c3a35

Access Token

The access token must be refreshed every four hours for SalesPad to continue interacting with the UPS REST API. SalesPad will refresh this token automatically when making an API call. Further action from the user is not required.

Refresh Token

The refresh token is returned when a new access token is generated. It is used to refresh the access token. Unlike the access token, the refresh token lasts three months and must be refreshed manually. A refresh token expired error will appear if a transaction is attempted to be processed with an expired refresh token.

uUdn37UqVEYxCp6SRbrqmzQFBA1UHDSN5rSXeV08wG_L39yrgMTmRovI8I_eilodyu4h7Iz833njZWEbg9pek55ve2zgEExUVHmY.png?access_token=snclbi-hqzmwkkcug-f7345672edb60d2fdc77d4b3e1675a50965dc370

A new refresh token can be obtained by generating a new access token after the refresh token expires.

Token Expiration Reminder

When a user logs into SalesPad, and a UPS access token will expire in the next 7 days or is already expired, then an alert will appear in the Log Messages. This will display information on whether the token is already expired, or when it expires, in order to notify that the manual token refresh step must be handled soon.

ZoDGIKHiatxG57nIOJipKWY2mEAllDp9eIMtosptft7OXbyaKTrAbUi3EhKqRPRQspRIgYg-kUOTa5fA4UWSzl-LZBYJU9eNFYVg.png?access_token=snclbf-stswvrbgqv-c8a21307c052856c7c1b0b97df8535472a291e8c

Note that token expiration reminders are available as of SalesPad 5.4.6.

Address Validation

Overview

Address validation is part of the SalesPad.Module.UPS module. This module replaces the legacy SalesPad.Module.UPSValidation module.

Settings

Go to Settings (Modules -> System -> Settings). Set the Address Query Handlers setting to “UPSAddressQueryHandler”.

EA7w7CHUSJXW_sbhHb8_McE2D0yn1mTlV4gk2Eb0jRSGpN92hJ_et0z-XmIpch91RlYMS5FfC3lVs00S-eg8ZGELhBoKfYY39duk.png?access_token=snclbj-xhpgewehua-1e2f8092a7b20becc4aeae334b92f5bd070cc3ef

Filter to “UPS” and configure the following settings.

vKkDQ3UraBi5CuqaZNOIAzSYB_i4AwWyGeapTWqOS0EH8IoChqDwIU0sV4jfOkCZr0sJTTvH1rIuw2vi7JFcrO6097nYvxXsM878.png?access_token=snclbj-fwwoomimdr-6003268352e671e9de74aec55d97b88037fb4a0c

Automatically Apply Address Recommendations In Workflow - Specify whether to automatically apply changes in workflow when UPS address validation responds with a valid recommendation.

Endpoint Type - Set the endpoint type to ‘Test’ or ‘Production.’

UPS Shipper Number - A UPS account number is a six-digit number that is unique to each individual/corporation that holds an account with UPS.

Customer Address Card

1. Navigate to the Customer Address Card.

mTBKa6dlW7tNpUUteBUs4PlR-TWM2BXiQFGL8aSaAqcd5EJitOU4-iWSL1w1N2mGszcHVrKWqopz35UDzNCJDwj1XaUPUkHUMl1w.png?access_token=snclbf-qstefqhivw-3a9e44eacfb5cc1b29db2cb2530bfd8c39d19b28

2. Click the Save button when the customer address is ready to be saved and validated. If an address is ambiguous, SalesPad will allow the user to choose which one they would like to use.

pdCo8iTvklsI7DHUVQz_1pa-gUjm4fPhdLF2YNdJmQV2Uh1O2gaSG9n-vG9_6XMrzutXkxB15tfvLnQJSCGKUzOizR6EGsJJ1Zyk.png?access_token=snclbf-nclsqonfuo-7df68b1743bb96a57fd5cb31b98a8a5883271720

Sales Document Entry Addresses

1. Navigate to the Addresses formlet on the Sales Document Entry screen.

2. Click the Save button when the sales document is ready to be saved and have its Ship To address validated. If an address is ambiguous, SalesPad will allow the user to choose which one they would like to use.

Freight Calculator

Overview

The freight calculator is part of the SalesPad.Module.ShippingV2 module. This module replaces the legacy SalesPad.Module.Shipping module.

Security

Go to the Security Editor (Modules -> System -> Security Editor) and make sure that Sales Document Freight Rates and Sales Document Simple Freight Rates are enabled.

AF5GYPFsfdlalGXDzTEYOk2rCO1S31xPsyIyH73NESKtKilCbIwg2tjuc9zQD1R1LP1tqTPWvJmRfHV2sUeIkKO-bL9Xoi__3mEw.png?access_token=snclbk-qmoqvhwnrg-8288080ca03f0f2f25a4c4b49a4c028235caa416

VVCy5DkC3aX1A7s4gzeJAHii3QQw8HDyL7Qu7DJmspuOYNlhkqiZY05QaHXaDXXH8yjCP7s9OinwUjuiXTfJfBMacY-NBhOmlIds.png?access_token=snclbi-vdepmwgovl-06f9dcd4e981bf74f1c9ae89f85b106ba264e0ad

NOTE: Sales Document Freight Rates has the same functionality as the Sales Document Freight Calculator, and the Sales Document Simple Freight Rates has the same functionality as the Sales Document Simple Freight Calculator from the legacy Shipping module.

Settings

Go to Settings (Modules -> System -> Settings) and filter to “Shipping Tools V2”, then configure the following settings.

zL8moVuycpPfQKhbvfX19OzQ7Hxa6b5Wjl_Bqyget4j3D3tgZMrh1NlUL5jpy7bHBlmIGMRL4_87nn6a31_jl5BqvJu3XfDihibs.png?access_token=snclbg-lnmnquycww-ad18385bfd0919795c08404c79f3210780d10a50

UPS Max Weight - Max weight allowed for calculating UPS rates. Defaults to 150.

UPS Pickup Type - Specify a pickup type for UPS. Defaults to ‘Daily Pickup’.

Use Negotiated Rates - Use 'Negotiated Rates' as opposed to 'Published Rates' from the UPS API. Defaults to false.

Shipping Carrier Query Handlers - Specify the carriers that can be used. Set this setting to ‘UPSQueryHandler’ to obtain UPS rates.


Helpful Unhelpful