Shop Planr API Documentation

Welcome to the Shop Planr REST API reference. This documentation covers all 52+ endpoints organized across 14 service domains that power the job routing and ERP system.

Getting Started

Shop Planr exposes a RESTful API under the /api prefix. All endpoints accept and return JSON. The API is served by Nitro (Nuxt's server engine) and backed by SQLite.

Base URL

http://localhost:3000/api

Request Format

  • All request bodies must be JSON with Content-Type: application/json
  • URL parameters use :param syntax (e.g., /api/jobs/:id)
  • Query parameters are used for filtering and pagination

Response Format

Successful responses return the resource directly as JSON. Error responses follow this structure:

{
  "statusCode": 400,
  "message": "Validation error description"
}

Common Status Codes

CodeMeaning
200Success
201Created
400Validation error — missing or invalid fields
404Resource not found
500Internal server error

Service Domains

The API is organized into 14 service domains, each handling a distinct area of functionality:

DomainPrefixDescription
Jobs/api/jobsProduction order CRUD and progress tracking
Paths/api/pathsRoute instances with ordered process steps
Serials/api/serialsSerial number lifecycle — creation, advancement, scrap
Certificates/api/certsCertificate management and attachment
Templates/api/templatesReusable route templates
BOM/api/bomBill of materials roll-ups and versioning
Audit/api/auditImmutable audit trail
Jira/api/jiraOptional Jira integration
Settings/api/settingsApp configuration and page toggles
Users/api/usersKiosk-mode user profiles
Notes/api/notesProcess step notes and defects
Operator/api/operatorWorkstation and queue views
Steps/api/stepsStep assignment and configuration
Library/api/libraryProcess and location libraries

Architecture

Client → API Routes → Services → Repositories → SQLite

All business logic lives in the service layer. API routes are thin HTTP handlers that validate input, call the appropriate service, and return the result. Repositories handle data access and are injected into services via a factory pattern.