Skip to main content

The Node.js library

Reeds Engineering
Reeds Engineering
Developer platform

The official Node.js library is on npm as reeds-sdk.

npm install reeds-sdk
import Reeds from 'reeds-sdk';

const reeds = new Reeds(); // reads REEDS_CLIENT_ID and REEDS_CLIENT_SECRET
const delivery = await reeds.shipping.deliveries.create({ quote_id: 'qt_2bX9Wn4K', reference: 'ORDER-10045' });

What it does​

  • Every Shipping API call: coverage, quotes, deliveries (create, list, get, update, book, mark ready, cancel, label), the wallet, invoices and the sandbox.
  • The access token. It fetches the token and refreshes it before it expires.
  • Safe retries. Every POST carries an Idempotency-Key, and a retry reuses it. It retries after 429, 503 and dropped connections, honouring Retry-After.
  • Pages and errors. for await walks every page of a list. Errors are classes carrying the API's code, fields, doc_url and request id.
  • Webhooks. It verifies the Reeds-Signature header (both secrets while you rotate one) and returns typed events.
  • Types. It has TypeScript types for every request, response and event, generated from the OpenAPI file. They allow the values Reeds adds inside v1.

It needs Node.js 18 or later and has no dependencies. See Libraries and plugins and the guide on GitHub.

What you need to change​

Nothing. The API is unchanged, and integrations that call it directly keep working.