Everything the Backroom screens can do, an assistant or integration can do too. Two doors into the same store: an MCP server for AI assistants and a JSON API for everything else. Both use a per-store API key that the merchant generates in Backroom → Settings → API & AI assistants.
| Endpoint | https://restocker-production-2027.up.railway.app/mcp |
|---|---|
| Transport | Streamable HTTP (JSON-RPC 2.0 over POST), stateless |
| Auth | Authorization: Bearer <api key> |
Settings → Connectors → Add custom connector → URL https://restocker-production-2027.up.railway.app/mcp. When asked for authentication, choose bearer token / API key and paste the store's key. Then ask things like "what should I reorder from Northwind this week?", "create the purchase orders for everything that's low" or "receive PO-12 in full, invoice 4471".
Any MCP client that supports remote servers with a bearer token works the same way. For clients that only run local servers, point mcp-remote (or an equivalent bridge) at the URL with the header Authorization: Bearer <key>.
| Tool | What it does |
|---|---|
get_store_info | Store name, currency, locations, reorder settings and when stock was last synced. Call first to learn location gids. |
get_stock_summary | How many items are out of stock or below their reorder point, how many suppliers need an order, and the suggested spend. |
get_reorder_suggestions | What to reorder and how much, grouped by supplier, based on sales velocity, lead time and days of cover. Each item has suggested_qty, days_left, on_hand, on_order and the reason. |
list_suppliers | Suppliers with their lead times and contact emails. |
search_products | Find products/variants by name, SKU, barcode or vendor. Returns variant_gid, sku and stock on hand. |
list_purchase_orders | Purchase orders. status: open (default), all, draft, ordered, partial, received, closed, cancelled. |
get_purchase_order | One purchase order with its lines (line_id, sku, qty_ordered, qty_received, unit_cost). |
create_purchase_order | Create a purchase order. Lines identify products by variant_gid, sku or barcode. Created as a draft unless mark_ordered is true. Supplier is inferred from the products' vendor when supplier_id is omitted. |
create_purchase_orders_from_suggestions | Create one purchase order per supplier from the current reorder suggestions (same as the app's 'Create POs for all suppliers'). Pass supplier_id to do a single supplier. Orders are drafts unless mark_ordered is true. |
set_purchase_order_status | Change a purchase order's status. action: order (draft→ordered), close, cancel, reopen, delete (drafts only). |
receive_delivery | Record a delivery against an ordered purchase order and add the units to Shopify inventory at the location. Either pass lines (line_id/sku/variant_gid + qty, optional unit_cost) or receive_all=true for everything outstanding. Pass a nonce to make the call idempotent. |
Tools that create orders or receive deliveries change real data in Backroom and, for receiving, in Shopify inventory. The server's instructions tell assistants to confirm with the user before those calls.
| Base URL | https://restocker-production-2027.up.railway.app/api/v1 |
|---|---|
| Auth | Authorization: Bearer <api key> |
| OpenAPI | https://restocker-production-2027.up.railway.app/api/v1/openapi.json |
| Method & path | Purpose |
|---|---|
GET /me | Store, locations, reorder settings |
GET /locations | Active inventory locations |
GET /suppliers | Suppliers with lead times |
GET /stock/summary?location= | Out-of-stock and to-reorder counts, suggested spend |
GET /suggestions?location=&supplier_id=&all=1 | Reorder suggestions grouped by supplier |
GET /products/search?q= | Find variants by name, SKU, barcode, vendor |
GET /purchase-orders?status=open | List purchase orders |
POST /purchase-orders | Create a purchase order from lines (variant_gid / sku / barcode + qty) |
POST /purchase-orders/from-suggestions | One PO per supplier from the current suggestions |
GET /purchase-orders/{id} | Purchase order with lines |
POST /purchase-orders/{id}/status | {"action": "order" | "close" | "cancel" | "reopen" | "delete"} |
POST /purchase-orders/{id}/receive | Receive a delivery; updates Shopify inventory. Supports receive_all, update_costs, idempotent nonce |
curl -H "Authorization: Bearer bk_…" "https://restocker-production-2027.up.railway.app/api/v1/suggestions"
curl -X POST -H "Authorization: Bearer bk_…" -H "Content-Type: application/json" \
-d '{"lines":[{"sku":"BLU-1001","qty":12}],"mark_ordered":true,"reference":"Sept restock"}' \
"https://restocker-production-2027.up.railway.app/api/v1/purchase-orders"
curl -X POST -H "Authorization: Bearer bk_…" -H "Content-Type: application/json" \
-d '{"receive_all":true,"reference":"INV-4471","nonce":"delivery-2026-10-03"}' \
"https://restocker-production-2027.up.railway.app/api/v1/purchase-orders/12/receive"
Errors come back as {"error": "…"} with 400 (bad input), 401 (bad key or no subscription), 404 (not found), 409 (wrong state) or 502 (receipt recorded but Shopify update failed — retry from the app).