ERP

On this page

ERPNext

A test-only Frappe REST subset for ERPNext customers, items and sales orders. Create ERPNext under Systems → ERP. No ERPNext server, ledger, inventory, invoice or customer notification is affected.

Testlie is independent of Frappe/ERPNext. Names identify API compatibility, not endorsement or certification.

Connect

Replace your ERPNext host with the system's base URL and send:

text
Authorization: token <apiKey>:<apiSecret>
Content-Type: application/json

Use the test key/secret shown in the system. GET /api/method/frappe.auth.get_logged_user returns the test integration user. Cookie login, OAuth, real user permissions and arbitrary whitelisted methods are outside this subset.

DocTypes

DocType Inputs
Customer Required customer_name; optional customer_type (Company/Individual), group, territory and contact fields
Item Required item_code; optional item_name, group, unit and nonnegative standard_rate
Sales Order Existing customer, configured test company, dates/currency/reference and items

Use /api/resource/{doctype} to POST/GET and /api/resource/{doctype}/{name} to GET/PUT/DELETE. URL-encode DocTypes and names, including Sales%20Order. Creation and updates return { "data": { ... } }; delete returns { "message": "ok" }.

Customer names and item codes become their unique test record names. Sales orders receive SAL-ORD-... names. Create customers and items before order creation:

json
{
  "customer": "Sample Company", "company": "Testlie Company",
  "items": [{ "item_code": "TEST-PART", "qty": 2, "rate": 15 }]
}

The company must match the system's configured test company. Item rows reference existing test items; positive quantities and nonnegative rates determine totals rounded to two decimals. Rates default from the test item. Dates default to today. Default group/territory/unit strings are fixtures, without a simulated configuration database. Taxes, shipping, currencies, warehouses and accounting are not computed.

Submit and cancel

New orders have docstatus: 0 and status: "Draft". Save draft changes with PUT. Then POST { "doc": <the stored order returned by GET> } to /api/method/frappe.client.submit. Successful test submission sets docstatus: 1 and status: "To Deliver and Bill" without creating financial or inventory entries.

POST { "doctype": "Sales Order", "name": "..." } to /api/method/frappe.client.cancel to set docstatus: 2 and status: "Cancelled". Submitted/cancelled orders are immutable; cancel a submitted order before deleting it. Referenced customer/item records cannot be deleted. Other document workflows are unsupported.

An optional modified value on PUT is checked against the current timestamp. Stale values return a TimestampMismatchError. Atomic compare-and-swap also prevents concurrent writes from silently overwriting each other.

Listing and limits

Collection GET supports JSON fields (default ["name"], or ["*"]), JSON filters as a scalar dictionary or up to twelve [field, =/!=/in, value] conditions, order_by with one field, limit_start (0–1000) and limit_page_length/limit (1–500, default 20). Query expansion, OR filters, SQL expressions and arbitrary DocTypes are rejected.

Shared rate-limit, server-error and delay scenarios apply; Decline rejects creates/updates and transitions. No native webhook/event delivery or interactive Require action exists. Do not configure a webhook URL for this provider.

At most 500 records per DocType, 100 item rows per order and 128 KB per request. The shared store scans the newest 1,000 records across types; keep fixtures small. Plan retention and object limits apply. Use test data only.

Contracts: Frappe REST API, client submit/cancel methods and ERPNext Sales Orders.