> For the complete documentation index, see [llms.txt](https://developers.chup.online/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.chup.online/build-your-integration/data-synchronization/api-responses.md).

# API Responses

### API Response Codes Explained 🚦📊

The API uses conventional HTTP response codes to indicate the success or failure of an API request. These codes are grouped into different ranges, each signifying a specific type of response.

**🟢 Success Responses (`2xx`)**

* **200 OK** 🆗: This response indicates that the request has been successfully received, understood, and accepted. It's the standard response for successful HTTP requests where the server returns the requested data.
* **201 Created** 🌟: A new resource has been created as a result of the request. The URI of the new resource is typically returned in the `Location` header field.
* **204 No Content** 📭: The server has successfully fulfilled the request, and there is no additional content to send in the response payload body.
* Other codes in the `2xx` range indicate **success** overall. These responses mean that the request was received, understood, and processed correctly.

**🔴 Client Error Responses (`4xx`)**

* Codes in the `4xx` range signify **client errors** ❗. These errors occur when the request contains incorrect information or is incomplete. Examples include:
  * **400 Bad Request** 🚫: The server cannot process the request due to a client error.
  * **401 Unauthorized** 🔒: Authentication is required and has failed or has not been provided.
  * **404 Not Found** 🔍: The requested resource is not available.
  * **422 Unprocessable Entity** 🧩: The request was well-formed but was unable to be followed due to semantic errors.

**🔵 Server Error Responses (`5xx`)**

* Codes in the `5xx` range highlight **server errors** 🚨 with Waitwhile's servers. These indicate failures on the server side that are outside the client's control. Examples include:
  * **500 Internal Server Error** ⚙️: A generic error message when an unexpected condition was encountered.
  * **503 Service Unavailable** 🚧: The server is currently unable to handle the request due to temporary overloading or maintenance.

Understanding these response codes is vital for correctly interpreting the results of your API requests and troubleshooting potential issues.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.chup.online/build-your-integration/data-synchronization/api-responses.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
