1.0.5 • Published 2 months ago

@kitaety/ups-api v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 months ago

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

NameTypeDefaultDescription
UPS_ENVIRONMENTstr"production"The environment of UPS API (production/test)
UPS_AUTH_URLstr"https://onlinetools.ups.com/"The base auth URL used for the OAuth token request.
UPS_BASE_URLstr"https://onlinetools.ups.com/api/"The base URL used for API requests.
UPS_API_VERSIONstr"v1"The version of the API to use.
UPS_CLIENT_IDstrNoneThe application client ID to obtain the token.
UPS_CLIENT_SECRETstrNoneThe application client secret to obtain the token.
UPS_GRANT_TYPEstr"client_credentials"The application grant type to obtain the token.
UPS_TOKENstrNoneThe token granted by the OAuth request.
UPS_TRANSACTION_SRCstrNoneThe 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.

Build Automation

npm Status License

1.0.5

2 months ago

1.0.4

2 months ago