Developer Portal

SpireStock
Developer Portal

Build powerful sales & distribution integrations with a modern REST API. Manage orders, users, products, and exports across multi-tenant workspaces.

Multi-tenant SaaS
99.9% Uptime
REST Standard
GET /api/v1/orders?status=4&page=1
Host: api.spirestock.com
Authorization: Bearer eyJhbG...
Platform Features

Everything you need to integrate

A complete sales & distribution API with enterprise-grade security, multi-tenancy, and real-time data exports.

JWT Authentication

Secure Bearer token auth with OTP & Magic Link support. Industry-standard JSON Web Tokens protect every API call.

Multi-Tenant Architecture

Organization-scoped data with subdomain support. Each workspace operates in full isolation with its own configuration.

Order Management

Full order lifecycle — create, forward, approve, deliver. Track every status transition with detailed audit trails.

Real-Time Exports

Export orders, users, and sales data as XLSX or PDF. Generate reports on demand with flexible filters and date ranges.

RESTful Design

Clean JSON API with consistent response patterns. Predictable URL structure, standard HTTP methods, and paginated responses.

Role-Based Access

Granular permissions for admins, managers, and sales reps. Control access at the endpoint level with workspace-scoped roles.

Quick Start

Up and running in 3 steps

Authenticate, query data, and export reports — all with standard HTTP requests.

Step 1: Authenticate

Login with your credentials to receive a JWT token.

curl -X POST https://api.spirestock.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "YOUR_EMAIL",
    "password": "YOUR_PASSWORD"
  }'

# Response:
# {
#   "response_code": 200,
#   "message": "Login successful",
#   "token": "eyJhbGciOiJIUzI1NiIs...",
#   "user": { "id": 1, "first_name": "Admin", "role_name": "Admin", "user_type": 0 },
#   "workspace": { "slug": "acme-dairy", "display_name": "Acme Dairy", "plan": "professional" }
# }
API Endpoints

Key endpoints at a glance

25+ endpoint categories covering the full sales & distribution workflow.

Base URLhttps://api.spirestock.com/api/v1
POST
/auth/login

Authenticate and get JWT

GET
/orders

List orders with filters

POST
/orders

Create a new order

PATCH
/orders/{id}/status

Update order status

GET
/users

List distributors, retailers, employees

GET
/products

Product catalog with variants

GET
/dashboard/stats

Dashboard analytics

GET
/exports/orders

Export orders as XLSX/PDF

GET
/workspace/config

Workspace settings

Ready to build with SpireStock?

Integrate orders, users, products, and exports into your applications with our well-documented REST API.

All endpoints require JWT authentication. Register your workspace at app.spirestock.com to get started.