It's a fork of https://github.com/ripe-tech/ups-api-js
The Javascript version of the UPS Shipping service.
const upsApi = require("ups-api");
// instance the API client with defaults
const api = new upsApi.API({
clientId: "myUpsAppClientId",
clientSecret: "myUpsAppClientSecret"
});
// example: request tracking information
const tracking = await api.getTrackingDetails("7798339175");
Name | Type | Default | Description |
---|---|---|---|
UPS_ENVIRONMENT | str |
"production" |
The environment of UPS API (production/test) |
UPS_AUTH_URL | str |
"https://onlinetools.ups.com/" |
The base auth URL used for the OAuth token request. |
UPS_BASE_URL | str |
"https://onlinetools.ups.com/api/" |
The base URL used for API requests. |
UPS_API_VERSION | str |
"v1" |
The version of the API to use. |
UPS_CLIENT_ID | str |
None |
The application client ID to obtain the token. |
UPS_CLIENT_SECRET | str |
None |
The application client secret to obtain the token. |
UPS_GRANT_TYPE | str |
"client_credentials" |
The application grant type to obtain the token. |
UPS_TOKEN | str |
None |
The token granted by the OAuth request. |
UPS_TRANSACTION_SRC | str |
None |
The transaction source to be added to request headers. |
addressValidation
getNearestAccessPoint
createDocument
addDocumentShipment
schedulePickup
rates
createShipment
cancelShipment
getWaybill
getTrackingDetails
UPS API for Javascript is currently licensed under the Apache License, Version 2.0.