Skip to main content

Send Templated Email

POST 

/api/store-email-templates/send

Send an email to the customer (sales order) or supplier (purchase order, vendor credit) using a store email template.

Required scope: settings:write

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

Authentication: Requires Bearer token.

Body fields:

  • order_type (required): SalesOrder | PurchaseOrder | VendorCredit
  • order_id (required): ID of the record to email
  • subject (required): rendered subject line
  • html_body (required): rendered HTML email body
  • cc (optional): array of CC email addresses (null/blank entries are dropped)
  • attachments (optional): array of document keys to attach (resolved per the entity's attachable-documents registry)
  • store_id (optional): ID of the store whose email address is used as the sender ("from"). When omitted, falls back to the record's own store, then the tenant's default (oldest active) store.

Errors:

  • 422 store_sender_missing: no store with a sender email address is configured. The error payload includes errors.store[0].data.configure_route pointing to where stores are managed.

Request

Responses

OK

Response Headers
    Content-Type