{"openapi":"3.1.0","info":{"title":"ERPNext Frappe Cloud (BYOK) API","version":"0.1.0","description":"ERPNext Frappe Cloud (BYOK) lets an AI assistant read your own ERPNext Frappe Cloud data through the ERPNext Frappe Cloud API with a key you supply (API key and API secret joined by a colon, as api_key:api_secret). Read-only: 6 tools (get_logged_user, list_documents, list_recently_modified, list_documents_with_links, get_document, get_document_with_links). The BYOK key travels with each request,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-erpnext-frappe-cloud.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-erpnext-frappe-cloud/docs"},"termsOfService":"https://connectorbay.com/byok-erpnext-frappe-cloud/terms"},"servers":[{"url":"https://byok-erpnext-frappe-cloud.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-erpnext-frappe-cloud/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_logged_user":{"post":{"operationId":"get_logged_user","summary":"Show which user the API key and secret belong to (the email of the user the requests run as). Use for \"Which ERPNext use","description":"Show which user the API key and secret belong to (the email of the user the requests run as). Use for \"Which ERPNext user does my API key act as\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"}},"required":["site"],"title":"get_logged_userArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_documents":{"post":{"operationId":"list_documents","summary":"List documents of one DocType with the fields you ask for (JSON array), optional filters, sorting and paging. Runs with ","description":"List documents of one DocType with the fields you ask for (JSON array), optional filters, sorting and paging. Runs with the roles of the key's user. Use for \"List my 20 latest ERPNext Sales Invoices with customer and grand total\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"doctype":{"description":"Document type (DocType) to read, for example 'Customer' or 'Sales Invoice'.","enum":["Customer","Supplier","Item","Sales Invoice","Sales Order","Quotation","Purchase Invoice","Purchase Order","Payment Entry","Delivery Note","Lead","Opportunity","Project","Task","Issue","Warehouse","Item Group","Customer Group","Territory","Company","Account","Journal Entry"],"title":"Doctype","type":"string"},"fields":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":"[\"name\",\"creation\",\"modified\",\"docstatus\"]","description":"JSON array of field names to return, for example [\"name\",\"customer_name\",\"modified\"]. Only name is returned when omitted. Ask for fields that exist on the DocType.","title":"Fields"},"filters":{"anyOf":[{"maxLength":800,"type":"string"},{"type":"null"}],"default":null,"description":"JSON array of [field, operator, value] filters joined with AND, for example [[\"modified\",\">\",\"2026-01-01\"]].","title":"Filters"},"order_by":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Sort as 'fieldname asc' or 'fieldname desc', for example 'modified desc'.","title":"Order By"},"limit_start":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging.","title":"Limit Start"},"limit_page_length":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records to return (1 to 200; the site default is 20).","title":"Limit Page Length"}},"required":["site","doctype"],"title":"list_documentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_recently_modified":{"post":{"operationId":"list_recently_modified","summary":"List the most recently modified documents of one DocType (newest first) with name, creation and modification time. Use f","description":"List the most recently modified documents of one DocType (newest first) with name, creation and modification time. Use for \"What ERPNext Sales Orders changed most recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"doctype":{"description":"Document type (DocType) to read, for example 'Customer' or 'Sales Invoice'.","enum":["Customer","Supplier","Item","Sales Invoice","Sales Order","Quotation","Purchase Invoice","Purchase Order","Payment Entry","Delivery Note","Lead","Opportunity","Project","Task","Issue","Warehouse","Item Group","Customer Group","Territory","Company","Account","Journal Entry"],"title":"Doctype","type":"string"},"fields":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":"[\"name\",\"creation\",\"modified\",\"docstatus\"]","description":"JSON array of field names to return.","title":"Fields"},"order_by":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":"modified desc","description":"Sort order; keep the default for newest first.","title":"Order By"},"limit_page_length":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records to return (1 to 200; the site default is 20).","title":"Limit Page Length"}},"required":["site","doctype"],"title":"list_recently_modifiedArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_documents_with_links":{"post":{"operationId":"list_documents_with_links","summary":"List documents of one DocType and expand the named link fields into their linked records (expand takes a JSON array of l","description":"List documents of one DocType and expand the named link fields into their linked records (expand takes a JSON array of link field names). Use for \"List ERPNext Sales Invoices with the customer record expanded\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"doctype":{"description":"Document type (DocType) to read, for example 'Customer' or 'Sales Invoice'.","enum":["Customer","Supplier","Item","Sales Invoice","Sales Order","Quotation","Purchase Invoice","Purchase Order","Payment Entry","Delivery Note","Lead","Opportunity","Project","Task","Issue","Warehouse","Item Group","Customer Group","Territory","Company","Account","Journal Entry"],"title":"Doctype","type":"string"},"expand":{"description":"JSON array of link field names to expand, for example [\"customer\"].","maxLength":300,"title":"Expand","type":"string"},"fields":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":"[\"name\",\"creation\",\"modified\",\"docstatus\"]","description":"JSON array of field names to return, for example [\"name\",\"customer_name\",\"modified\"]. Only name is returned when omitted. Ask for fields that exist on the DocType.","title":"Fields"},"filters":{"anyOf":[{"maxLength":800,"type":"string"},{"type":"null"}],"default":null,"description":"JSON array of [field, operator, value] filters joined with AND, for example [[\"modified\",\">\",\"2026-01-01\"]].","title":"Filters"},"limit_start":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging.","title":"Limit Start"},"limit_page_length":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records to return (1 to 200; the site default is 20).","title":"Limit Page Length"}},"required":["site","doctype","expand"],"title":"list_documents_with_linksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_document":{"post":{"operationId":"get_document","summary":"Get one document by DocType and name with all its fields and child tables as the site returns them. Use for \"Show ERPNex","description":"Get one document by DocType and name with all its fields and child tables as the site returns them. Use for \"Show ERPNext Customer CUST-0001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"doctype":{"description":"Document type (DocType) to read, for example 'Customer' or 'Sales Invoice'.","enum":["Customer","Supplier","Item","Sales Invoice","Sales Order","Quotation","Purchase Invoice","Purchase Order","Payment Entry","Delivery Note","Lead","Opportunity","Project","Task","Issue","Warehouse","Item Group","Customer Group","Territory","Company","Account","Journal Entry"],"title":"Doctype","type":"string"},"name":{"description":"Document name (its ID), as returned in the name field of a list, for example 'CUST-0001'.","maxLength":140,"title":"Name","type":"string"}},"required":["site","doctype","name"],"title":"get_documentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_document_with_links":{"post":{"operationId":"get_document_with_links","summary":"Get one document with all link fields expanded into their linked records. Use for \"Show ERPNext Sales Invoice SINV-0001 ","description":"Get one document with all link fields expanded into their linked records. Use for \"Show ERPNext Sales Invoice SINV-0001 with customer details expanded\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Frappe Cloud site name: the part before .frappe.cloud, for example 'mycompany' for mycompany.frappe.cloud.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"doctype":{"description":"Document type (DocType) to read, for example 'Customer' or 'Sales Invoice'.","enum":["Customer","Supplier","Item","Sales Invoice","Sales Order","Quotation","Purchase Invoice","Purchase Order","Payment Entry","Delivery Note","Lead","Opportunity","Project","Task","Issue","Warehouse","Item Group","Customer Group","Territory","Company","Account","Journal Entry"],"title":"Doctype","type":"string"},"name":{"description":"Document name (its ID), as returned in the name field of a list, for example 'CUST-0001'.","maxLength":140,"title":"Name","type":"string"},"expand_links":{"description":"Must be True to expand link fields.","title":"Expand Links","type":"boolean"}},"required":["site","doctype","name","expand_links"],"title":"get_document_with_linksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}