Skip to content

malformed_json

Malformed JSON

HTTP status400 Bad Request
Returned byInvoicing API (/v1, API keys)
Console
Flashpi’s internal backoffice (staff only)
typeEnglish (default): https://flashpi.com.ec/docs/en/errors/malformed_json
Spanish (Accept-Language: es): https://flashpi.com.ec/docs/errors/malformed_json
It changes with the language of the answer: branch on code.
Retry?No: the same request gets the same answer. Change the request, or the state of what it acts on, first.

What to do

  • The body is not valid JSON. Build it with your language’s JSON serializer instead of concatenating strings, and send it as UTF-8 with Content-Type: application/json.
  • Common causes: a trailing comma, single quotes, an unescaped quote or line break inside a string, or a body cut short.

Texts of the answer

The title and detail of the answer, in English by default and in Spanish when the Accept-Language entry with the highest priority (q) is es or es- plus a region, such as es-EC. A detail can be more specific than this one, and {name} marks a value of each occurrence.

Languagetitledetail
English (default)Malformed JSONThe request body is not valid JSON.
Spanish (Accept-Language: es)JSON mal formadoEl cuerpo de la solicitud no es un JSON válido.