@mia-burton/dhl-tracking-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

dhl-tracking-js

A Node.js module for tracking DHL by tracking number

Usage

First of all you need to register to DHL Develop portal and register an App in order to get the DHL-API-Key.

The tracking method accept optional fields SERVICE, ORIGIN_COUNTRY_CODE and REQUESTER_COUNTRY_CODE, refer to DHL documentation to see allowed values.

Javascript

var dhlTracking = require('@mia-burton/dhl-tracking-js')
var dhl = new dhlTracking(API_KEY, BASE_URL)

// Get tracking order information
dhl.tracking({
  trackingNumber: TRACKING_NUMBER,
  service: SERVICE?,
  originCountryCode: ORIGIN_COUNTRY_CODE?,
  requesterCountryCode: REQUESTER_COUNTRY_CODE?
})

Typescript

import dhlTracking from '@mia-burton/dhl-tracking-js'
const dhl = new dhlTracking(API_KEY, BASE_URL)

// Get tracking order information
dhl.tracking({
  trackingNumber: TRACKING_NUMBER,
  service: SERVICE?,
  originCountryCode: ORIGIN_COUNTRY_CODE?,
  requesterCountryCode: REQUESTER_COUNTRY_CODE?
})

Test

call npm run test

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.45latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.45
0.0.30
0.0.20

Package Sidebar

Install

npm i @mia-burton/dhl-tracking-js

Weekly Downloads

4

Version

0.0.4

License

MIT

Unpacked Size

14.8 kB

Total Files

15

Last publish

Collaborators

  • rtmb
  • antoniocapizzi-miaburton
  • paologf
  • gdg-mb