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

sendlogistics-node-sdk

v0.0.1

Published

Send Logistics Merchant v2 API node SDK

Readme

Send Logistics Node SDK

Unofficial Node SDK for the Send Logistics merchant API. The TypeScript client is generated from the published OpenAPI spec via @hey-api/openapi-ts, and a thin createAPI() wrapper sets up Basic auth and sensible defaults.

Official Merchant v2 API docs: https://routing.sendlogistics.com/apidocs-merchantul

Send Logistics has OpenAPI specs for Network/Carrier and this SDK is not for those.

Install

npm i sendlogistics-node-sdk
yarn add sendlogistics-node-sdk

Environments

| Environment | Base URL | | ----------- | ----------------------------------------- | | Sandbox | https://routingunit.sendlogistics.com | | Production | https://routing.sendlogistics.com |

Authentication

Basic auth via the Authorization header. For initial sandbox testing the API documents the credentials sample:merchant:

Authorization: Basic base64encode(sample:merchant)
Authorization: Basic c2FtcGxlOm1lcmNoYW50

Production credentials are issued by Send Logistics. createAPI() accepts either a { username, password } pair (it base64-encodes for you) or a pre-encoded token string.

Usage

import { createAPI } from 'sendlogistics-node-sdk';
import { rateRequestFeeEstimation } from 'sendlogistics-node-sdk/dist/client/merchant-ul/sdk.gen';

// Configures the underlying client (Basic auth header, base URL).
createAPI(
  { username: 'sample', password: 'merchant' },
  'https://routingunit.sendlogistics.com'
);

const { data, error } = await rateRequestFeeEstimation({
  body: {
    deliveryOption: 'SAME_DAY',
    weight: '1',
    signatureNeeded: true,
    recipientAddress: {
      street: '555 W Hastings St',
      city: 'Vancouver',
      stateProv: 'BC',
      countryCode: 'CA',
      postCode: 'V6B 4N7',
    },
  },
});

if (error) {
  throw new Error(`rate request failed: ${JSON.stringify(error)}`);
}

console.log(`quote: $${data?.result} (${data?.daysToDeliver} days, ${data?.billWeight})`);

The createAPI() return value also exposes generic get(path) / post(path, body) helpers for endpoints that the generated SDK can't model cleanly (see caveats below).

See test/sendlogistics-api.spec.ts for a runnable example.

Endpoints

All paths are under /ext-interface/echobase-web/rest/v1.

| Method | Path | Generated function | Purpose | | ------ | ------------------------------------- | --------------------------- | ------------------------------------ | | POST | /orders | createANewOrder | Create a new delivery order | | GET | /orders/{trackNumber} | statusOfOrder (see ⚠) | Get current status of an order | | GET | /orders/{trackNumber}/track | trackingEvents (see ⚠) | All tracking events for an order | | GET | /orders/{trackNumber}/ShippingLabel | pdfShippingLabel (see ⚠)| PDF (6×4) shipping label URL | | GET | /orders/{trackNumber}/ZplLabel | zebraShippingLabel (see ⚠)| Zebra (ZPL) shipping label URL | | POST | /batchorders | batchOrders | Submit multiple orders at once | | POST | /orders/fee_estimation | rateRequestFeeEstimation | Get a price/rate quote |

Allowed values

  • deliveryOptionSAME_DAY, NEXT_DAY, IN_TWO_DAYS, GROUND
  • deliveryTypeDROPOFF, PICKUP, SELF_PICKUP
  • categoryGROCERY, PACKAGE, DOCUMENT, OTHER
  • zoneSkippingCARRIER-COURIER (carrier handles zone skipping; pickUpAddress required), CUSTOMER-SHIPS (you deliver to the destination warehouse)
  • Order / event statusesDATA_RECEIVED, CUSTOMS_CLEARED, IN_TRANSIT_TO_HUB, ARRIVED_AT_TERMINAL, DATA_RECEIVED_GOODS_NOT_RECEIVED, READY_FOR_OUTBOUND, WAIT_TO_BE_STARTED, IN_PROGRESS, FIRST_ATTEMPT, SECOND_ATTEMPT, THIRD_ATTEMPT, ATTEMPTED_DELIVERY, DAMAGED, COMPLETED, DELIVERY_NOT_COMPLETED, LOST_IN_SORTING, LOST_BY_DRIVER, CANCELLED, RETURN_TO_CLIENT, HELD_BY_COURIER

Caveats in the upstream OpenAPI spec ⚠

Worth knowing if the generated client surprises you:

  • The track-number endpoints write the path param as [:trackNumber] (Express style) instead of {trackNumber}, so the generated SDK functions hit the literal path. Use the get() / post() helpers from createAPI() to call those endpoints with a real track number.
  • signatureNeeded is declared as type: bool (not valid OpenAPI), so the generated TypeScript type is unknown. Pass true / false as expected — the API itself accepts a boolean.
  • goods is declared as a single object instead of an array, so the generated type is the Goods object. The runtime API accepts and returns an array.
  • The address.required list is malformed in the spec, so generated optionality may not exactly match what the API enforces.

Regenerating the client

yarn generate:merchant-ul

Reads openapi-merchant-ul.yaml and writes the typed client to src/client/merchant-ul/.