
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@kronsi/fedex
Advanced tools
library to track, rate or ship something via FedEx Express
npm i @kronsi/fedex
var fedexAPI = require('@kronsi/fedex');
var fedex = new fedexAPI({
environment: 'sandbox', // or live
debug: true,
debugOutput: "xml",
key: 'KEY',
password: 'DEVPASSWORD',
account_number: 'ACCOUNT#',
meter_number: 'METER#',
imperial: true // set to false for metric
});
/**
* Tracking
*/
fedex.track({
SelectionDetails: {
PackageIdentifier: {
Type: 'TRACKING_NUMBER_OR_DOORTAG',
Value: '123456789012'
}
}
}, function(err, res) {
if(err) {
return console.log(err);
}
console.log(res);
});
/**
* Ship
*/
var date = new Date();
fedex.ship({
RequestedShipment: {
ShipTimestamp: new Date(date.getTime() + (24*60*60*1000)).toISOString(),
DropoffType: 'REGULAR_PICKUP',
ServiceType: 'FEDEX_GROUND',
PackagingType: 'YOUR_PACKAGING',
Shipper: {
Contact: {
PersonName: 'Sender Name',
CompanyName: 'Company Name',
PhoneNumber: '5555555555'
},
Address: {
StreetLines: [
'Address Line 1'
],
City: 'Collierville',
StateOrProvinceCode: 'TN',
PostalCode: '38017',
CountryCode: 'US'
}
},
Recipient: {
Contact: {
PersonName: 'Recipient Name',
CompanyName: 'Company Receipt Name',
PhoneNumber: '5555555555'
},
Address: {
StreetLines: [
'Address Line 1'
],
City: 'Charlotte',
StateOrProvinceCode: 'NC',
PostalCode: '28202',
CountryCode: 'US',
Residential: false
}
},
ShippingChargesPayment: {
PaymentType: 'SENDER',
Payor: {
ResponsibleParty: {
AccountNumber: fedex.options.account_number
}
}
},
LabelSpecification: {
LabelFormatType: 'COMMON2D',
ImageType: 'PDF',
LabelStockType: 'PAPER_4X6'
},
PackageCount: '1',
RequestedPackageLineItems: [{
SequenceNumber: 1,
GroupPackageCount: 1,
Weight: {
Units: 'LB',
Value: '50.0'
},
Dimensions: {
Length: 108,
Width: 5,
Height: 5,
Units: 'IN'
}
}]
}
}, function(err, res) {
if(err) {
return console.log(util.inspect(err, {depth: null}));
}
console.log(util.inspect(res, {depth: null}));
});
/**
* Pickup
*/
fedex.pickup({
AssociatedAccountNumber: {
Type: "FEDEX_EXPRESS",
AccountNumber: fedex.options.account_number
},
OriginDetail: {
UseAccountAddress: false,
PickupLocation: {
Contact: {
PersonName: 'Sender Name',
CompanyName: 'Company Name',
PhoneNumber: '5555555555'
},
Address: {
StreetLines: [
'Address Line 1'
],
City: 'Collierville',
StateOrProvinceCode: 'TN',
PostalCode: '38017',
CountryCode: 'US'
}
},
PackageLocation: "NONE",
ReadyTimestamp: "2021-12-02T09:00:57.282Z",
CompanyCloseTime: "16:00:00",
},
PackageCount: '1',
TotalWeight: {
Units: "KG",
Value: "1"
},
CarrierCode: "FDXE"
}, function(err, res) {
if(err) {
return console.log(util.inspect(err, {depth: null}));
}
console.log(util.inspect(res, {depth: null}));
});
See example/index.js for working samples.
Originally forked from mojo5000,fportela-ns,MrBenJ,RyanYocum.
(The MIT License)
Copyright 2015 uh-sem-blee, Co. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A library for using the FedEx Express API
We found that @kronsi/fedex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.