Inventory Inventory API
A simple and powerful API to programmatically access and manage your inventory data. This guide is designed to be understood by both human developers and AI agents. For example if you have an e-commerce website, you can directly load your products, and once sold, your API can update the quantity in your inventory.

Base URL

All API requests should be made to the following base URL:

https://us-central1-studio-9300027708-1f0ae.cloudfunctions.net/getInventory

Authentication

The API uses a Bearer Token for authentication. You must include your personal API key in the `Authorization` header for all requests. You can generate and manage your API key from your profile page.

Authorization: Bearer YOUR_API_KEY_HERE

What the API does and does not do

  • Reads every item marked Include in API, with quantity, price, barcode, custom fields, batches (plus batchCosts, a unit cost per batch id where the owner recorded one), placement and timestamps; pages through inventories of any size.
  • Records sales: subtracts sold units in one transaction, never below zero, soonest-expiring batch first; logged, and it triggers AI Alerts, auto-reorder and store sync.
  • Does not create or edit items, add stock, or return the activity history. Items are created and edited in the web app, the phone apps, or the spreadsheet importer. A write API, an activity feed and outbound webhooks are on the roadmap; ask for them at Request a feature.
  • The same inventory is reachable by AI assistants through the MCP server below, where sales need the owner's approval.

Limits

Every plan includes a number of API calls per calendar month (UTC) and a per-minute allowance. The quota is shared: each request to this API and each tool call made by a connected AI assistant (MCP) spends one unit. Counts reset on the 1st.

PlanCalls / monthCalls / minute
Pro1,00020
Super5,00030
VIP25,00060
Luxury50,00060
Space200,000120

Every authenticated response carries the current state in headers:

X-RateLimit-Limit: 20          calls allowed per minute
X-RateLimit-Remaining: 17      left in the current minute
X-Quota-Limit: 1000            calls included this month
X-Quota-Remaining: 842         left this month
X-Quota-Reset: 2026-12-01T00:00:00.000Z

Over either limit the API answers 429 Too Many Requests with a Retry-After header (seconds) and a JSON body naming the limit. Nothing is read or changed on a refused call. Repeated requests with an invalid key are also throttled per IP address.

{ "error": "Monthly API quota reached", "limit": 1000, "used": 1000, "resetAt": "2026-12-01T00:00:00.000Z" }

To stay well inside the quota, poll with since (only items changed after a timestamp) instead of fetching everything, and page large inventories with limit and cursor rather than repeating full fetches. A GET returns at most 1,000 items.

Endpoints

GETFetch Inventory Items

Retrieves a list of all inventory items that have been explicitly marked for inclusion in the API. If the business has enabled custom item fields (SKU, cost price, reorder level, supplier, expiry date, or their own fields), each item includes them in an optional `fields` object.

Example Request

curl -X GET "https://us-central1-studio-9300027708-1f0ae.cloudfunctions.net/getInventory" \
     -H "Authorization: Bearer YOUR_API_KEY_HERE"

Query parameters (all optional)

  • limit — items per response, 1 to 1,000 (default 1,000).
  • cursor — the X-Next-Cursor value from the previous response, to fetch the next page. The response also sets X-Has-More: true when another page exists.
  • since — an ISO-8601 timestamp; returns only items updated at or after it (the cheapest way to poll). Items never edited since this field existed are not matched.
curl "https://us-central1-studio-9300027708-1f0ae.cloudfunctions.net/getInventory?since=2026-11-01T00:00:00Z&limit=500" \
     -H "Authorization: Bearer YOUR_API_KEY_HERE"

Success Response (200 OK)

Returns a JSON array of `InventoryItem` objects. Besides the fields shown, an item can carry images (gallery URLs, first = main), tagId, its placement (warehouseId, shelfId, floor, assignedQty) and isWatched (a Shelf Watch camera is on it). Ignore keys you do not use; new keys may be added without notice, existing ones are not removed.

Photo links (imageUrl, images) are for showing products inside your apps, dashboards and admin tools. A public storefront should copy the pictures to its own hosting or CDN rather than load them from these links on every page view; links used as a store's image host may be rate-limited.

[
  {
    "id": "ITEM_ID_2",
    "name": "potato",
    "description": "A root vegetable",
    "quantity": 2,
    "includeInApi": true,
    "createdAt": "2026-02-04T16:46:21.372Z",
    "updatedAt": "2026-02-05T16:04:34.537Z"
  },
  {
    "id": "ITEM_ID_1",
    "name": "carrot",
    "description": "A fresh carrot",
    "quantity": 6,
    "price": 90,
    "includeInApi": true,
    "fields": { "sku": "CAR-001", "costPrice": 45, "expiryDate": "2026-08-01" },
    "createdAt": "2026-02-04T16:46:21.522Z",
    "updatedAt": "2026-02-05T16:42:02.945Z"
  }
]

POSTUpdate Item Quantities

Updates the quantity of one or more items, typically after a sale. The request body must be a JSON object containing an `items` array. Each object in the array must have an `itemId` and the `quantity` to subtract.

Every update is also recorded in your Activity Log (attributed to “Developer API”), so API-driven stock movements show up alongside scans and edits — and can trigger any AI Alert rules you’ve set up (low stock, item watches, and so on).

For batch-tracked items (the optional `batches` array), quantity subtractions are applied FEFO — First Expired, First Out: the soonest-expiring batch is consumed first, the item's `fields.expiryDate` rolls forward to the next-soonest batch automatically, and the Activity Log records exactly which lots were consumed.

Optional `transactionId`: a unique id for this sale (an order or receipt number). If the same id is sent again within 90 days, nothing is deducted and the response carries `duplicate: true` with the original changes — so retries and repeated CSV runs are safe. The same id is recognised whether the sale came through this API or through a connected AI assistant.

Request Body

{
  "items": [
    { "itemId": "ID_OF_ITEM_1", "quantity": 1 },
    { "itemId": "ID_OF_ITEM_2", "quantity": 5 }
  ],
  "transactionId": "RECEIPT-2026-10-27-000123"
}

Example Request

curl -X POST "https://us-central1-studio-9300027708-1f0ae.cloudfunctions.net/getInventory" \
     -H "Authorization: Bearer YOUR_API_KEY_HERE" \
     -H "Content-Type: application/json" \
     -d '{
           "items": [
             { "itemId": "ITEM_ID_2", "quantity": 1 },
             { "itemId": "ITEM_ID_1", "quantity": 2 }
           ]
         }'

Success Response (200 OK)

{
  "success": true,
  "message": "2 item(s) updated.",
  "transactionId": "RECEIPT-2026-10-27-000123",
  "changes": [
    { "itemId": "ITEM_ID_2", "itemName": "Cordless Drill", "subtracted": 1, "prevQuantity": 12, "newQuantity": 11 },
    { "itemId": "ITEM_ID_1", "itemName": "Work Gloves", "subtracted": 2, "prevQuantity": 35, "newQuantity": 33 }
  ]
}

Error Responses

400 Bad Request - Insufficient stock for the requested quantity.

Bad Request: Insufficient stock for item "potato".

404 Not Found - One of the provided `itemId` values does not exist.

Bad Request: Item with ID "INVALID_ID_HERE" not found.

Sales orders VIP and above

Sales orders are what a customer is buying from you. Confirming an order reserves stock (available = quantity − reserved); shipping deducts the picked units the same way a sale does, FEFO on batches, one Activity Log entry per line. The same API key, quota and Include in API rule apply. Base URL:https://inventoryinventory.com/api/v1/orders

  • GET /api/v1/orders?status=open&customer=&limit= — list orders, newest first. status: open (default), draft, confirmed, picking, packed, ready, shipped, cancelled.
  • GET /api/v1/orders/SO-0012 — one order by number or id, with lines, picks, reservations, shortfalls and shipment.
  • POST /api/v1/orders — create: { customer: { name, email?, phone?, address? }, lines: [{ itemId, quantity }], note?, externalId?, confirm? }. confirm: true reserves stock at once; externalId (your order number) makes the call safe to repeat.
  • POST /api/v1/orders/SO-0012 — act on an order: { action: "confirm" }, { action: "pick", itemId, quantity } (negative undoes), { action: "ready", carrier?, trackingNumber?, orderCode? } (labelled, waiting for the carrier; orderCode must match the order), { action: "ship", carrier?, trackingNumber?, packages?, weightKg?, partial? }, { action: "cancel", reason? }, { action: "reopen" } (a cancelled order back to draft). Optional opId makes any action idempotent.
curl -X POST "https://inventoryinventory.com/api/v1/orders" \
     -H "Authorization: Bearer YOUR_API_KEY_HERE" \
     -H "Content-Type: application/json" \
     -d '{ "customer": { "name": "Maple Hardware Co." },
           "lines": [ { "itemId": "ITEM_ID_1", "quantity": 12 } ],
           "externalId": "WEB-10042", "confirm": true }'

Carriers: purolator, canadapost, ups, fedex, usps, dhl, pickup, other. A shipped order carries a trackingUrl for the common carriers. Orders created through the API appear on the Orders page with source “api”.

Data Models

InventoryItem Object

The structure for a single item in your inventory.

{
  "id": "ITEM_ID_1",
  "name": "carrot",
  "description": "A fresh carrot",
  "quantity": 6,
  "price": 90,
  "barcode": "6441494753334",
  "imageUrl": "https://path/to/image.jpg",
  "includeInApi": true,
  "fields": {
    "sku": "CAR-001",
    "costPrice": 45,
    "reorderLevel": 10,
    "supplier": "Example Supplier",
    "expiryDate": "2026-08-01"
  },
  "batches": [
    { "id": "a1b2c3d4", "qty": 4, "expiryDate": "2026-08-01", "lotNumber": "A123" },
    { "id": "e5f6g7h8", "qty": 2, "expiryDate": "2026-08-15" }
  ],
  "createdAt": "2026-02-04T16:46:21.522Z",
  "updatedAt": "2026-02-05T16:42:02.945Z"
}

Connect an AI assistant (MCP)

Inventory Inventory is also an MCP server (Model Context Protocol) — the standard way AI assistants such as Claude, ChatGPT and Cursor plug into outside systems. Once connected, you can ask your assistant things like “what is running low?”, “which items expire this month?” or “record that we sold 3 paint roller sets”, and it uses your live inventory. No API key to paste: you sign in with Google and approve, and you can disconnect any time from your Profile under Connected AI apps. MCP access is part of the Pro plan.

Server URL

https://inventoryinventory.com/api/mcp

Transport: Streamable HTTP. Authentication: OAuth 2.1 with PKCE (discovered automatically from the URL). Scopes: inventory:read, inventory:write.

How to connect

  • Claude (web, desktop): in Settings, open Connectors and add a custom connector with the server URL above, then approve the sign-in.
  • Claude Code: claude mcp add --transport http inventory-inventory https://inventoryinventory.com/api/mcp, then run /mcp to sign in.
  • ChatGPT: in Settings, open Connectors, create a connector with the server URL and complete the sign-in.
  • Cursor and other MCP clients: add a remote MCP server with the URL; OAuth sign-in opens in your browser.

Tools

  • list_inventory — items with quantity, price, cost, supplier, barcode, SKU, expiry and where they sit (location, warehouse, aisle); optional search, tag, location, warehouse and custom-field (field + value) filters; pages through inventories of any size (pass nextCursor back as cursor).
  • get_item — one item by id, barcode, SKU or name; with location to pick that location's record when a product is stocked in several, otherwise all matching records come back.
  • low_stock — items at or below their reorder level, or out of stock.
  • expiring_soon — items and batches expiring within N days.
  • inventory_summary — counts (records and distinct products), units on hand, stock value at price and at cost, and a per-location breakdown when the account uses locations.
  • record_sale — deduct sold units (asks for confirmation; never below zero; FEFO on batches; logged; triggers alerts, auto-reorder and store sync). Requires the inventory:write scope.
  • list_orders, get_order, order_history — sales orders by status and customer, with lines (picked, reserved, who picked and when), shortfalls, shipment, and progress: the eight stations with state and time; history lists every step with who did it (VIP and above).
  • create_order, confirm_order, pick_line, ready_order, ship_order, cancel_order, reopen_order — the order flow: create a draft or confirm it (reserves stock), record picks, label the packed box (carrier, tracking, order code check), ship (the handover: deducts the picked stock) and cancel (releases stock). Writes need inventory:write; assistants confirm before shipping or cancelling.

Only items with Include in API enabled are visible, the same rule as the REST API. Every sale recorded through MCP appears in the Activity Log attributed to the connected app. Each tool call spends one unit of the plan's monthly API quota (see Limits); when it is used up, the assistant gets an error naming the limit and nothing is read.