Skip to content

ShipMethod determines shipping carrier name and tracking page url based on tracking number. Currently supports UPS, USPS and FedEx.

Notifications You must be signed in to change notification settings

cyberwombat/shipmethod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shipping Tracker

NodeJS module for returning shipping carrier info (name and tracking page URL) based on tracking number. Currently supports UPS, USPS and FedEx.

Install

npm i shipmethod
yarn add shipmethod

API

getCarrier

Returns carrier name based on tracking number.

const { getCarrier } = require('shipmethod')
const carrier = getCarrier('XXXXXXXXXXXXXXX') // Your tracking number
console.log(carrier) // Ex: 'UPS'

getCarrierLink

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'

Changelog

2.0.0

  • Breaking API changes.

2.1.0

  • Added getCarrierLink

About

ShipMethod determines shipping carrier name and tracking page url based on tracking number. Currently supports UPS, USPS and FedEx.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published