An API for Israel postal service - query shipment price easily. Supports both NodeJS and browser environments.
npm install --save israel-postal-service-apiimport { IPS, Options } from 'israel-postal-service-api';// define package shipment characteristics
let weightInGrams = 20;
let serviceType = Options.AbroadMailOptions.LETTER.shipmentType;
let serviceSubtype = Options.AbroadMailOptions.LETTER.shipmentSubtypes.regular;
let option = serviceSubtype.options.signed;
// initialize service
let postalService = new IPS();// calculate package shipping rate asynchronously
let response = await postalService.calculateAbroadShippingRate(
"Spain", weightInGrams, serviceType, serviceSubtype, option);
// see {@class ResponseParser} API to discover the response structure
console.log(response.getTotalPrice()); - π» Browser (including browserify / webpack based environments [such as Angular])
- π₯ Node.js
- π Full Documentation,
- π¨πΌβπ» API,
- π©πΌβπ« Examples,
- π Change log,
- π Licence
If you're having any problem, please raise an issue on GitHub and we'll be happy to help.
- πΎ Issue Tracker,
- π¦ Source Code
Before submitting a pull request, please make sure that you include tests, and that jshint runs without any warnings: Download VSCode extension.
Run the test suite by executing:
$ npm testNote: This API was create as an open source service for makers and entrepreneurs. This is not an official API for Israel Post service.
Author: Benny Megidish.