Skip to content
Documentation for: Számlázz.hu API
HUuptools.io
Markdown

Responses and errors

JSON responses come in the same envelope. There are two exceptions: /openapi.json returns the description itself, without an envelope, and the PDF endpoints return the raw PDF when called with the Accept: application/pdf header.

{ "success": true, "data": { } }
{
"success": false,
"error": { "code": "SZAMLAZZ_3", "message": "Sikertelen bejelentkezés.", "httpStatus": 422, "details": {} }
}
Field Meaning
code The error code. Business errors from számlázz.hu come as SZAMLAZZ_<code>.
message A readable description.
httpStatus The HTTP status. Business errors from számlázz.hu come with 422.
details Additional data, for example the invalid fields.

For an invalid request (the body or the query does not match the description) the code is VALIDATION_ERROR, and the status is also 422.

Code Status Meaning
MISSING_AGENT_KEY 401 No Agent key was sent.
VALIDATION_ERROR 422 The request does not match the description.
SZAMLAZZ_<code> 422 számlázz.hu reported a business error. <code> is the számlázz.hu numeric code.
SZAMLAZZ_SDK_ERROR 502 A transport error occurred while reaching számlázz.hu, and it is not a business error.
NOT_FOUND 404 Unknown route.
METHOD_NOT_ALLOWED 405 The route does not support the method.
INTERNAL_ERROR 500 Any other server-side error.