Orders

Preview an order email

Render an email for an order without actually sending it. Useful for showing users a preview of the message that will be sent — for example in the order detail UI before confirming a manual send.

post/shop/orders/{orderId}/emails/preview

Request body

typestring required

The mailable type to preview.

contentstring

Optional custom message body to inject into the template. HTML is not permitted — submit plain text only.

paramsobject

Additional template parameters to pass through to the mailable — the available keys depend on the chosen type.

Example request

{
  "type": "BookingConfirmation",
  "content": "Looking forward to welcoming you on Saturday!"
}

Response

The email message was successfully retrieved.

Example response

{
  "data": {
    "from": "bookings@example-spa.com",
    "to": [
      "jane.doe@example.com"
    ],
    "subject": "Your booking is confirmed",
    "email_type": "BookingConfirmation",
    "html": "<html><body><p>Hi Jane, your booking on Saturday is confirmed.</p></body></html>\n"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.