Goods returns
Read the stored return-note PDF template
/a/GoodsReturned_templatePdfGet
Read the rn-template setting; this does not render or download a PDF.
When to use this endpoint
Use to inspect the stored template setting. The PDF wording in the endpoint name does not mean a generated document is returned.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. Session CSRF and account/IP restrictions still apply. These handlers add no goods-return, finance, department, owner or page-role permission check.
Records belong to the authenticated tenant. CRM1 shows this workflow when the employer features bit 262144 is enabled; CRM2 uses features2.goodsReturnedNotes. These are UI gates, not checks performed by these handlers.
Parameters
This endpoint has no operation-specific parameters.
Example request
FM_api('GoodsReturned_templatePdfGet', []);
Example response
""
The response is the setting value itself, not an object wrapper. The empty-string example represents an unset rn-template with no default file. Normally text is returned; settingGet decodes valid values beginning with { or [ into native JSON objects/arrays.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Reads the latest
rn-templatefrom tenant site_vars through settingGet. Blank/missing values fall back to settings/rn-template.txt if that file exists, otherwise "". No matching fallback file is present in this checkout. - settingGet trims text and can reuse its per-request/process cache and a 600-second settings-file cache. No type validation, template existence check or PDF generation takes place.
Side effects
- May populate the settings cache; no business-object write or file download.
See it in Fieldmotion
CRM1
No direct current caller found in the goods-return pages; those pages read header and line data, not this setting accessor.
CRM2
No direct current caller found in the mapped goods-return pages or widgets.