BizKitHub
PUBLIC_EMAILER_BODY_REQUIRED

Send either htmlBody (with subject) or templateCode.

Z BizKitHub Docs, referencia chybových kódov API

Názvy a popisy kódov udržiavame v angličtine.

HTTP 400Verejné 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.

Ako to vyriešiť

  1. 1

    Remove `htmlBody` when sending by `templateCode`.

  2. 2

    Send `subject` together with `htmlBody`.

Ukážka odpovede

API odpovie statusom HTTP 400 a telom vo formáte JSON. Porovnávajte errorCode, nie message. Správy sa môžu preformulovať, kódy zostávajú rovnaké.

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"
}