# Response Structure

## Sample Response Structure

For **Successful** requests : 200 OK

**Sample Response in JSON**

```json
{
  "status": true,
  "message": "string",
  "data": T
}
```

<table><thead><tr><th>Name</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>status
</code></pre></td><td>bool</td><td>The request status</td></tr><tr><td><pre><code>message
</code></pre></td><td>string</td><td>Successful response message</td></tr><tr><td><pre><code>data
</code></pre></td><td>object (optional)</td><td>Extra information feedback. For example, a create account request will return the account number and ID</td></tr></tbody></table>

{% hint style="warning" %}
**Note**: Postings include additional information in the response. Keep in mind that not every successful "OK" message indicates that the transaction was completed. For instance, a posting request might return a 200 OK (indicating technical success), but the posting response code could also indicate an Insufficient Funds error (a technical failure).
{% endhint %}

For **Failed** requests : 4XX and 5XX

**Sample Response in JSON**

```json
{
  "errors": [
    {
      "statusCode": 0,
      "errorCode": "string",
      "errorMessage": "string"
    }
  ]
}
```

<table><thead><tr><th>Name</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>errors</code></td><td>Array</td><td>This is an array of errors returned</td></tr><tr><td><code>statusCode</code></td><td>int</td><td>The http status code. For example 401, 500 etc</td></tr><tr><td><code>errorCode</code></td><td>string</td><td>custom status code.</td></tr><tr><td><code>errorMessage</code></td><td>string</td><td>The reason for the error</td></tr></tbody></table>
