Get one document
frappe_get_docRetrieve a complete Frappe DocType record by exact doctype and document name when the ID is known; returns all stored fields and nested child tables, respecting user permissions.
Instructions
Retrieve one complete document (a single DocType record) by its exact doctype and document name.
Use when the document's name is already known, such as 'SINV-00001'. Use frappe_search_docs instead to find documents by field value, to fetch many records, or to return only a few fields; use frappe_run_method for values that are computed rather than stored on the document.
Behavior: read-only and idempotent, with no side effects. Returns the document in whatever state it is stored — draft, submitted or cancelled — without filtering. Results respect the API user's role permissions: a document that exists but is not permitted raises a permission error, while an unknown doctype or name raises a not-found error.
Parameters: doctype and name are both case-sensitive and must match Frappe exactly. name is the primary key from the list view, not a title — for DocTypes using a naming series it looks like 'SINV-00001', and only for DocTypes named by field does it equal a human-readable value such as a customer name.
Returns: {"data": {...}} containing every stored field, with child tables nested as arrays of row objects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The unique document name or ID to retrieve (e.g. 'SINV-00001', 'CUST-00001', 'ITEM-00001', 'Administrator'). This is the `name` primary key shown in the Frappe list view or document form, not a title or description field. | |
| doctype | Yes | The target DocType name (e.g. 'Sales Invoice', 'Customer', 'Item', 'Sales Order', 'Purchase Order', 'User'). Case-sensitive and must match the DocType exactly as defined in Frappe. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | A Frappe document. Keys are DocType fieldnames; child tables appear as arrays of row objects. Always includes `name` (the primary key), `owner`, `creation`, `modified` and `docstatus` (0 = draft, 1 = submitted, 2 = cancelled). |