1.0.14 • Published 1 year ago

vipshipper v1.0.14

Weekly downloads
18
License
ISC
Repository
github
Last release
1 year ago

vipshipper

Instalation

npm i vipshipper

Usage

Initialize

initialize parameters:
    apiId: API_ID, required
    apiKey: API_KEY, required
    format: 'JSON, xml', optional, default : 'json'
    apiUrl: API_URL, optional,  default : https://www.verykship.com/api
    dev: boolean, optional, default : false

    ** when dev is true, default apiUrl became http://3hlrnj.shipper.d.veryk.com/api **
const configs =  {
    apiId: API_ID,
    apiKey: API_KEY
  }

const { Vipshipper } = required('vipshipper');
const shipper = new Vipshipper(configs);

Important

Initialize the 'shipper' for each api call, do not use it globally.

Methods

quote

let quoteCriteria  = {...details, see vipshipper api doc}
const request = await shipper.shipment.quote(quoteCriteria);

create

let inputs  = {...details, see vipshipper api doc}
const request = await shipper.shipment.create(inputs);

retrieve label

orderId (vipshipper order id)
const request = await shipper.shipment.label(orderId);

cancel

reason: string (void reason)
id: string (vipshipper order id)

const request = await shipper.shipment.cancel({
  id, reason
});
1.0.14

1 year ago

1.0.11

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago