NodeJS module for returning shipping carrier info (name and tracking page URL) based on tracking number. Currently supports UPS, USPS and FedEx.
npm i shipmethod
yarn add shipmethod
Returns carrier name based on tracking number.
const { getCarrier } = require('shipmethod')
const carrier = getCarrier('XXXXXXXXXXXXXXX') // Your tracking number
console.log(carrier) // Ex: 'UPS'
Returns carrier tracking page url.
const { getCarrierLink } = require('shipmethod')
const link = getCarrierLink('ups', XXXXXXXXXXXXXXX') // Your tracking number
console.log(link) // Ex: https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=XXXXXXXXXXXXXXX'
- Breaking API changes.
- Added
getCarrierLink