ERPNext integration expert.
ERPNext is an open-source ERP built on the Frappe framework. It exposes a comprehensive REST API for every doctype, plus an RPC API for server-side methods.
Docs: https://frappeframework.com/docs/user/en/api
Authorization: token api_key:api_secret
Authorization: Basic base64(user:password)
curl -X POST https://site.example.com/api/method/login \
-d 'usr=user@example.com&pwd=password'
# Use returned cookies for subsequent requests
Never hardcode credentials. Use environment variables or secrets.
https://<site>/api/resource/<DocType>
https://<site>/api/method/<dotted.path>
GET /api/resource/Item?filters=[["item_group","=","Finished Goods"]]&fields=["name","item_name","item_group","stock_uom"]&limit_page_length=50&order_by=item_name asc
GET /api/resource/Item/ITEM-CODE-001
POST /api/resource/Item
Content-Type: application/json
{"item_code":"ITEM-001","item_name":"Item Name","item_group":"Finished Goods","stock_uom":"Nos"}
PUT /api/resource/Item/ITEM-001
Content-Type: application/json
{"description":"Updated description"}
Filters are JSON arrays: [field, operator, value]
| Operator | Meaning | Example |
|---|---|---|
= | Equals | ["item_group","=","Raw Material"] |
!= | Not equals | ["status","!=","Cancelled"] |
>, >=, <, <= | Comparison | ["qty",">",0] |
like | Wildcard match | ["item_name","like","%Oak%"] |
in | In list | ["status","in",["Open","In Process"]] |
between | Range | ["posting_date","between",["2026-01-01","2026-03-31"]] |
Multiple filters: [["item_group","=","Raw Material"],["stock_uom","=","Nos"]]
Item — Products, raw materials, sub-assemblies
BOM (Bill of Materials) — Recipe for manufacturing a product
Work Order — Production order
Job Card — Per-operation tracking
Workstation — Machine or station
Operation — Manufacturing step
Stock Entry — Inventory movements (issue, receipt, manufacture)
Quality Inspection — QC checks
Sales Order — Customer orders
Purchase Order — Supplier orders
Warehouse — Storage locations
Sales Order
→ Work Order (from BOM)
→ Job Card (per operation)
→ Stock Entry (material transfer)
→ Stock Entry (manufacture — finished goods in)
→ Quality Inspection
→ Delivery Note
→ Sales Invoice
POST /api/method/erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry
Content-Type: application/json
{"work_order":"WO-00045","purpose":"Material Transfer for Manufacture","qty":30}
| Method | Purpose |
|---|---|
frappe.client.get_count | Count documents matching filters |
frappe.client.get_list | List with server-side aggregation |
erpnext.stock.utils.get_stock_balance | Real-time stock balance |
erpnext.manufacturing.doctype.bom.bom.get_bom_items | Explode BOM |
erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry | Create stock entry from WO |
erpnext.selling.doctype.sales_order.sales_order.make_work_order | Create WO from SO |
["docstatus","=",1]fields=["items.item_code","items.qty"]limit_page_length=20. Set explicitly; use limit_page_length=0 for all (careful with large sets)name (ID) not item_name for record lookupsis_active=1 and is_default=1