A Node.js module for fedex API such as:
- tracking by tracking number
- generate shipment labels
First of all you need to register to FedEx Develop portal and register an App in order to get the FedEx-API-Key and FedEx-API-Secret.
const { Tracking } = require('@mia-burton/fedex-api-js')
const fedex = new Tracking(CLIENT_ID, CLIENT_SECRET, SANDBOX, VERSION?)
// Get tracking order information
fedex.tracking({
trackingNumber: TRACKING_NUMBER,
language: LANGUAGE?
})
import { Tracking } from '@mia-burton/fedex-api-js'
const fedex = new Tracking(CLIENT_ID, CLIENT_SECRET, SANDBOX, VERSION?)
// Get tracking order information
fedex.tracking({
trackingNumber: TRACKING_NUMBER,
language: LANGUAGE?
})
Add the .env file (following .env.sample and FedEx testing ENV documentation) and than call yarn run test