API Documentation

The REST API lets external applications read and manage inventory data programmatically. All endpoints require authentication via a Sanctum bearer token, except for health and version checks.

Quick Access

Interactive Documentation

What the API Offers

System Endpoints

Image Workflow

Images flow through a three-stage pipeline:

  1. UploadPOST /api/image-upload — upload a file for processing
  2. Processing → the system resizes and optimises the image in the background
  3. Attachment → attach the processed image to an item, collection, or partner

See the Core Concepts — Image Management section for details.

TypeScript API Client

An auto-generated TypeScript client is available as an npm package. It provides type-safe access to every API endpoint.

Installation

npm install @metanull/inventory-app-api-client@latest

The package is published to GitHub Packages. You need a GitHub PAT with read:packages scope and an .npmrc pointing to the GitHub registry. See the README for setup details.

Quick Example

import { Configuration, DefaultApi } from "@metanull/inventory-app-api-client";

const api = new DefaultApi(
  new Configuration({ basePath: "https://your.api.url" }),
);
const items = await api.itemIndex();
console.log(items.data);

Client Documentation

For Maintainers

The client is auto-generated from the OpenAPI specification using openapi-generator-cli. Generation and publishing scripts are documented in Development / Scripts.