BizKitHub
PUBLIC_EMAILER_BODY_REQUIRED

Send either htmlBody (with subject) or templateCode.

Z BizKitHub Docs, reference chybových kódů API

Názvy a popisy kódů udržujeme v angličtině.

HTTP 400Veřejné API
`POST /emailer/send` needs exactly one source of content: a ready `htmlBody` with `subject`, or `templateCode` of the organisation's own template written in admin.

Jak to vyřešit

  1. 1

    Remove `htmlBody` when sending by `templateCode`.

  2. 2

    Send `subject` together with `htmlBody`.

Ukázka odpovědi

API odpoví statusem HTTP 400 a tělem ve formátu JSON. Porovnávejte errorCode, ne message. Zprávy se mohou přeformulovat, kódy zůstávají stejné.

application/json
{
  "state": "error",
  "code": 400,
  "message": "Send either htmlBody (with subject) or templateCode.",
  "errorCode": "PUBLIC_EMAILER_BODY_REQUIRED",
  "hint": "`POST /emailer/send` needs exactly one source of content: a ready `htmlBody` with `subject`, or `templateCode` of the organisation's own template written in admin.",
  "documentationUrl": "https://docs.bizkithub.com/errors/PUBLIC_EMAILER_BODY_REQUIRED"
}