canonical: https://jentic.com/apis/megaventory.com/megaventory

# Megaventory API

Jentic publishes the only available OpenAPI specification for Megaventory API, keeping it validated and agent-ready. Megaventory is a cloud ERP for SMBs covering inventory, order management, light manufacturing, and reporting. The API exposes 31 endpoints across products, sales orders, purchase orders, suppliers and clients, inventory locations, stock levels, documents, and product bundles. Use it to keep stock counts in sync between Megaventory and a storefront, push purchase orders generated by an agent, or build a unified inventory view across multiple warehouses.

## For AI agents

Manage Megaventory products, stock levels, sales orders, purchase orders, and suppliers so an agent can run the order-to-fulfilment loop programmatically.

## Scope

Does not handle payment processing, shipping label generation, or accounting general ledger - use for inventory, sales orders, purchase orders, and supplier and client records only.

## Capabilities

- Read product details, stock-on-hand, and batch numbers across inventory locations
- Update product master records including SKU, name, and tax category
- Create or update sales orders with line items, customer, and warehouse
- Create or update purchase orders against suppliers with expected receive dates
- Adjust inventory location stock by moving units between warehouses
- Manage supplier and client records used by sales and purchase orders
- Bundle products together as kit SKUs that automatically decrement components on sale

## Use cases

### Storefront-to-ERP Stock Sync

Keep Megaventory's stock-on-hand in lockstep with a Shopify or WooCommerce storefront so the website never sells units that have already left the warehouse. The `/InventoryLocationStock/ProductStockUpdate` and `/Product/ProductGet` endpoints support a periodic two-way sync, and webhooks from the storefront can drive real-time decrements. Operations teams use this to prevent oversells without relying on a third-party middleware.

Example prompt: On every storefront order webhook, call ProductStockUpdate to decrement the corresponding Megaventory product stock at the fulfilment location.

### Purchase-Order Automation

Generate purchase orders automatically when stock falls below reorder point, including line items priced at the supplier's last-known cost. The `/PurchaseOrder/PurchaseOrderUpdate` endpoint accepts a full PO payload, and ProductGet provides the inputs needed to build the lines. Procurement teams use this to remove the manual reorder spreadsheet step.

Example prompt: List products with stock below reorder_point, build a purchase order per supplier with the appropriate line items, and call PurchaseOrderUpdate to create each PO.

### Multi-Warehouse Inventory Reporting

Build a single dashboard showing per-warehouse stock and pending sales orders by combining `/InventoryLocation/InventoryLocationGet`, `/InventoryLocationStock/InventoryLocationStockGet`, and `/SalesOrder/SalesOrderGet.` This gives operations a real-time view of where to fulfil from and which warehouses are over- or understocked. It replaces the nightly export-to-spreadsheet workflow that ERP-native dashboards usually require.

Example prompt: Pull all inventory locations and their stock levels along with open sales orders per warehouse, then render a per-location summary.

### Agent-Driven Order Intake

Hand a sales-ops agent the ability to capture an order from a chat or email and create it in Megaventory with the right customer, products, and warehouse. Through Jentic the agent searches by intent, loads the SalesOrderUpdate schema, and submits a structured payload - Megaventory returns the order id ready to track. This collapses copy-paste order entry into an autonomous step.

Example prompt: Given a customer email and a list of SKUs and quantities, look up the matching SupplierClient and Products, then call SalesOrderUpdate to create a sales order at the default warehouse.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/Product/ProductGet` | Read product master records |
| POST | `/Product/ProductUpdate` | Create or update a product |
| POST | `/SalesOrder/SalesOrderUpdate` | Create or update a sales order |
| POST | `/PurchaseOrder/PurchaseOrderUpdate` | Create or update a purchase order |
| POST | `/InventoryLocationStock/ProductStockUpdate` | Adjust stock for a product at a location |
| POST | `/InventoryLocationStock/InventoryLocationStockGet` | Read stock at an inventory location |
| POST | `/SupplierClient/SupplierClientUpdate` | Create or update a supplier or client record |
| POST | `/Product/ProductBundleUpdate` | Create or update a product bundle |

## Key resources

- **Product** — Manage product master data, bundles, and batch numbers
- **SalesOrder** — Create, update, and cancel sales orders with line items and customer references
- **PurchaseOrder** — Create, update, and cancel purchase orders against suppliers
- **InventoryLocation** — Manage warehouses and other stocking locations
- **InventoryLocationStock** — Read and update stock levels per product per location
- **SupplierClient** — Manage supplier and client records used by sales and purchase orders
- **Document** — Attach and update documents tied to orders and inventory transactions

## Why Jentic

- **Setup:** Wiring Megaventory by hand means passing its APIKEY query parameter and hand-coding each POST call against api.megaventory.com for products, sales orders, purchase orders, and stock. Through Jentic you install once, import the Megaventory API from the API Directory, store the APIKEY once, and your agent calls it.
- **Permission scoping:** Megaventory's operations carry their target in the request body rather than the URL path, so scope the agent to the operations it needs, such as reading products or updating a sales order. You choose the operations it may call, so a ProductUpdate or stock update runs only if you include it.
- **Credential handling:** Your Megaventory APIKEY is stored once, encrypted, by your own Jentic One instance and injected as the APIKEY parameter at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Megaventory sales order' or 'check stock at a location', and Jentic returns the matching operation with the schema for line items, customer code, and warehouse references so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify Admin API** — Shopify is the storefront that often drives sales orders into Megaventory.
- **Stripe API** — Stripe handles payment for orders that Megaventory tracks for fulfilment.
- **Zoho Inventory API** — Zoho Inventory is a similarly scoped SMB inventory and order platform.
- **Quickbase API** — Quickbase backs custom inventory and operations apps where a fixed ERP feels constraining.

## FAQ

### Why is there no official OpenAPI spec for Megaventory API?

Megaventory does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Megaventory API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Megaventory API use?

Megaventory uses an APIKEY parameter sent in the request body or query string. Through Jentic the key is stored encrypted in the vault and injected at execution time, so the agent never sees the raw value.

### Can I update stock levels through the Megaventory API?

Yes. `/InventoryLocationStock/ProductStockUpdate` adjusts on-hand quantities for a product at a chosen inventory location, and `/InventoryLocationStock/InventoryLocationStockUpdate` handles bulk location-level updates.

### What are the rate limits for the Megaventory API?

Megaventory does not document a hard numeric limit. In practice, batch product and stock updates rather than calling per-row, and back off on 429 or service-busy responses before retrying through Jentic.

### How do I create a sales order through Jentic?

Search Jentic for create a Megaventory sales order, load the schema for `/SalesOrder/SalesOrderUpdate`, and execute with the customer code, line items, and inventory location. Jentic returns the sales order id which you can read back via `/SalesOrder/SalesOrderGet.`

### Can I bundle products together as a kit?

Yes. The `/Product/ProductBundleUpdate` endpoint defines a bundle SKU whose components are tracked individually, so selling the bundle decrements the stock of each component product automatically.

### Can I limit what my agent is allowed to do with the Megaventory API?

Yes. Because you run Jentic One yourself and set the rules, you decide which Megaventory operations the agent may call, so it can read product and stock data without ever being able to write. For example, you can allow `/Product/ProductGet` and `/InventoryLocationStock/InventoryLocationStockGet` while withholding `/Product/ProductUpdate`, `/SalesOrder/SalesOrderUpdate`, or `/InventoryLocationStock/ProductStockUpdate.` Since Megaventory carries the target in the request body rather than the URL path, a stock update or purchase order runs only if you include that operation in the agent's allowed set.
