The RIPE UPS API client
npm install @kitaety/ups-apiIt's a fork of https://github.com/ripe-tech/ups-api-js
The Javascript version of the UPS Shipping service.
``javascript
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) |str
| UPS_AUTH_URL | | "https://onlinetools.ups.com/" | The base auth URL used for the OAuth token request. |str
| UPS_BASE_URL | | "https://onlinetools.ups.com/api/" | The base URL used for API requests. |str
| UPS_API_VERSION | | "v1" | The version of the API to use. |str
| UPS_CLIENT_ID | | None | The application client ID to obtain the token. |str
| UPS_CLIENT_SECRET | | None | The application client secret to obtain the token. |str
| UPS_GRANT_TYPE | | "client_credentials" | The application grant type to obtain the token. |str
| UPS_TOKEN | | None | The token granted by the OAuth request. |str
| UPS_TRANSACTION_SRC | | None | The transaction source to be added to request headers. |
* addressValidation
* getNearestAccessPoint
* createDocumentaddDocumentShipment
*
* schedulePickup
* rates
* createShipmentcancelShipment
* getWaybill
*
* getTrackingDetails`
UPS API for Javascript is currently licensed under the Apache License, Version 2.0.

