Skip to main content

List Email Template Sample Records

GET 

/api/store-email-templates/sample-records

Lists recent real records (newest first, 10 per page) of a template context that a preview or test send can be rendered against.

Required scope: settings:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Supported contexts: sales_order, bulk_sales_order, purchase_order, sales_credit, vendor_credit, bulk_purchase_order (suppliers), warehouse_transfer. Other contexts return an empty page — they preview with sample data only.

Each row carries reference (the record's number) and label — the customer or supplier name when the record has one, otherwise the reference. label is never null.

Scopes: API tokens need settings:read plus the read scope of the context's own records, since the rows expose them (sales_order / bulk_sales_order / sales_credit → orders:read; purchase_order → purchase-orders:read; vendor_credit → accounting:read; bulk_purchase_order → suppliers:read; warehouse_transfer → warehouses:read). A token without it gets 403 insufficient_scope naming the missing scope. Contexts without real records need no extra scope.

Request​

Responses​

OK

Response Headers
    Content-Type