---
title: "SpireStock Developer Portal"
description: "Build sales & distribution integrations with the SpireStock REST API."
source: https://0.0.0.0:8006/
---

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.

[Get Started](/docs/getting-started?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=hero_get_started)[API Reference](/api-reference?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=hero_api_reference)

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

Create a key, query data, and export reports — all with standard HTTP requests.

### Step 1: Create an API key

One credential, no browser, no expiry you did not choose.

**cURL**

```bash
# Or create it in the dashboard: Developer -> API Keys
curl -X POST https://api.spirestock.com/api/v1/developer/api-keys \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Warehouse sync", "scopes": "read,orders" }'

# Response — the key is shown once and never again:
# {
#   "response_code": 201,
#   "data": {
#     "key": "df_9f3a1c7e2b8d...",
#     "name": "Warehouse sync",
#     "scopes": "read,orders"
#   }
# }
```

**Node.js**

```javascript
const res = await fetch(
  "https://api.spirestock.com/api/v1/developer/api-keys",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${sessionToken}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ name: "Warehouse sync", scopes: "read,orders" }),
  }
);

const { data } = await res.json();
// Store data.key now — only its hash is kept server-side.
console.log("Save this key:", data.key);
```

**Python**

```python
import requests

res = requests.post(
    "https://api.spirestock.com/api/v1/developer/api-keys",
    headers={"Authorization": f"Bearer {session_token}"},
    json={"name": "Warehouse sync", "scopes": "read,orders"},
)

key = res.json()["data"]["key"]
# Store it now — only its hash is kept server-side.
print("Save this key:", key)
```

API Endpoints 

## Key endpoints at a glance

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

Base URL https://api.spirestock.com/api/v1

| Method | Endpoint | Description |
| --- | --- | --- |
| 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 |

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

[View all endpoints](/api-reference?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=endpoints_view_all)

## Ready to build with SpireStock?

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

[Start Building](/docs/getting-started?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=cta_start_building)[Read the Docs](/api-reference?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=cta_read_docs)

All endpoints require JWT authentication. Register your workspace at [app.spirestock.com](https://app.spirestock.com?utm_source=spirestock&utm_medium=developer_portal&utm_campaign=api_docs&utm_content=cta_register_workspace) to get started.
