# Responses & Errors

{% hint style="info" %}
Our API uses standard HTTP codes to indicate if the request is successful or failed
{% endhint %}

Successful requests will return both a `“message”` and `“data”` field with a 2XX status code. Data can be represented by an object or array type.

```
{
    "message": "Response message",
    "data": {
       # Response should be here
    }
}
```

```
{
    "message": "Response message",
    "data": [
       # Response should be here
    ]
}
```

Unsuccessful requests will return a “message” field containing the error message, with 4XX or 5XX status code.

**Common error message**

```
{
    "message": "Error message."
}
```

**Error message with error id**

{% hint style="info" %}
If you experience issues or errors while using our service, we highly recommend that you contact us by providing the **`errorId`** that you get along with the error message. That way, our team can easily trace the issue
{% endhint %}

```
{
    "errors": {
        "errorId": <log_id:uuid>
    },
    "message": "Error message."
}
```

**Error message with error type**

```
{
   "errors":{
      "errorId": <log_id:uuid>,
      "errorType": <error_type:str>
   },
   "message": "Error message."
}
```

**Validation error**

```
{
    "errors": {
        "fieldName": [
            "Unknown field."
        ]
    },
    "message": "Input payload validation failed."
}
```
