API Client

Lightweight JS client for the Swish REST API.

The Swish API Client provides type-save methods for developers to interact with the API.

Requirements

This packages works in all JS environments were the fetch API is available.

Installation

npm install @swishapp/api-client

Usage

import { createApiClient } from "@swishapp/api-client";

const swish = createApiClient({
  authToken: "your-api-auth-token"
});

const { data } = await swish.items.list();

Reference

Items

List all items

List all items (pagination)

List all items (search query)

Create new item

Delete multiple items

Find item by ID

Update item by ID

Delete item by ID

Lists

List all lists

Create new list

Find list by ID

Find list by ID (items sorted in custom order)

Update list by ID

Delete list by ID

Set custom item order

Profiles

Create new token

Last updated