Skip to content

Moutaz-homsi/aramex-api-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

A wrapper api for Aramex tracking and shipping api

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm i aramex-api-services

API

var aramex = require('aramex-api');

Examples

//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']);

License

MIT