Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 2.0!

Handling errors

Errors

Upodi use conventional HTTP response codes to indicate success or failure of an API request.

Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully (e.g. a card is declined), we return a 402 error code.

Attributes

code

always

HTTP status code as indicated in the table to the left.

body

optional

A human-readable message in JSON format, providing more details about the error.

A summary of the HTTP status codes and what they represent is listed here.

HTTP status code summary

200 - OK

Everything worked as expected.

201 - Created

Object created. ID of object can be found in body.

204 - No content

The resource have been executed.

206 - Created

The resource have been created. You may find data in the response of the newly created entity.

400 - Bad Request

The request was unacceptable, often due to missing a required parameter.

401 - Unauthorized

No valid API key provided and/or conducting a request with a wrong scope of the provided API key.

402 - Request Failed

The parameters were valid but the request failed.

403 - Forbidden

The current API key does not provide proper access scope (READ or WRITE).

404 - Not Found

The requested resource doesn't exist.

409 - Conflict

The request conflicts with another request (perhaps due to using the same idempotent key).

422 - Unprocessable entity

Entity is likely a duplicate or already exists. Please check body for error code. Usually a response of customer if accountnumber is duplicated.

500 - 506 (server errors)

Something went wrong on our end. (These are rare but recorded and will issue a system alert to operations ).