# Inventory API for AI agents and automation

**Does Stock Register have an inventory API?** Yes. The Stock Register Inventory API is a REST API with an OpenAPI schema. The business owner creates a client ID and secret in Settings → Inventory API, then the agent exchanges them for a short-lived Bearer token. It reads live stock across every store and godown and, with write access, records stock changes. It is self-serve on Advance Pro, Manufacturing Pro and the free trial.

The Stock Register Inventory API is a REST API for your AI agent, automation tool or server to read live stock, items, batches, parties, expenses and reports, and to record stock adjustments, items, party prices and job work orders. Business owners on an active Advance Pro or Manufacturing Pro plan, or in the 7-day free trial, create credentials themselves in Settings → Inventory API.

- **Base URL:** https://inventory-api.stockregister.in (the Inventory API's server; every path starts with /inventory)
- **Authorization:** Client ID and secret exchanged for a short-lived Bearer token
- **Scopes:** api:read, api:write
- **Coverage:** All stores in the business
- **Eligibility:** Active Advance Pro or Manufacturing Pro, or the 7-day free trial
- **OpenAPI 3.0:** https://inventory-api.stockregister.in/inventory/v1/public/openapi3.json
- **Swagger 2.0:** https://inventory-api.stockregister.in/inventory/v1/public/openapi.json

## Set up

1. **Verify as the owner.** Open Settings → Inventory API. In India, verify the registered business mobile with an OTP by SMS or WhatsApp. International owners verify with the Google account linked to the business.
2. **Create an integration.** Name it and start with Read only. Choose Read and modify only if the integration needs the permitted write operations. Save the business ID, base URL, client ID and the one-time client secret.
3. **Store the secret safely.** Put it in your AI platform's secret manager or your connector's server environment. Keep it out of prompts and chat history.
4. **Configure the HTTP tools.** Use the published OpenAPI 3.0 schema for tool definitions; Swagger 2.0 remains available alongside it. Add a token exchange action and send the token as Authorization: Bearer <token>. Exchange again before expires_in runs out.
5. **Verify with a read.** Ask the agent to list your stores and check one known item. Compare with the dashboard, and check it asks which item you mean when names match more than one.

Settings → Inventory API: https://web.stockregister.in/settings/inventory-api
Quickstart: https://www.stockregister.in/developers/inventory-api#setup

## Scopes

- `api:read`: Read stores, items, batches and live quantities, plus parties, expenses, reports, job work and manufacturing data in the business.
- `api:write`: Record changes: stock adjustments (IN / OUT), items and categories, party prices, balance adjustments, job work orders and process templates. Bills and payments are made through the MCP server in ChatGPT or Claude, not the API. Request it with api:read.

## Token exchange

```bash
curl -X POST https://inventory-api.stockregister.in/inventory/v1/oauth/token \
  -H "Content-Type: application/json" \
  -d '{"client_id":"…","client_secret":"…","scopes":["api:read"]}'
```

Send the returned token as `Authorization: Bearer <token>`.

## Endpoints

Paths are relative to https://inventory-api.stockregister.in. Writes need api:write; stock adjustments also need a clientRequestId.

### Stock

- `GET /inventory/api/v1/ItemBatch/getBatchesForItem/{stockItemId}/{storeId}`: List batches for an item in its store. (api:read)
- `POST /inventory/api/v1/entry/create`: Create a stock adjustment IN or OUT entry; invoice and order entry types are not supported on this API. (api:write)
- `DELETE /inventory/api/v1/entry/delete/{entityId}/{entryType}`: Cancel a stock adjustment using its saved entry ID and adjustment type. (api:write)
- `POST /inventory/api/v1/itemCategory/create`: Create an item category for the business. (api:write)
- `DELETE /inventory/api/v1/itemCategory/delete/{itemCategoryId}`: Delete an existing item category. (api:write)
- `GET /inventory/api/v1/itemCategory/get/{business_id}`: List item categories for the business. (api:read)
- `POST /inventory/api/v1/itemCategory/update`: Update an existing item category. (api:write)
- `GET /inventory/api/v1/itemCategoryMap/business/{businessId}/stockItem/{stockItemId}`: Read the categories assigned to an item. (api:read)
- `POST /inventory/api/v1/itemCategoryMap/update`: Update category assignments for items using the existing request contract. (api:write)
- `GET /inventory/api/v1/itemPriceUnit/{business_id}`: List item price units configured for the business. (api:read)
- `GET /inventory/api/v1/stockItem/getAllHeaders/{storeId}`: Read the configured item columns for a store. (api:read)
- `GET /inventory/api/v1/stockItem/getItemPriceStackBreakUp/{stockItemId}`: Read an item's valuation stack breakdown. (api:read)
- `GET /inventory/api/v1/stockItem/{stockItemId}`: Read an item and its current available stock using the v1 contract. (api:read)
- `GET /inventory/api/v2/itemCategory/business/{business_id}/store/{store_id}`: List item categories available in a business store. (api:read)
- `POST /inventory/api/v2/stockItem/update`: Update an item using the existing v2 request contract. (api:write)
- `GET /inventory/api/v2/stockItem/{stockItemId}`: Read extended item details using the v2 contract. (api:read)
- `POST /inventory/api/v3/stockItem/bulk/byIds`: Read items by their IDs using the existing bulk lookup contract. (api:read)
- `POST /inventory/api/v3/stockItem/create`: Create an inventory item using the published v3 request contract. (api:write)
- `DELETE /inventory/api/v3/stockItem/delete/{stockItemId}/{storeId}`: Delete an item in its store using the existing item-deletion workflow. (api:write)
- `GET /inventory/api/v3/stockItem/getPaginatedItemsList/{storeId}/{offset}`: Read one page of store items and their available stock. (api:read)
- `PUT /inventory/api/v3/stockItem/update`: Update an item using the existing v3 request contract. (api:write)
- `GET /inventory/api/v3/store/getStore/{business_id}`: List stores belonging to the authenticated business. (api:read)
- `GET /inventory/api/v4/adjustment-reason/business/{businessId}`: List stock adjustment reasons for the business. (api:read)
- `POST /inventory/api/v4/adjustment-reason/create`: Create a stock adjustment reason for the business. (api:write)
- `PUT /inventory/api/v4/adjustment-reason/update`: Update an existing stock adjustment reason. (api:write)
- `DELETE /inventory/api/v4/adjustment-reason/{id}`: Delete an existing stock adjustment reason. (api:write)
- `GET /inventory/api/v4/adjustment-reason/{id}`: Read a stock adjustment reason by ID. (api:read)
- `POST /inventory/api/v6/stockItem/getPaginatedItemsList`: Search and paginate inventory items across the supplied business stores. (api:read)

### Accounting

- `GET /inventory/api/v1/balance-adjustment`: List balance adjustments using the supplied filters. (api:read)
- `POST /inventory/api/v1/balance-adjustment`: Create a balance adjustment using the existing accounting workflow. (api:write)
- `DELETE /inventory/api/v1/balance-adjustment/{entityId}`: Delete an existing balance adjustment. (api:write)
- `GET /inventory/api/v1/balance-adjustment/{entityId}`: Read a balance adjustment by its entry ID. (api:read)
- `PUT /inventory/api/v1/balance-adjustment/{entityId}`: Update an existing balance adjustment. (api:write)
- `GET /inventory/api/v1/expense/get/{storeId}/{expenseId}`: Read one expense in the specified store. (api:read)
- `GET /inventory/api/v1/expense/getAll/{storeId}/{offset}`: Read a page of expenses for a store. (api:read)
- `GET /inventory/api/v1/expense/getBillNumber/{storeId}`: Read expense bill-number information for a store. (api:read)
- `GET /inventory/api/v1/expense/isBillNumberPresent/{storeId}/{billNumber}`: Check whether an expense bill number is already present in a store. (api:read)
- `GET /inventory/api/v1/expenseCategory/getAll/{businessId}/{offset}`: Read a page of business expense categories. (api:read)
- `GET /inventory/api/v1/extraChargeType/list/{businessId}`: List extra-charge types available to the business. (api:read)
- `GET /inventory/api/v1/store/getOpeningBalance/{storeId}`: Read opening-balance information for a store. (api:read)
- `POST /inventory/api/v1/storeBill/getNewBillNumber`: Read the bill-number preview using the existing store billing configuration. (api:read)
- `POST /inventory/api/v1/storeBill/validate`: Validate a bill number using the existing billing request contract. (api:read)
- `GET /inventory/api/v3/bulkTxn/{bulkTxnId}`: Read an existing entry by its bulk transaction ID. (api:read)

### Settings

- `GET /inventory/api/v1/billSetting/getTermsAndConditionAndAddNote/{businessId}`: Read business bill terms, conditions and notes. (api:read)
- `GET /inventory/api/v1/billTxnExtraInfoColumns/{businessId}`: Read the configured extra information columns for bills. (api:read)
- `GET /inventory/api/v1/business/{businessId}/currency`: Read the business currency configuration. (api:read)
- `GET /inventory/api/v1/business/{businessId}/inventory-mode`: Read the business inventory mode. (api:read)
- `GET /inventory/api/v3/business/getBusinessInfo/{businessId}`: Read business information for the authenticated business. (api:read)

### Reports

- `GET /inventory/api/v1/entry/{bulkTxnId}/profit-breakdown`: Read the historical profit breakdown for an entry, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/batch-expiry-date`: Read the batch expiry report using the supplied date and store filters. (api:read)
- `GET /inventory/api/v1/report/category-wise-profit`: Read profit grouped by item category, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/date-wise-profit`: Read profit grouped by date, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/item-wise-profit`: Read profit grouped by item, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/job-work-issue-register`: Read the job-work material issue register. (api:read)
- `GET /inventory/api/v1/report/job-work-material-with-worker`: Read job-work material currently held with workers. (api:read)
- `GET /inventory/api/v1/report/job-work-order-register`: Read the job-work order register. (api:read)
- `GET /inventory/api/v1/report/job-work-order-summary`: Read the job-work order summary using the supplied filters. (api:read)
- `GET /inventory/api/v1/report/job-work-processing-charges`: Read job-work processing charges using the supplied filters. (api:read)
- `GET /inventory/api/v1/report/job-work-receipt-register`: Read the job-work receipt register. (api:read)
- `GET /inventory/api/v1/report/job-work-worker-outstanding`: Read outstanding job-work balances by worker. (api:read)
- `GET /inventory/api/v1/report/manufactured-entry-list`: Read the manufactured-entry report using the supplied filters. (api:read)
- `GET /inventory/api/v1/report/manufactured-entry-summary`: Read the manufactured-entry summary using the supplied filters. (api:read)
- `GET /inventory/api/v1/report/order-fulfillment`: Read order fulfillment using live linked-entry information. (api:read)
- `GET /inventory/api/v1/report/party-wise-profit`: Read profit grouped by party, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/profit-loss-report`: Read the profit and loss report, subject to financial-access permissions. (api:read)
- `GET /inventory/api/v1/report/recipe-bom-summary`: Read the recipe and bill-of-materials summary. (api:read)
- `GET /inventory/api/v1/report/sales-bill-profit-report`: Read profit by sales bill, subject to profit-access permissions. (api:read)
- `GET /inventory/api/v1/report/stock-adjustment-reason-wise`: Read stock adjustments grouped by adjustment reason. (api:read)
- `GET /inventory/api/v1/report/stock-reOrder-report`: Read the stock reorder report using the supplied store filters. (api:read)
- `GET /inventory/api/v2/party/globalReport/{businessId}`: Read the business party summary using the v2 report contract. (api:read)
- `GET /inventory/api/v3/party/globalReport/{businessId}/{offset}`: Read a page of the business party summary using the v3 contract. (api:read)
- `GET /inventory/api/v5/party/globalReport/{businessId}`: Read the business party summary using the v5 report contract. (api:read)

### Manufacturing

- `GET /inventory/api/v1/job-work-issues/{id}`: Read a job-work material issue by ID. (api:read)
- `GET /inventory/api/v1/job-work-orders`: List job-work orders using the supplied filters. (api:read)
- `POST /inventory/api/v1/job-work-orders`: Create a job-work order using the existing job-work workflow. (api:write)
- `DELETE /inventory/api/v1/job-work-orders/{id}`: Delete a job-work order when its current state permits deletion. (api:write)
- `GET /inventory/api/v1/job-work-orders/{id}`: Read a job-work order by ID. (api:read)
- `PATCH /inventory/api/v1/job-work-orders/{id}`: Update editable fields on an existing job-work order. (api:write)
- `POST /inventory/api/v1/job-work-orders/{id}/cancel`: Cancel a job-work order when its current state permits cancellation. (api:write)
- `POST /inventory/api/v1/job-work-orders/{id}/close`: Close a job-work order using the existing close workflow. (api:write)
- `GET /inventory/api/v1/job-work-orders/{id}/material-balance`: Read the material balance for a job-work order. (api:read)
- `GET /inventory/api/v1/job-work-orders/{orderId}/issues`: List material issues linked to a job-work order. (api:read)
- `GET /inventory/api/v1/job-work-orders/{orderId}/receipts`: List receipts linked to a job-work order. (api:read)
- `GET /inventory/api/v1/job-work-receipts/{id}`: Read a job-work receipt by ID. (api:read)
- `GET /inventory/api/v1/job-work-settings/{storeId}`: Read job-work settings for a store. (api:read)
- `GET /inventory/api/v1/manufacturing-processes`: List manufacturing process templates; this does not record production. (api:read)
- `POST /inventory/api/v1/manufacturing-processes`: Create a manufacturing process template, not a stock or production entry. (api:write)
- `DELETE /inventory/api/v1/manufacturing-processes/{id}`: Delete a manufacturing process template when its dependencies permit deletion. (api:write)
- `GET /inventory/api/v1/manufacturing-processes/{id}`: Read a manufacturing process template by ID. (api:read)
- `PUT /inventory/api/v1/manufacturing-processes/{id}`: Update a manufacturing process template while preserving its revision workflow. (api:write)
- `GET /inventory/api/v1/manufacturing-processes/{id}/versions/{version}`: Read a saved manufacturing process revision. (api:read)

### Parties

- `GET /inventory/api/v1/party/getParty/{businessId}`: Read the business party list using the existing list filters. (api:read)
- `GET /inventory/api/v1/party/getPartyInfo/{businessId}/{partyId}`: Read party information within the business. (api:read)
- `GET /inventory/api/v1/party/getPartyListPaginated/{businessId}/{offset}/{filter}`: Read a filtered page of business parties. (api:read)
- `GET /inventory/api/v1/party/{partyId}/getAddresses`: List the addresses associated with a party. (api:read)
- `POST /inventory/api/v1/partyPrice/createOrUpdate`: Create or update a party-specific item price. (api:write)
- `GET /inventory/api/v1/partyPrice/getByBusinessId/{businessId}`: List party-specific prices for the business. (api:read)
- `GET /inventory/api/v1/partyPrice/validate/{partyId}/{stockItemId}/{businessId}`: Validate the party-specific price configuration for an item. (api:read)

The OpenAPI schema lists every route, field and the required scope (x-required-scope): https://inventory-api.stockregister.in/inventory/v1/public/openapi3.json

## Writing stock safely

- Map product names to exact store and item IDs before writing.
- Have the agent show store, item, quantity, direction and reference, and get the owner's confirmation before posting.
- Use the actual movement time and the agreed rate. A missing rate is recorded as zero and affects stock valuation.
- Use one stable clientRequestId per intended movement and save the returned entry ID.
- If a response is lost, reconcile before retrying. Record a physical return as a separate stock IN; cancel an entry only to correct a wrong posting.
- Test with reads first. Writes change real stock, so agree which items and store to use before any write test.

## Example workflows

### Check stock

Prompt: "How many LED bulbs 9W are in Godown 2?"

1. Lists stores and picks Godown 2
2. Pages items in that store and matches LED bulb 9W
3. Reads the item's current quantity

Result: LED bulb 9W · Godown 2 · 40 pcs available. A snapshot at the time of the request.

### Record a dispatch

Prompt: "Record 10 LED bulbs 9W dispatched from Godown 2 for Order 123."

1. Resolves exact store and item IDs
2. Shows a preview: OUT · 10 pcs · Godown 2 · Order 123
3. Owner confirms, then posts with a clientRequestId

Result: Stock adjustment posted · entry ID returned. Writes change real stock. The confirmation step lives in your agent's configuration.

## Manage or disconnect

- Rotate the secret to replace it, then update the agent's stored credentials. Rotation invalidates earlier tokens.
- Revoke the integration when you retire the agent.
- Token exchange and API calls need an active Advance Pro or Manufacturing Pro plan, or the free trial (standard or Pro trial).

## Troubleshooting

- **SUBSCRIPTION_REQUIRED:** The business isn't on an active Advance Pro or Manufacturing Pro plan or the free trial. Calls work again once the plan is active; see pricing.
- **INVALID_CREDENTIAL:** The client ID or secret is wrong, or the secret was rotated. Copy the current values from Settings → Inventory API.
- **401 on a business call:** The access token expired. Exchange the client ID and secret again before expires_in runs out.
- **403 on a stock adjustment:** The integration only has Read only. Turn on Read and modify, then request api:write together with api:read.
- **403 on a route listed here:** The integration was created before every route was switched on. Rotating the secret doesn't upgrade it; create a new integration in Settings → Inventory API.
- **RESOURCE_NOT_FOUND:** The store or item ID isn't in this business or was deleted. List stores and items again and use the exact IDs.
- **INTEGRATION_LIMIT:** A business can have up to 20 integrations. Revoke one you no longer use.
- **RATE_LIMITED or CAPACITY_EXHAUSTED:** Wait briefly and retry reads. For writes, reconcile with your clientRequestId before retrying.
- **Stock value looks wrong after an adjustment:** It was posted without a rate, so it was valued at zero. Cancel it and post again with the agreed rate.

## FAQ

### Can I connect any AI agent to my inventory?

The agent needs configurable HTTPS actions and a secure place to store credentials. If your agent platform cannot do that directly, a small server-side connector can provide the actions.

### Do I share my Stock Register login?

No. The agent uses the dedicated client ID and secret from Settings → Inventory API. Your OTP or Google sign-in only verifies that you own the business.

### Can I limit the agent to one store?

A credential covers every store in the business. Tell the agent which store to work with, and give it read-only access if it only answers stock questions.

### Who can create Inventory API credentials?

The business owner, on an active Advance Pro or Manufacturing Pro plan or during the 7-day free trial, which has full access. A business on another paid plan, such as Basic Plus or Advance Plus, needs to move to Advance Pro or Manufacturing Pro first. If you get stuck, WhatsApp us; we usually reply within 10 minutes.

### How do I test an AI inventory agent without changing real stock?

Start with Read only and check a few items against your dashboard. When you turn on stock adjustments, test on the free-trial business or a test item, and cancel the test adjustment afterwards.

### How live is the stock data an AI agent reads?

Each read returns the quantity at the time of the request, including entries made a moment ago in the app. Agents should read again before acting rather than reuse an old answer.

### Can an AI agent sync stock with my online store?

Yes. Your automation can read available quantity per store on a schedule and update your listings, and post a stock OUT adjustment when an order ships. Keep to the rate limits and reconcile before retrying writes.

## Agent credits and pricing

One balance per business is shared by ChatGPT, Claude and the Inventory API. Only successful actions are charged.

- 7-day free trial: 1,000 agent credits included, once.
- Advance Pro: 10,000 agent credits every month.
- Manufacturing Pro: 10,000 agent credits every month.

- Look up an item, party or invoice: 1 credit.
- List or ledger page: 2 credits.
- Summary report, 1 day: 5 credits.
- Summary report, 7 days: 10 credits.
- Summary report, 30 days: 25 credits.
- Stock entry, order, transfer or adjustment: 5 credits.
- GST or non-GST invoice: 10 credits.
- Setup, balance checks and safe retries: Free.
- Same report again within 3 minutes: Free.

Credit packs are one-time purchases, never expire and exclude GST: 10,000 credits for ₹199; 50,000 credits for ₹799; 150,000 credits for ₹1,999.

Human pricing details: https://www.stockregister.in/ai-inventory-management#plans
Full Markdown pricing: https://www.stockregister.in/ai-inventory-management.md
Credit pricing does not expand either channel's documented tools, scopes or store permissions.


Last updated: 24 November 2026
