erpnext-syntax-whitelisted
Installation
SKILL.md
ERPNext Syntax: Whitelisted Methods
Whitelisted Methods expose Python functions as REST API endpoints.
Quick Reference
Basic Whitelisted Method
import frappe
@frappe.whitelist()
def get_customer_summary(customer):
"""Basic API endpoint - authenticated users only."""
if not frappe.has_permission("Customer", "read"):
frappe.throw(_("Not permitted"), frappe.PermissionError)
return frappe.get_doc("Customer", customer).as_dict()