@kitaety/ups-api
v1.1.0
Published
The RIPE UPS API client
Downloads
12
Readme
It's a fork of https://github.com/ripe-tech/ups-api-js
UPS API for Javascript
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");
Configuration
| 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. |
Allowed Methods
AddressValidation Api
addressValidation
Locator Api
getNearestAccessPoint
Paperless Api
createDocument
addDocumentShipment
Pickup Api
schedulePickup
Rates Api
rates
Shipment Api
createShipment
cancelShipment
getWaybill
Tracking Api
getTrackingDetails
License
UPS API for Javascript is currently licensed under the Apache License, Version 2.0.