> For the complete documentation index, see [llms.txt](https://everyday-digital.gitbook.io/falkor-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://everyday-digital.gitbook.io/falkor-dev-docs/overview/responses.md).

# Responses

### API Standard Responses

Our success and error responses have a consistent structure so that **integrations to endpoints** only have a **binary** path. The response is either successful, or there was an error.

### Success

Our success responses will always be in the following format (unless explicitly documented differently on certain calls).

<table data-header-hidden><thead><tr><th width="188.45225446209741">Key</th><th>Type</th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Type</strong></td></tr><tr><td><strong>header</strong></td><td>200 OK</td></tr><tr><td><strong>status</strong></td><td>String (success)</td></tr><tr><td><strong>data</strong></td><td>Array / Object / String (The endpoint response payload)</td></tr><tr><td><strong>hash</strong></td><td>String (A unique hash of the data response)</td></tr><tr><td><strong>response_time</strong></td><td>Float (How long the API call took in seconds)</td></tr></tbody></table>

### Handling a response example

Our recommended implementation of a response is shown in the following example (done in basic syntax for simplicity):

```
if (response.status == "success"){
 // Do something with the data
 let data = response.data;
}
else{
 // Something went wrong.
 console.log(response.message);
}
```

### Error

Our error responses will always contain a "message" and "status". Header errors follow standard set at <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>

| **Key** | **Type**                               |
| ------- | -------------------------------------- |
| header  | 400 - 500                              |
| status  | String (error)                         |
| message | String (A message detailing the error) |
