# Detailed response

DFINERY Import API determines the success or failure of a request through HTTP response code and detailed response code. **Even if the HTTP response code is 200, the request may fail.**

### HTTP response codes <a href="#http" id="http"></a>

| Response Code             | Explanation                                                                                                                                                                         |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200 - OK`                | The request was successfully received by the server.                                                                                                                                |
| `400 - Bad Request`       | The request could not be processed. This is the response returned when a required parameter was not sent or the parameter format is incorrect. Please check the request parameters. |
| `429 - Too Many Requests` | An unusually high number of requests have been sent. Please try again later.                                                                                                        |
| `500 - Server Error`      | An error occurred inside the server.                                                                                                                                                |

### Detailed response code <a href="#undefined" id="undefined"></a>

If an API call fails, you can get detailed information about the error via the detailed response code.

<table><thead><tr><th width="79">Response Code</th><th width="128">Code</th><th width="203">Message</th><th>Explanation</th></tr></thead><tbody><tr><td>200</td><td>20000</td><td><code>OK</code></td><td>Request successful</td></tr><tr><td>200</td><td>40000</td><td><code>BAD_REQUEST</code></td><td>Invalid request</td></tr><tr><td>200</td><td>40001</td><td><code>VALIDATION_FAILURE</code></td><td>Verification failed</td></tr><tr><td>200</td><td>40101</td><td><code>INVALID_SERVICE_ID</code></td><td>Invalid service ID</td></tr><tr><td>200</td><td>40201</td><td><code>INVALID_TOKEN</code></td><td>Invalid token provided</td></tr><tr><td>200</td><td>40401</td><td><code>TOO_MANY_REQUEST</code></td><td>API usage limit exceeded</td></tr><tr><td>200</td><td>40402</td><td><code>TOO_MANY_EVENTS</code></td><td>Number of events in request exceeded</td></tr><tr><td>200</td><td>40403</td><td><code>TOO_MANY_USER_PROFILES</code></td><td>Exceeded number of user profiles in a single request</td></tr><tr><td>200</td><td>50000</td><td><code>INTERNAL_SERVER_ERROR</code></td><td>An internal server error occurred</td></tr></tbody></table>

## Example response

### 20000 OK

<pre class="language-json"><code class="lang-json">200 OK
<strong>{
</strong>  "status": true,
  "code": 20000,
  "message": "OK",
  "data": null 
}
</code></pre>

### 40001 VALIDATION\_FAILURE

<pre class="language-json"><code class="lang-json">200 OK
<strong>{
</strong>  "status": false,
  "code": 40001,
  "message": "VALIDATION_FAILURE",
  "data": null 
}
</code></pre>

### 50000 INTERNAL\_SERVER\_ERROR

```json
200 OK
{
  "status": false,
  "code": 50000,
  "message": "INTERNAL_SERVER_ERROR",
  "data": null 
}
```
