API Reference
The Universal Goods REST API provides programmatic access to products, batches, and items, including their structured data sections and verifiable credentials.
Base URL
All API endpoints are served under the /api prefix:
For local development, the base URL is typically http://localhost:3000/api.
Authentication
All API requests require an API key passed as a Bearer token:
Create a key in Settings > API Keys in the dashboard. Keys are scoped to either your personal permissions or the full organization.
Treat API keys like passwords. Never commit them to version control. Use environment variables or a secrets manager.
See Authentication for full details on key scopes and organization context.
Common response patterns
Success responses
Most endpoints return JSON with a 200 status. List endpoints return paginated objects:
Single-resource endpoints return the resource object directly:
Error responses
Errors follow a consistent shape:
Common HTTP status codes:
Pagination
List endpoints accept limit and offset (or page) query parameters:
Resource groups
The API is organised around three core resources, each with structured data sections managed through the metadata API:
Building an integration? Start with the Endpoints reference for the full list of routes and request formats.
Next steps
- Authentication: session and API key details
- Endpoints: complete endpoint reference