Your software. Real logistics.

Connect your tools to orders, available stock and shipment tracking with the REST API, TypeScript SDK and webhooks.

Already have an account?

Open the developer portal to see the APIs your account can access and the SDK available in your environment. Sign-in and the appropriate account permissions are required.

Open developer portal

TypeScript SDK

Read your operation in a few lines

A server-side TypeScript example using the Ysend domain client. Configure the API base URL agreed during onboarding and keep your API key in server-side environment variables.

Read stock, open orders and shipments with the SDK
import { Ysend } from "@ysend/sdk";

const ysend = new Ysend({
  baseUrl: process.env.YSEND_API_BASE_URL!,
  apiKey: process.env.YSEND_API_KEY!,
});

const stock = await ysend.inventory.listBalances({ page: 1, pageSize: 20 });
const orders = await ysend.orders.list({ status: "Open", page: 1, pageSize: 20 });
const shipments = await ysend.shipments.list({ page: 1, pageSize: 20 });

The example needs inventory:read, orders:read and shipments:read. For SDK writes, supply a stable Idempotency-Key to enable retries without creating a second operation.

Make your first request reproducible

Package and environment

Use Node.js 20 or later. If the portal offers an SDK, record its version and filename, then verify the downloaded file’s SHA-256. Replace PACKAGE_FILE.tgz below with that exact filename.

Package and environment
npm install ./PACKAGE_FILE.tgz

YSEND_API_BASE_URL must contain the agreed API origin: HTTPS scheme and host, without /api/v1. The SDK adds that path. Keep YSEND_API_KEY on the server; requests use X-Api-Key.

Pages and responses

Each list call returns one page. Set page and pageSize, then inspect items, totalCount, page and pageSize when supplied before requesting more. A first page is not a complete export.

YsendError exposes the available HTTP status, detail and traceId. YsendTransportError means no usable response was received; a write’s outcome can then be unknown.

Retries and test access

Defaults: three total attempts and a 30-second wait for response headers per attempt. GET/HEAD and requests with Idempotency-Key can retry after a network error or HTTP 429, 502, 503 or 504. Reuse the same key for the same operation. orders.list uses POST without that key and does not receive these automatic retries.

Describe your tools and the data you want to exchange in your integration enquiry. Our team will help you identify the applicable API documentation, SDK and access for your organisation. Do not include secrets.

Get started

Start in three steps

  1. An account key

    After account activation, an authorised administrator creates a key with the scopes your integration needs.

  2. The TypeScript SDK

    If an SDK package is published for your environment, download it from the developer portal, check its SHA-256 and install the downloaded file.

  3. Your first call

    Read stock, orders and shipments with the permissions assigned to your key.

Webhooks

Events you can follow through

Create subscriptions in the web app, test them with a ping and inspect delivery attempts. The outbox retries eligible failures; events that exhaust their attempts remain visible in the dead-letter queue.

Scope

Six domains for your integration

Orders

Import CSV or structured rows; inspect, correct and resubmit rejected rows.

Catalog & inventory

Map SKUs and read on-hand, reserved and available stock.

Inbound

Prepare inbound plans, add lines, request delivery slots and follow receipt discrepancies.

Shipments

Read carrier, tracking and delivery status after fulfilment creates the shipment.

Returns

Open a case against an order and attach photos or documents.

Webhooks

Read subscriptions and delivery history from your integration.

Partner keys

Account keys, partner keys

Keep keys on your server. Account and partner permissions define each operation; key creation, rotation and webhook setup are managed by authorised administrators in the appropriate portal.

Plan your API integration

Bring your data flow and required operations. We will confirm account access, scopes and the SDK package for your integration.

Plan your API integrationSee integrations

The Ysend team helps you choose the services, connections and rollout plan for your business.