SAMPLE · FICTIONAL SYSTEM · Stockwise ERP REST API v2, as set up for the AI agent Base URL: https://erp.stockwise.example/api/v2 The agent signs in as the user "ai-agent". Its API key has these scopes only: read:items, read:suppliers, read:stock, write:purchase_orders:draft Prices are in USD. GET /items?warehouse={code}&below_reorder=true Items at or below their reorder level. Scope read:items GET /items/{sku} One item with stock and reorder settings. Scope read:items GET /suppliers/{supplier_id}/prices?sku={sku} A supplier's price, minimum order and lead time for an item. Scope read:suppliers GET /stock/{sku}/movements?days=30 Stock movements for the last 30 days. Scope read:stock POST /purchase-orders Create a purchase order. Scope write:purchase_orders:draft Body: { "supplier_id": "SUP-01", "warehouse": "MAIN", "status": "draft", "lines": [ { "sku": "PK-1001", "qty": 500, "unit_price": 0.42 } ], "note": "text" } With the draft scope, status must be "draft". A buyer approves and releases drafts in Stockwise. POST /purchase-orders/{id}/release Send a purchase order to the supplier. Scope write:purchase_orders:release (not granted) PATCH /items/{sku} Change reorder settings. Scope write:items (not granted) DELETE /items/{sku} Delete an item. Scope admin (not granted) DELETE /suppliers/{supplier_id} Delete a supplier. Scope admin (not granted)