StockSlip
REST API v1 · OpenAPI 3.1 · MCP over OAuth 2.1

StockSlip Developer Portal

Connect ERPs, e-commerce backends, warehouse automations, ChatGPT, and Claude Code directly to your StockSlip workspace. Every API call and MCP tool enforces tenant isolation, warehouse scope, and user-group price visibility automatically.

REST API Base URL
https://stockslip.app/api/v1
Streamable HTTP MCP Server
https://stockslip.app/mcp

Quickstart & Authentication

All /api/v1/* and /mcp requests authenticate with a Bearer token in the Authorization header.

1. Workspace API Keys (ss_live_...)

Best for ERP sync scripts, webhooks, CI jobs, and headless MCP clients. Generate keys in Control Panel → Settings → API Keys. The raw key is shown once and stored as a SHA-256 hash.

2. OAuth 2.1 with PKCE (S256)

Best for interactive AI clients like ChatGPT and Claude Code. Clients auto-discover /.well-known/oauth-protected-resource, sign in with your StockSlip account, and let you choose a workspace.

Automatic Tenant, Warehouse & Price Enforcement: Every API Key and OAuth token is bound to a single tenant workspace and user. admin members access their linked warehouses and admin routes (Users, User Groups, Prices, Suppliers, Warehouses). standard members are automatically scoped to their assigned warehouse and User Group ScannerPermissions (e.g., cost_price is omitted whenever show_cost_price is disabled).

Verify Your API Key

export STOCKSLIP_TOKEN="ss_live_your_secret_key"

curl -sS "https://stockslip.app/api/v1/warehouses" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Accept: application/json"

MCP Server: ChatGPT & Claude Code

StockSlip exposes a spec-compliant Streamable HTTP Model Context Protocol (MCP) server at https://stockslip.app/mcp backed by a built-in OAuth 2.1 Authorization Server (RFC 9728, RFC 8414, RFC 7591 Dynamic Client Registration, and PKCE S256).

HTTPS Requirement for Cloud AI Clients: ChatGPT and Claude.ai / Claude Desktop connect from OpenAI’s and Anthropic’s cloud servers, so they require a public HTTPS URL (e.g. your production domain or an HTTPS tunnel like ngrok / Cloudflare Tunnel). Claude Code (CLI) runs locally and can connect directly to http://localhost:8080/mcp during local development.

1. Connect in ChatGPT (Custom MCP Connector)

  1. Enable Developer Mode: Open ChatGPT (Plus, Pro, Business, Enterprise, or Edu) → click your profile → Settings → Apps / Connectors (or Security and login) → Advanced settings → toggle Developer mode ON.
  2. Add Custom MCP Server: Open Apps / Plugins, click + (or Add custom MCP server / Create an MCP app), and enter:
    • Name: StockSlip
    • MCP Server URL: https://stockslip.app/mcp (must be public HTTPS)
    • Authentication: OAuth (leave client ID/secret blank — ChatGPT auto-discovers /.well-known/oauth-protected-resource and registers via /oauth/register).
  3. Review the Developer Mode prompt, confirm I understand and want to continue, and click Create.
  4. Install & Authenticate: Install the app, sign in with your StockSlip account, select the target Workspace on the consent screen, and click Approve.
  5. Use in Chat: Enable StockSlip in the chat composer’s tools menu and start asking live inventory questions. If you add new tools later, click Refresh in the app’s settings page.
Sales Floor Variant Check “Do we have Cotton Crew T-Shirt in Navy L? If not, which sizes or colors are in stock?”
Multi-Warehouse Lookup “Check price and stock for barcode 4006381440042 across all my warehouses.”
Draft Purchase Order “Create a draft Purchase Order for Main Warehouse and add 20 units of SKU-2001-NVY-L.”

2. Connect in Claude.ai & Claude Desktop (Custom Connector)

  1. Open Claude.ai (web/mobile) or Claude Desktop → Settings → Customize → Connectors (or Connectors).
  2. Click + / Add custom connector.
  3. Set Name to StockSlip and Server URL to https://stockslip.app/mcp (must be public HTTPS).
  4. Click Add / Save, then complete the OAuth 2.1 sign-in and pick your StockSlip Workspace on the consent page.
  5. Toggle StockSlip on from the + (tools) menu inside any Claude chat.

3. Connect in Claude Code (CLI — OAuth 2.1)

  1. Register the remote HTTP MCP server from your terminal (add --scope user to make it available across all projects, or --scope project to share .mcp.json with your team):
    claude mcp add --transport http --scope user stockslip https://stockslip.app/mcp
  2. Launch claude and run /mcp. Select stockslip to open your browser, sign in to StockSlip, pick a workspace, and approve access.
  3. Verify connection status anytime with claude mcp list (shows ✓ Connected). On headless/SSH machines without a local browser, run claude mcp login stockslip --no-browser.

Alternative: Claude Code with a Static API Key

For CI pipelines or headless automation where browser OAuth is unavailable, pass a workspace API key directly:

claude mcp add --transport http stockslip https://stockslip.app/mcp \
  --header "Authorization: Bearer ss_live_your_secret_key"

OAuth 2.1 Discovery Endpoints

Endpoint Standard Purpose
GET /.well-known/oauth-protected-resource RFC 9728 Advertises resource URL and authorization server for /mcp.
GET /.well-known/oauth-authorization-server RFC 8414 Lists authorization, token, and DCR endpoints plus S256 PKCE support.
POST /oauth/register RFC 7591 Dynamic Client Registration for ChatGPT, Claude Code, and MCP inspectors.
GET / POST /oauth/authorize OAuth 2.1 Workspace picker & consent screen returning code, state, and iss.
POST /oauth/token OAuth 2.1 Exchanges PKCE auth code or refresh token for opaque Bearer access tokens.

Sales-Floor & Operations MCP Tools

All 16 tools are exposed via JSON-RPC 2.0 (tools/list and tools/call) with explicit readOnlyHint and destructiveHint annotations.

Tool Name Mode Key Parameters Description
get_store_context Read-Only — Returns active workspace, currency, caller role, allowed warehouses, and scanner permissions.
check_product_price_and_stock Read-Only code, warehouse_id? Exact barcode/SKU lookup returning size, color, permitted prices, warehouse stock, and sibling variants.
find_product_variants Read-Only query, warehouse_id? Returns a Color × Size availability matrix across allowed warehouses for a product name, SKU, or barcode.
search_catalog Read-Only query?, category?, size?, color?, warehouse_id?, in_stock_only?, low_stock_only?, min_price?, max_price? Filtered product search for sales-floor recommendations and restock triage.
get_warehouse_summary Read-Only warehouse_id? Dashboard KPIs (SKU count, low stock, open POs, draft Goods In, open Counts).
list_batches Read-Only doc_type?, warehouse_id? Lists Purchase Orders, Goods In batches, or Inventory Counts within allowed warehouses.
get_batch_details Read-Only batch_type, id Fetches line items, scanned quantities, and totals for a PO, Goods In, or Count.
create_batch Write batch_type, warehouse_id?, supplier?, reference?, notes? Creates a new draft Purchase Order, Goods In batch, or open Inventory Count.
scan_batch_item Write batch_type, id, code, qty? Scans/adds a barcode or SKU into an open draft PO, Goods In, or Inventory Count.
submit_purchase_order Write id Transitions a draft Purchase Order to submitted.
post_goods_in Destructive id Posts a draft Goods In batch and increments live warehouse_stock.
apply_inventory_count Destructive id Applies an open Inventory Count and reconciles live warehouse stock to counted quantities.
create_product Write product_id, name, barcode?, category?, size?, color?, unit?, cost_price?, sell_price?, min_stock? Creates a new SKU in the catalog including optional size and color attributes.
update_product_price Admin product_id, price_type, amount Upserts sales or cost price (Admin only).
list_suppliers Read-Only — Lists workspace suppliers for Purchase Order and Goods In workflows.
create_supplier Admin code, name, email?, phone?, address?, notes? Creates a new supplier record (Admin only).

REST API (/api/v1/*) Reference

All endpoints accept and return JSON (application/json). Errors return a standard JSON envelope {"error": "...", "message": "..."} with HTTP status 400, 401, 403, or 404.

Batches (Purchase Orders & Goods In)

MethodPathAccessDescription
GET/api/v1/batchesStandard+List batches. Query: doc_type, warehouse_id.
POST/api/v1/batchesStandard+Create draft Purchase Order or Goods In batch.
GET/api/v1/batches/{id}Standard+Get batch header and scanned line items.
POST/api/v1/batches/{id}/scanStandard+Scan barcode/SKU (code, qty) into draft batch.
PUT/api/v1/batches/{id}/lines/{lineId}Standard+Set line quantity (0 removes line).
POST/api/v1/batches/{id}/submitStandard+Submit a draft Purchase Order.
POST/api/v1/batches/{id}/postStandard+Post a draft Goods In batch and increment warehouse stock.

Inventory Counts

MethodPathAccessDescription
GET/api/v1/countsStandard+List inventory counts. Query: warehouse_id.
POST/api/v1/countsStandard+Create an open inventory count session.
GET/api/v1/counts/{id}Standard+Get count lines, system quantities, and variances.
POST/api/v1/counts/{id}/scanStandard+Scan barcode/SKU into an open count.
PUT/api/v1/counts/{id}/lines/{lineId}Standard+Set counted_qty for a count line.
POST/api/v1/counts/{id}/applyStandard+Finalize and reconcile warehouse stock to counted quantities.

Products, Variants & Prices

MethodPathAccessDescription
GET/api/v1/productsStandard+List/search products (?q=, ?warehouse_id=).
POST/api/v1/productsStandard+Create product including size and color.
GET/api/v1/products/lookupStandard+Lookup by ?code= & ?warehouse_id=; returns product + sibling variants.
PUT/api/v1/products/{id}Standard+Update product attributes (including size & color).
DELETE/api/v1/products/{id}AdminDelete a product from the catalog.
GET/api/v1/products/{id}/pricesStandard+List permitted sales and cost prices.
PUT/api/v1/products/{id}/prices/{priceType}AdminUpsert sales or cost price atomically.

Warehouses, Suppliers, Users & User Groups

MethodPathAccessDescription
GET/api/v1/warehousesStandard+List accessible warehouses.
POST/api/v1/warehousesAdminCreate warehouse.
PUT / DELETE/api/v1/warehouses/{id}AdminUpdate or delete a non-default warehouse.
GET/api/v1/suppliersStandard+List workspace suppliers.
POST/api/v1/suppliersAdminCreate supplier.
PUT / DELETE/api/v1/suppliers/{id}AdminUpdate or delete a supplier.
GET / POST/api/v1/usersAdminList or create workspace users.
PUT / DELETE/api/v1/users/{id}AdminUpdate role/warehouses/group or remove user.
GET / POST/api/v1/user-groupsAdminList or create scanner permission groups.
PUT / DELETE/api/v1/user-groups/{id}AdminUpdate or delete a non-default user group.

Concrete cURL Examples

Look Up a Product & Sibling Size/Color Variants

curl -sS "https://stockslip.app/api/v1/products/lookup?code=4006381440042&warehouse_id=1" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN"

Create a Goods In Batch, Scan Items & Post Stock

# 1. Create a draft Goods In batch
BATCH_ID=$(curl -sS -X POST "https://stockslip.app/api/v1/batches" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "doc_type": "goods_in",
    "warehouse_id": 1,
    "price_type": "cost",
    "supplier": "Acme Apparel Supply",
    "reference": "ASN-4021"
  }' | jq -r '.id')

# 2. Scan barcode into the draft batch
curl -sS -X POST "https://stockslip.app/api/v1/batches/${BATCH_ID}/scan" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code": "4006381440042", "qty": 12}'

# 3. Post the Goods In batch (increments warehouse_stock atomically)
curl -sS -X POST "https://stockslip.app/api/v1/batches/${BATCH_ID}/post" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN"

Create a Warehouse, Supplier & Admin User

# Create a warehouse (Admin)
curl -sS -X POST "https://stockslip.app/api/v1/warehouses" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code": "WH-EAST", "name": "East Distribution", "address": "42 Harbor Rd"}'

# Create a supplier (Admin)
curl -sS -X POST "https://stockslip.app/api/v1/suppliers" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code": "SUP-ACME", "name": "Acme Apparel Supply", "email": "orders@acme.example"}'

# Add a standard floor associate scoped to Warehouse 1 (Admin)
curl -sS -X POST "https://stockslip.app/api/v1/users" \
  -H "Authorization: Bearer $STOCKSLIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "associate@store.example",
    "full_name": "Jordan Lee",
    "password": "ChangeMe123!",
    "role": "standard",
    "warehouse_id": 1,
    "user_group_id": 1
  }'

OpenAPI 3.1 Specification

Import the live OpenAPI 3.1.0 schema into Postman, Insomnia, Bruno, or typed SDK generators (openapi-typescript, oapi-codegen).

View Live JSON Spec Download openapi.json
curl -sS "https://stockslip.app/api/v1/openapi.json" -o stockslip-openapi.json