# Response Codes and Error handling

## Response Codes <a href="#response-codes" id="response-codes"></a>

Our API services typically use following HTTP response codes and their meaning. Any deviations or additional details are described separately with each service reference.

<table><thead><tr><th width="152">CODE</th><th>Standard Meaning</th><th>Description</th></tr></thead><tbody><tr><td>200</td><td>OK</td><td>Typically response to a successful GET request.</td></tr><tr><td>202</td><td>Accepted</td><td>Typically response to a successful POST request.</td></tr><tr><td>204</td><td>No Content</td><td>Service responded successfully, but there is no content - typically empty GET /messages service response.</td></tr><tr><td>403</td><td>Forbidden</td><td>Authorization or authentication failure. Typical cases: certificate is not valid or expired, the service is not enabled for the customer or Client-Code and Client-Country headers are not valid for the <a data-mention href="service-provider-model">service-provider-model</a></td></tr><tr><td>404</td><td>Not Found</td><td>Resource is not found. Typically a specific message is already deleted or does not exist.</td></tr><tr><td><a data-footnote-ref href="#user-content-fn-1">429</a></td><td>Too many requests</td><td><a data-footnote-ref href="#user-content-fn-2">Too many requests in a given amount of time.</a></td></tr><tr><td>500</td><td>Internal Server Error</td><td>Technical error. Typically unplanned service interruption.</td></tr><tr><td>503</td><td>Service Unavailable</td><td>Technical error. Can also be used during planned maintenance</td></tr></tbody></table>

## Error Handling <a href="#error-handling" id="error-handling"></a>

In case of any errors our default structure of error details is following.

Service specific details of error codes and messages can be found at each service description.

<table><thead><tr><th width="97">INDEX</th><th width="95">MULT.</th><th width="157">ELEMENT</th><th width="149">XML TAG</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>1.0</td><td>[1..1]</td><td>Errors</td><td>&#x3C;Errors></td><td></td></tr><tr><td>1.1</td><td>[1..n]</td><td>+Error</td><td>&#x3C;Error></td><td></td></tr><tr><td>1.2</td><td>[1..1]</td><td>++ErrorCode</td><td>&#x3C;ErrorCode></td><td>For example, see list of Account Statement Request Error Codes.</td></tr><tr><td>1.3</td><td>[1..1]</td><td>++Description</td><td>&#x3C;Description></td><td>Description text.</td></tr><tr><td>1.4</td><td>[0..1]</td><td>++Field</td><td>&#x3C;Field></td><td>Reference to faulty field.</td></tr></tbody></table>

**Sample**

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Errors>
    <Error>
        <ErrorCode>errStatement_PeriodInvalid</ErrorCode>
        <Description>From date cannot be later than to date.</Description>
        <Field>FrDt</Field>
    </Error>
    <Error>
        <ErrorCode>NotNull</ErrorCode>
        <Description>Name can't be null</Description>
        <Field>Name</Field>
    </Error>
</Errors>
```

**General error codes**

[^1]:

[^2]:
