UPS is an international shipment solution provider. The method to integrate this system can use 3 methods namely: API, CGI and XML.
In this article, we focus on the request made to USP when the unit of the system is setup to use Kgs.
The API integration uses an access token to connect and consume the API. The generation of this access token relies on 2 parameters: client_id, client_secret.
Below is a curl call to verify if the connection is valid with the parameters at hand
curl --location 'https://onlinetools.ups.com/security/v1/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-merchant-id: string' \
--header 'grant_type: client_credentials' \
--header 'Authorization: Basic <token>=' \
--data 'grant_type=client_credentials'
Once the connection is authorised with the access token, the API call to pull the available shipping methods for a given request is required to be successful to return valid shipping rates.
If the API setting is configured with the shipment origin in US, the unit measure cannot be in Kgs. It has to be in Lbs instead.
If the shipment origin is EU, then the unit can be Kgs indeed