PUBLIC_EMAILER_BODY_REQUIREDSend either htmlBody (with subject) or templateCode.
Z BizKitHub Docs, dokumentacja kodów błędów API
Nazwy i opisy kodów prowadzimy po angielsku.
HTTP 400Publiczne 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 rozwiązać
- 1
Remove `htmlBody` when sending by `templateCode`.
- 2
Send `subject` together with `htmlBody`.
Przykładowa odpowiedź
API odpowiada statusem HTTP 400 i treścią w formacie JSON. Porównuj errorCode, nie message. Komunikaty mogą się zmieniać, kody pozostają stałe.
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"
}