shiprocket-api
v1.1.4
Published
Shiprocket api for react , react native and node js
Downloads
24
Maintainers
Readme
What is this ?
This repo will help to integrated shiprocket with React / React native / Node js
Installation
yarn add shiprocket-api
or npm i shiprocket-api --save
Then...
import { GetToken, CourierServiceability , Tracking_OrderId } from 'shiprocket-api'
/// Get Token
const token = await GetToken({
email : '[email protected]',
password: 'password',
})
/// Check Courier Serviceability
const response = await CourierServiceability({
auth: {
email : '[email protected]',
password: 'password',
},
params: {
pickup_postcode : 600000,
delivery_postcode : 600005,
weight: 2,
cod : 1
}
})
//// Get Tracking Data through Order ID
const response = await Tracking_OrderId({
auth: {
email : '[email protected]',
password: 'password',
},
params: {
order_id : '55097',
}
})
Options
shiprocket supports 2 options , both of which are required
auth option:
- email (required if you don't provide direct token)
- password (required if you don't provide direct token)
- token (Bearer token for authentication)
params option:
- *necessary parameters * (you can find the parameters list in their offical documentation)
Docs
Offcial APi docs : [Shiprocket API] (https://apidocs.shiprocket.in/)
Support
if you have any questions or suggestions or feature request then email me.
support email : [email protected]