ReDoc documentation

custom-email/templates/{templateId}

custom-email/templates/{templateId}

Delete a custom email template by id. A template that is currently referenced by store configuration (e.g. assigned as a Sales email) cannot be deleted; the attempt is rejected as a 409 Conflict, mirroring the Admin behaviour. The template_id is matched against the current tenant's database only.

Request
path Parameters
templateId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

default

Unexpected error

delete/V1/custom-email/templates/{templateId}
Response samples
true

custom-email/templates/{templateId}

Retrieve a single custom email template by id, including its content and styles.

Request
path Parameters
templateId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

default

Unexpected error

get/V1/custom-email/templates/{templateId}
Response samples
{
  • "added_at": "string",
  • "modified_at": "string",
  • "template_code": "string",
  • "template_id": 0,
  • "template_styles": "string",
  • "template_subject": "string",
  • "template_text": "string",
  • "template_type": "string"
}

custom-email/templates/{templateId}

Update an existing custom email template by id. Partial (PATCH-like) update: only the fields present in the request are changed; omitted fields keep their stored value. template_code is mutable but must remain unique across templates. The strict-mode flag (is_legacy = 0) is enforced. The templateId is matched against the current tenant's database only, so a foreign id yields a 404 (no cross-tenant update). Returns the updated template.

Request
path Parameters
templateId
required
integer
Request Body schema:
required
object (custom-email-template-data-email-template-detail-interface)

Full custom email template DTO returned by the single-resource (detail) read. Extends the lean list DTO with the heavy content fields (template_text, template_styles) that the list endpoint deliberately omits. The WebAPI serializer renders fields from the declared return type, so exposing these here — and only here — keeps GET /V1/custom-email/templates a summary while GET /V1/custom-email/templates/{id} returns the complete template.

Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

default

Unexpected error

put/V1/custom-email/templates/{templateId}
Request samples
{
  • "template": {
    }
}
Response samples
{
  • "added_at": "string",
  • "modified_at": "string",
  • "template_code": "string",
  • "template_id": 0,
  • "template_styles": "string",
  • "template_subject": "string",
  • "template_text": "string",
  • "template_type": "string"
}