A wrapper api for Aramex tracking and shipping api
npm install aramex-apiA wrapper api for Aramex tracking and shipping api
This is a Node.js module available through the
npm registry. Installation is done using thenpm install command:
``sh`
$ npm i aramex-api-services
`js``
var aramex = require('aramex-api');
//Change ClientInfo properties if you want to use real account not a test account
clientInfo = new aramex.ClientInfo() ;
let aramex = require('aramex-api');
aramex.Aramex.setClientInfo(clientInfo);
aramex.Aramex.setConsignee(new aramex.Consignee());
aramex.Aramex.setShipper(new aramex.Shipper());
aramex.Aramex.setThirdParty(new aramex.ThirdParty());
aramex.Aramex.setDetails(1);
aramex.Aramex.setDimension();
aramex.Aramex.setWeight();
//Creating shipment
let result = await aramex.Aramex.createShipment([
{
PackageType: 'Box',
Quantity: 2,
Weight: {
Value: 0.5,
Unit: 'Kg'
},
Comments: 'Docs',
Reference: ''
}
]);
//tracking shipment
let result = await aramex.Aramex.track(['3915342793', '3915342826']);