# HTTP Status Codes

Here are listed the HTTP status codes indicating that an error occurred while making a request to the QR MIA API, along with possible solutions.\
If you encounter errors or uncertainties during integration or testing, please consult the API documentation and, if needed, contact the technical support team.\
For efficient analysis, please provide the following details:

* HTTP status code
* `errorCode`
* `errorMessage`
* Exact date and time of the request
* Information about the integrated solution (Project ID, Merchant name, Application/Website name, Website URL)

#### HTTP Status Code Table

| Status code | Error                  | Description                                                                                  | Solution                                                                                                                                         |
| ----------- | ---------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **400**     | Bad Request            | The request is not understood by the system due to incorrect syntax.                         | <p>Verify that all request parameters are correct and that none of the mandatory ones are missing.</p><p></p>                                    |
| **401**     | Unauthorized           | The access token is missing or invalid/expired.                                              | Check if a valid token has been generated and that it is correctly sent in the Authorization header.                                             |
| **403**     | Forbidden              | Access is restricted for the IP or authentication data used.                                 | Ensure that the Project is active, properly configured, and that the IP is on the allowed list.                                                  |
| **404**     | Not Found              | The requested resource was not found.                                                        | Verify the endpoint URL and the resource identifier parameter (e.g., qrId) for correctness.                                                      |
| **405**     | Method Not Allowed     | The HTTP method used (GET, POST, etc.) is not allowed on this endpoint.                      | Make sure you are using the correct HTTP method as specified for that endpoint.                                                                  |
| **409**     | Conflict               | A data conflict occurred (e.g., a QR with the same parameters already exists).               | Check the application logic to avoid sending repeated or contradictory data.                                                                     |
| **415**     | Unsupported Media Type | The content of the request is not in a format accepted by the API.                           | <p>Verify that the <code>Content-Type</code> header is set to <code>application/json</code> </p><p>and that the body is correctly formatted.</p> |
| **422**     | Unprocessable Entity   | The sent data is valid in format but cannot be processed due to logically incorrect content. | Check the transmitted values (e.g., amount, currency, custom parameters) to comply with validation rules.                                        |
| **429**     | Too Many Requests      | Too many requests in a short period of time.                                                 | Implement a retry mechanism with backoff, and if necessary, contact the support team to configure custom policies.                               |
| **500**     | Internal Server Error  | An unexpected internal error occurred in the system.                                         | Try again after a few moments. If the problem persists, contact the support team with request details.                                           |
| **503**     | Service Unavailable    | The API is temporarily unavailable due to overload or maintenance.                           | Try again after a few minutes. If the unavailability persists, check official notifications or contact technical support.                        |


---

# Agent Instructions: 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:

```
GET https://docs.maibmerchants.md/mia-qr-api/en/errors/http-status-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
