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.
settings:readGrant 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
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.