Skip to content

demianovics/hapag-tnt-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapag-tnt-api

Fetch Hapag-Lloyd's Track and Trace API https://api-portal.hlag.com/#/products/events-tracing-for-web-api-product-d73213 with Node.js, and write the result into a CSV file.

Install

git clone git@github.com:demianovics/hapag-tnt-api.git

Copy .env.example to .env and provide credentials. Create folder csv if it doesn't exist yet.

npm install

Run

hapag-tnt-api % node cmd.js                 
Usage: node cmd.js [options]
At least one of these parameters needs to be provided: --transportDocumentRefere
nce, --carrierBookingReference, --equipmentReference

Options:
      --transportDocumentReference, --tdr  B/L Number                   [string]
      --carrierBookingReference, --cbr     Booking Number/Carrier's Reference
                                                                        [string]
      --equipmentReference, --er           BIC ISO Container Identification Numb
                                           er                           [string]
  -v, --verbose                            Verbose mode
                                                      [boolean] [default: false]
  -h, --help                               Show help                   [boolean]

At least one of these parameters needs to be provided --carrierBookingReference, --transportDocumentReference, --equipmentReference

Fetch with a transportDocumentReference (B/L Number)

node cmd.js --transportDocumentReference HLBU12345678

Fetch with a carrierBookingReference (Booking Number/Carrier's Reference)

node cmd.js --carrierBookingReference 12345678

Fetch with an equipmentReference (BIC ISO Container Identification Number)

node cmd.js --equipmentReference ABCD1234567

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published