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.
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.
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).
1. Connect in ChatGPT (Custom MCP Connector)
- 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.
- 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).
- Review the Developer Mode prompt, confirm I understand and want to continue, and click Create.
- Install & Authenticate: Install the app, sign in with your StockSlip account, select the target Workspace on the consent screen, and click Approve.
- 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.
2. Connect in Claude.ai & Claude Desktop (Custom Connector)
- Open Claude.ai (web/mobile) or Claude Desktop → Settings → Customize → Connectors (or Connectors).
- Click + / Add custom connector.
- Set Name to StockSlip and Server URL to https://stockslip.app/mcp (must be public HTTPS).
- Click Add / Save, then complete the OAuth 2.1 sign-in and pick your StockSlip Workspace on the consent page.
- Toggle StockSlip on from the + (tools) menu inside any Claude chat.
3. Connect in Claude Code (CLI — OAuth 2.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 - Launch claude and run /mcp. Select stockslip to open your browser, sign in to StockSlip, pick a workspace, and approve access.
- 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)
| Method | Path | Access | Description |
|---|---|---|---|
| GET | /api/v1/batches | Standard+ | List batches. Query: doc_type, warehouse_id. |
| POST | /api/v1/batches | Standard+ | 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}/scan | Standard+ | 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}/submit | Standard+ | Submit a draft Purchase Order. |
| POST | /api/v1/batches/{id}/post | Standard+ | Post a draft Goods In batch and increment warehouse stock. |
Inventory Counts
| Method | Path | Access | Description |
|---|---|---|---|
| GET | /api/v1/counts | Standard+ | List inventory counts. Query: warehouse_id. |
| POST | /api/v1/counts | Standard+ | Create an open inventory count session. |
| GET | /api/v1/counts/{id} | Standard+ | Get count lines, system quantities, and variances. |
| POST | /api/v1/counts/{id}/scan | Standard+ | 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}/apply | Standard+ | Finalize and reconcile warehouse stock to counted quantities. |
Products, Variants & Prices
| Method | Path | Access | Description |
|---|---|---|---|
| GET | /api/v1/products | Standard+ | List/search products (?q=, ?warehouse_id=). |
| POST | /api/v1/products | Standard+ | Create product including size and color. |
| GET | /api/v1/products/lookup | Standard+ | 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} | Admin | Delete a product from the catalog. |
| GET | /api/v1/products/{id}/prices | Standard+ | List permitted sales and cost prices. |
| PUT | /api/v1/products/{id}/prices/{priceType} | Admin | Upsert sales or cost price atomically. |
Warehouses, Suppliers, Users & User Groups
| Method | Path | Access | Description |
|---|---|---|---|
| GET | /api/v1/warehouses | Standard+ | List accessible warehouses. |
| POST | /api/v1/warehouses | Admin | Create warehouse. |
| PUT / DELETE | /api/v1/warehouses/{id} | Admin | Update or delete a non-default warehouse. |
| GET | /api/v1/suppliers | Standard+ | List workspace suppliers. |
| POST | /api/v1/suppliers | Admin | Create supplier. |
| PUT / DELETE | /api/v1/suppliers/{id} | Admin | Update or delete a supplier. |
| GET / POST | /api/v1/users | Admin | List or create workspace users. |
| PUT / DELETE | /api/v1/users/{id} | Admin | Update role/warehouses/group or remove user. |
| GET / POST | /api/v1/user-groups | Admin | List or create scanner permission groups. |
| PUT / DELETE | /api/v1/user-groups/{id} | Admin | Update 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).
curl -sS "https://stockslip.app/api/v1/openapi.json" -o stockslip-openapi.json