Skip to content

Response Codes & Errors

The Onward API returns semantic HTTP response codes that can be used to determine your next step.

CodeMeaningBody
200 OKThe request was processed successfulyResource as JSON
202 CreatedThe resource was createdResource as JSON
409 ConflictThe resource you're trying to create already existsEmpty
422 Unprocessable EntityInput did not pass validationValidation errors as JSON

Validation Errors

In the case of a 422 Unprocessable Entity, you can look to the JSON body for detail of the errors:

{
  "errors" => [
    "Amount insured doesn't match the calculation in 'purchased_quote_token'"
  ]
}