Skip to content
Last updated

Validation Failed

The request is well-formed but contains invalid data or violates business rules. Check the errors array for details on each invalid field.

HTTP Status: 422 Unprocessable Entity

Error Codes

CodeDescription
missing_required_fieldA required field is missing
invalid_cpfThe CPF number is not valid
invalid_cnpjThe CNPJ number is not valid
kyc_incompleteCustomer KYC is not complete (cannot create loan)
offer_expiredThe credit offer has expired
simulation_mismatchLoan parameters do not match the simulation
amount_out_of_rangeRequested amount is outside the allowed range

Example Response

{
  "type": "https://api.dinie.com.br/errors/missing_required_field",
  "title": "Validation Error",
  "status": 422,
  "detail": "One or more required fields are missing.",
  "code": "missing_required_field",
  "errors": [
    {
      "code": "missing_required_field",
      "param": "cpf",
      "detail": "The cpf field is required."
    }
  ]
}

How to Resolve

  • missing_required_field -- Check the errors array for which fields are missing and include them.
  • invalid_cpf / invalid_cnpj -- Validate the document number locally before sending. CPF has 11 digits; CNPJ has 14.
  • kyc_incomplete -- Ensure the customer has completed all required KYC steps before creating a loan.
  • offer_expired -- Request a fresh credit offer. Offers have a limited validity window.
  • simulation_mismatch -- The loan amount, term, or other parameters must match the simulation exactly.
  • amount_out_of_range -- Check the offer's min_amount and max_amount and adjust your request.

See Also