1.2.4 • Published 2 years ago

koombiyo-sdk v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

NPM version Build Status Downloads NPM

Koombiyo-Delivery-Node-SDK

Koombiyo Delivery API Client for NodeJS written in TypeScript

Koombiyo Delivery Logo

https://koombiyodelivery.lk

Install

$ npm install --save koombiyo-sdk

Usage

Initialization

import { Koombiyo } from 'koombiyo-sdk';

Koombiyo.init(KOOMBIYO_API_KEY);

Add New Order

import { Koombiyo, Types } from 'koombiyo-sdk';

Koombiyo.AddNewOrder({
  orderWaybillid: 123,
  orderNo: 123,
  receiverName: 'Kamal Perera',
  receiverStreet: '123, Kohuwala, Nugegoda',
  receiverDistrict: Types.KoombiyoDeliveryDistrictList.COLOMBO,
  receiverCity: Types.KoombiyoDeliveryCityList.KOHUWALA,
  receiverPhone: "0777123456",
  description: "1 x USB Drive",
  spclNote: '-',
  getCod: 1000
})
  .then(res => console.log('res', res))
  .catch(err => console.error('err', err));

Add PickUp Request

import { Koombiyo, Types } from 'koombiyo-sdk';

Koombiyo.AddPickupRequest({
  vehicleType: Types.KoombiyoVehicleType.BIKE,
  pickup_remark: '-',
  pickup_address: '123, Kohuwala, Nugegoda',
  phone: '0777123456',
  qty: 1,
  latitude: 6.872916,
  longitude: 79.888634
})
  .then(res => console.log('res', res))
  .catch(err => console.error('err', err));

Generate Order Tracking URL

import { Koombiyo } from 'koombiyo-sdk';

const trackingURL = Koombiyo.GenerateTrackingURL(KOOMBIYO_WAYBILLID, DELIVERY_RECEIVER_PHONE_NO);
console.log('Tracking URL', trackingURL);

Track Order

import { Koombiyo } from 'koombiyo-sdk';

Koombiyo.GetTrackOrderById(KOOMBIYO_WAYBILLID)
  .then(res => console.log('res', res))
  .catch(err => console.error('err', err));

Track All Order

import { Koombiyo } from 'koombiyo-sdk';

Koombiyo.GetAllOrdersTracking(PAGE, ITEMS_PER_PAGE)
  .then(res => console.log('res', res))
  .catch(err => console.error('err', err));

Get Order Tracking History

import { Koombiyo } from 'koombiyo-sdk';

Koombiyo.GetOrderHistory(KOOMBIYO_WAYBILLID)
  .then(res => console.log('res', res))
  .catch(err => console.error('err', err));

Release Notes

v1.2.0

  • Added Koombiyo City List Support

v1.1.0

  • Added Support for Order Tracking URL Generation

v1.0.0

  • Initial Release

License

Licensed under The MIT License (MIT)

1.2.0

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.0.4

2 years ago

1.2.1

2 years ago

1.0.3

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago