fastify-x-signwell
xsignwell.templates.getRecipients
Retrieve the recipient placeholder definitions from a SignWell template.
xsignwell.templates.getRecipients
Retrieve the recipient placeholder definitions from a SignWell template. Returns an empty array if no recipients are defined.
Signature
fastify.xsignwell.templates.getRecipients(templateId: string): Promise<Array>
Params
| Name | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | The SignWell template ID. |
Returns
An Array of recipient placeholder objects from the template, or [] if none are defined.
Throws
[xSignwell] templates.getRecipients: templateId (string) is required— iftemplateIdis missing.- Re-throws SignWell API errors with
statusCodeandsignwellErrorproperties.
Examples
Inspect recipient placeholders on a template
const placeholders = await fastify.xsignwell.templates.getRecipients("tmpl_abc123");
// [{ id: "signer_1", name: "Customer" }]
See also
- templates.get — fetch the full template object
- templates.getFields — retrieve field definitions
- documents.createFromTemplate — map real recipients to placeholders when creating a document
AI Context
package: "@xenterprises/fastify-xsignwell"
method: fastify.xsignwell.templates.getRecipients(templateId)
use-when: Inspect the recipient placeholder definitions on a SignWell template before creating a document from it
returns: Array of recipient placeholder objects, or [] if none
