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"
}

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

MethodEndpointDescription
GET/api/itemsList items
POST/api/itemsCreate item
GET/api/items/[id]Get item
PUT/api/items/[id]Update item
DELETE/api/items/[id]Delete item
MethodEndpointDescription
GET/api/categoriesList categories
POST/api/categoriesCreate category
PUT/api/categories/[id]Update category
DELETE/api/categories/[id]Delete category
MethodEndpointDescription
GET/api/locationsList locations
POST/api/locationsCreate location
PUT/api/locations/[id]Update location
DELETE/api/locations/[id]Delete location
MethodEndpointDescription
GET/api/export?format=jsonExport data as JSON
GET/api/export?format=csvExport data as CSV
POST/api/importImport data

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