> For the complete documentation index, see [llms.txt](https://book.xpresscover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.xpresscover.com/overview/api-requestresponse.md).

# API Request/Response

All requests are made using HTTP POST method. Request data is formatted in JSON format. Regardless of success/error response, data is **always** formatted in JSON format, HTTP status code **always** 200.

All API requests must contain "Content-Type: application/json" HTTP header. If there is no request parameter, the request body must contain an empty JSON object, "{}". Empty request body will result in error.

## Success Response Params

| **Name** | **Description**            | **Type**       |
| -------- | -------------------------- | -------------- |
| status   | Status                     | string ( 100 ) |
| ...      | Successful Response Params |                |

Example success response:

```javascript
{
  "status":"SUCCESS"
  ...
}
```

## Error Response Params

| **Name**    | **Description**         | **Type**       |
| ----------- | ----------------------- | -------------- |
| status      | Status                  | string ( 100 ) |
| error\_code | Error Code              | integer        |
| error\_msg  | Error Message           | string ( 255 ) |
| errors      | Extra Error Information | array          |

Example error response:

```javascript
{
  "status":"ERROR",
  "err_code": "404",
  "err_msg": "Not found",
  "errors": []
}
```

**Note**: Each error code defines a different error (e.g. validation, authentication, data format).
