npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shipmozo-sdk

v1.1.0

Published

Node.js SDK for the Shipmozo API, supporting standard orders and MPS.

Readme

Shipmozo SDK

A Node.js SDK for the Shipmozo API, allowing easy integration for order management, shipping, and tracking.

Installation

npm install shipmozo-sdk

Usage

Initialization

import { Shipmozo } from 'shipmozo-sdk';

const client = new Shipmozo({
  publicKey: 'YOUR_PUBLIC_KEY',
  privateKey: 'YOUR_PRIVATE_KEY'
});

Creating an Order (Standard)

const order = await client.pushOrder({
  order_id: "ORD-001",
  order_date: "2023-10-27",
  consignee_name: "John Doe",
  consignee_phone: 9876543210,
  consignee_address_line_one: "123 Main St",
  consignee_pin_code: 110001,
  consignee_city: "New Delhi",
  consignee_state: "Delhi",
  product_detail: [
    {
      name: "T-Shirt",
      sku_number: "TSH-001",
      quantity: 1,
      unit_price: 500
    }
  ],
  payment_type: "PREPAID",
  weight: 500,
  length: 10,
  width: 10,
  height: 5,
  warehouse_id: "WH-123"
});

Creating an MPS Order (Multi-Piece Shipment)

This SDK supports MPS orders where dimensions is an array of box details and type_of_package includes "MPS".

const mpsOrder = await client.pushOrder({
  order_id: "MPS-001",
  order_date: "2025-08-04",
  consignee_name: "Ranvijay",
  consignee_phone: 8090908090,
  consignee_address_line_one: "Sector 49",
  consignee_pin_code: "122018",
  consignee_city: "Gurugram",
  consignee_state: "Haryana",
  product_detail: [
    {
      name: "Chair",
      sku_number: "121345",
      quantity: "4",
      unit_price: 5000
    }
  ],
  payment_type: "PREPAID",
  weight: 2000,
  warehouse_id: "64832",
  type_of_package: ["B2B", "MPS"],
  dimensions: [
    {
      no_of_box: "3",
      length: "10",
      width: "15",
      height: "20"
    },
    {
      no_of_box: "15",
      length: 30,
      width: 13,
      height: 20
    }
  ]
});

Error Handling

All errors thrown by the SDK are instances of ShipmozoError. You can catch them to access more details like error codes or API response data.

import { Shipmozo, ShipmozoError } from 'shipmozo-sdk';

try {
  await client.pushOrder({...});
} catch (error) {
  if (error instanceof ShipmozoError) {
    console.error('API Error:', error.message);
    console.error('Error Code:', error.code);
    console.error('Status:', error.status);
  }
}

Other Methods

  • info(): Check API status.
  • pushReturnOrder(payload): Create a return order.
  • assignCourier(payload): Manually assign a courier.
  • schedulePickup(orderId): Schedule a pickup.
  • cancelOrder(payload): Cancel an order.
  • autoAssignOrder(orderId): Auto-assign courier.
  • getOrderDetail(orderId): Fetch order details.
  • calculateRate(payload): Get shipping rates.
  • checkPincodeServiceability(payload): Check if a pincode is serviceable.
  • getReturnReasons(): List valid return reasons.
  • getOrderLabel(awbNumber): Get the shipping label (Base64).
  • trackOrder(awbNumber): Track shipment.
  • createWarehouse(payload): Create a new warehouse.
  • updateWarehouse(orderId, warehouseId): Update order warehouse.
  • getWarehouses(): List all warehouses.