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

@stylusapparel/shipstation-api-node

v0.0.4

Published

Unofficial Shipstation API Wrapper for Node.js

Downloads

8

Readme

stylusapparel/shipstation-api-node

A NodeJS wrapper for connecting to ShipStation system using the auth credentials provided from ShipStation. You can also view the full documentation of Stylus APIs here

Install

$ npm install @stylusapparel/shipstation-api-node

OR

$ yarn add @stylusapparel/shipstation-api-node

Usage

After having installed it, simply require it and create an instance of wrapper using your own shipstation apiKey and apiSecret, and start calling methods!

const shipStationWrapper = require("@stylusapparel/node-shipstation");
const shipStationWrapperClient = shipStationWrapper.createClient(
    "YOUR_SHIPSTATION_API_KEY", 
    "YOUR_SHIPSTATION_API_SECRET", 
    {
        // additional http options
        timeout: 3000, // optional, request timeout in milliseconds
    }
);

Orders

Get Order

This method can be used to retrieve a single order by orderId.

shipStationWrapperClient.orders
  .get(orderId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the get order request/response payload here

Get All Orders

Obtains a list of orders that match the specified criteria. All of the available filters are optional.

shipStationWrapperClient.orders
  .getAll({
    // filter object
    customerName: "stylus",
    itemKeyword: "leggings",
    sortBy: "OrderDate",
    pageSize: 100,
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the get all orders request/response payload here

Create Order

Create a new order or update an existing order. If the orderKey is specified, ShipStation will attempt to locate the order with the specified orderKey. If found, the existing order with that key will be updated. If the orderKey is not found, a new order will be created with that orderKey.

shipStationWrapperClient.orders.create({
    "orderNumber": "TEST-ORDER-API-DOCS",
    "orderKey": "0f6bec18-3e89-4881-83aa-f392d84f4c74",
    "orderDate": "2015-06-29T08:46:27.0000000",
    "paymentDate": "2015-06-29T08:46:27.0000000",
    "shipByDate": "2015-07-05T00:00:00.0000000",
    ...
    ...
    ...
})
.then((response) => {
    console.log("success",response);  // true
})
.catch((error) => {
    console.log("error",error.status,error);
});

You can see create order request/response payload here

Note:-  This method does not support partial updates, the entire resource must be provided. For partial update, use .update() function.

Create Orders

Create or Update multiple orders in one request. If the orderKey is specified, ShipStation will attempt to locate the order with the specified orderKey. If found, the existing order with that key will be updated. If the orderKey is not found, a new order will be created with that orderKey.

shipStationWrapperClient.orders.bulkCreate([{
    "orderNumber": "TEST-ORDER-API-DOCS",
    "orderKey": "0f6bec18-3e89-4881-83aa-f392d84f4c74",
    "orderDate": "2015-06-29T08:46:27.0000000",
    "paymentDate": "2015-06-29T08:46:27.0000000",
    "shipByDate": "2015-07-05T00:00:00.0000000",
    ...
    ...
    ...
}])
.then((response) => {
    console.log("success",response);  // true
})
.catch((error) => {
    console.log("error",error.status,error);
});

You can see the bulk order create request/response payload here

Note:-  This method does not support partial updates, the entire resource must be provided.

Update Order

This method can be used to partially update an order by providing orderId and update payload.

shipStationWrapperClient.orders.update(orderId, {
    "paymentDate": "2015-07-02T06:46:29.0000000",
    "shipByDate": "2015-08-04T02:11:10.0000000",
    ...
    ...
    ...
})
.then((response) => {
    console.log("success",response);
})
.catch((error) => {
    console.log("error",error.status,error);
});

You can see the order update request/response payload here

Delete Order

Removes an order from ShipStation's UI. Note this is a "soft" delete action so the order will still exist in the shipstation database as inactive.

shipStationWrapperClient.orders
  .delete(orderId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the delete order request/response payload here

Cancel Order

Cancel an order by marking orderStatus as cancelled.

shipStationWrapperClient.orders
  .cancel(orderId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

Response payload for cancel order is same as order update function response

Create Order Label

Creates a shipping label for a given order. The labelData field returned in the response is a base64 encoded PDF value. Simply decode and save the output as a PDF file to retrieve a printable label.

shipStationWrapperClient.orders
    .label(orderId, {
        carrierCode: "fedex",
        serviceCode: "fedex_2day",
        packageCode: "package",
        confirmation: null,
        shipDate: "2014-04-03",
        ...
        ...
        ...
    })
    .then((response) => {
        console.log("success",response);
    })
    .catch((error) => {
        console.log("error",error.status,error);
    });

You can see the order label request/response payload here

Mark an Order as Shipped

Marks an order as shipped without creating a label in ShipStation.

shipStationWrapperClient.orders
  .markShipped(orderId, {
    orderId: 93348442,
    carrierCode: "usps",
    shipDate: "2014-04-01",
    trackingNumber: "913492493294329421",
    notifyCustomer: true,
    notifySalesChannel: true,
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the delete order request/response payload here

Hold Order Until

This method will change the status of the given order to On Hold until the date specified, when the status will automatically change to Awaiting Shipment.

shipStationWrapperClient.orders
  .hold(orderId, holdUntilDate)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the delete order request/response payload here

Shipments

Create Shipment Label

Creates a shipping label. The labelData field returned in the response is a base64 encoded PDF value. Simply decode and save the output as a PDF file to retrieve a printable label.

shipStationWrapperClient.shipments
    .createLabel({
        carrierCode: "fedex",
        serviceCode: "fedex_ground",
        packageCode: "package",
        ...
        ...
        ...
    })
    .then((response) => {
        console.log("success",response);
    })
    .catch((error) => {
        console.log("error",error.status,error);
    });

You can see the shipment label request/response payload here

Get Rates

Retrieves shipping rates for the specified shipping details.

shipStationWrapperClient.shipments
  .getRates({
    carrierCode: "fedex",
    serviceCode: null,
    packageCode: null,
    ...
    ...
    ...
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the shipment rates request/response payload here

Get All Shipments

Obtains a list of shipments that match the specified criteria.

shipStationWrapperClient.shipments
  .getAll({
    recipientName: "stylus",
    recipientCountryCode: "US",
    pageSize: 15,
    ...
    ...
    ...
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the shipment list request/response payload here

Void Shipment Label

Voids the specified label by shipmentId.

shipStationWrapperClient.shipments
  .voidLabel(shipmentId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the shipment label void request/response payload here

Carriers

Get Carrier By Code

Retrieves the shipping carrier account details for the specified carrierCode. Use this method to determine a carrier's account balance.

shipStationWrapperClient.carriers
  .get(carrierCode)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here

Get All Carriers

List all shipping providers connected to this account.

shipStationWrapperClient.carriers
  .getAll()
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carriers list request/response payload here

Get All Services

Retrieves the list of available shipping services provided by the specified carrier

shipStationWrapperClient.carriers
  .getAllServices(carrierCode)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carriers list request/response payload here

Get All Packages

Retrieves a list of packages for the specified carrier.

shipStationWrapperClient.carriers
  .getAllPackages(carrierCode)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carriers list request/response payload here

WareHouses

Create Warehouse

Adds a Ship From Location (formerly known as warehouse) to your account.

shipStationWrapperClient.warehouses
  .create({
    warehouseName: "New Ship From Location",
    originAddress: {
      name: "NM Warehouse",
      company: "White Sands Co.",
      street1: "4704 Arabela Dr.",
      street2: null,
      street3: null,
      city: "Las Cruces",
      state: "NM",
      postalCode: "80012",
      country: "US",
      phone: "512-111-2222",
      residential: true,
    },
    returnAddress: null,
    isDefault: false,
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here

Get Warehouse

Returns a list of active Ship From Locations (formerly known as warehouses) on the ShipStation account.

shipStationWrapperClient.warehouses
  .get(warehouseId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here

Get All Warehouse

Retrieves a list of your Ship From Locations (formerly known as warehouses).

shipStationWrapperClient.warehouses
  .getAll()
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here

Update Warehouse

Updates an existing Ship From Location (formerly known as warehouse). This call does not currently support partial updates. The entire resource must be provided in the body of the request. If a "returnAddress" object is not specified, your "originAddress" will be used as your "returnAddress".

shipStationWrapperClient.warehouses
  .update({
    warehouseId: 12345,
    warehouseName: "API Ship From Location",
    originAddress: {
      name: "API Warehouse",
      company: "ShipStation",
      street1: "2815 Exposition Blvd",
      street2: null,
      street3: null,
      ...
      ...
      ...
    },
    returnAddress: {
      name: "API Ship From Location",
      company: "ShipStation",
      ...
      ...
      ...
    },
    createDate: "2015-07-02T08:38:31.4870000",
    isDefault: true,
  })
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here

Delete Warehouse

Removes a warehouse from ShipStation's UI.

shipStationWrapperClient.warehouses
  .delete(warehouseId)
  .then((response) => {
    console.log("success", response);
  })
  .catch((error) => {
    console.log("error", error.status, error);
  });

You can see the carrier info request/response payload here