Skip to content

API Reference

Stowaway provides a REST API for programmatic access to your inventory data.

All API endpoints are relative to your Stowaway installation:

https://your-stowaway-instance.com/api

All API requests require authentication via session cookies.

Note: Session-Based Auth The API uses the same session authentication as the web interface. You must be logged in to make API requests.

For programmatic access, you can authenticate by:

  1. Logging in via the web interface
  2. Using the session cookie in subsequent API requests

All responses are JSON formatted.

{
"items": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}
{
"error": "Error message here"
}

Code Meaning
200 Success
201 Created
400 Bad Request - Invalid input
401 Unauthorized - Not logged in
403 Forbidden - Insufficient permissions
404 Not Found
500 Internal Server Error

Method Endpoint Description
GET /api/items List items
POST /api/items Create item
GET /api/items/[id] Get item
PUT /api/items/[id] Update item
DELETE /api/items/[id] Delete item
Method Endpoint Description
GET /api/categories List categories
POST /api/categories Create category
PUT /api/categories/[id] Update category
DELETE /api/categories/[id] Delete category
Method Endpoint Description
GET /api/locations List locations
POST /api/locations Create location
PUT /api/locations/[id] Update location
DELETE /api/locations/[id] Delete location
Method Endpoint Description
GET /api/export?format=json Export data as JSON
GET /api/export?format=csv Export data as CSV
POST /api/import Import data

Currently, there are no rate limits on the API. However, please be considerate and avoid excessive requests.