Skip to main content
POST
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Path Parameters

email_template_id
string
required

The template key with dots

Body

application/json
language
string

A language code, or any (the default) for the version every language uses.

Example:

"any"

subject
string | null

An unsaved subject, in place of the current one.

Example:

"Your order {{ order.number }} is confirmed"

body
string

An unsaved body, in place of the current one.

Example:

"<mj-section><mj-column><mj-text>Thanks, {{ order.customer_name }}!</mj-text></mj-column></mj-section>"

record_id
string

The record to build sample data from; the store's latest matching record otherwise.

Example:

"or_m3Rp9wXz"

email_key
string

For the layout or a partial, the email to show it in.

Example:

"spree.order_mailer.confirm_email"

branding
object

Unsaved colors and font to preview, named like the store's email_* settings.

mailer_logo_signed_id
string | null

An unsaved email logo: the signed id of an uploaded image, or null to preview without one.

Response

200 - application/json

email template rendered

id
string | null
required
subject
string
required
html
string
required
text
string
required
email_key
string
required
variables
object
required