> For the complete documentation index, see [llms.txt](https://apidocs.nhanh.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.nhanh.vn/v2/order/addcomplain.md).

# Gửi khiếu nại đơn hàng

* /api/order/addcomplain: Tính năng này dùng để đồng bộ khiếu nại giữa đơn hàng của bạn và đơn hàng trên Nhanh.vn.

## Request

* Xem các [common request params](/v2/readme.md#request-params)
* Các key của mảng **data array** dùng để tạo **data** json string:

| Key         | Type                          | Description                                                                                                                                                                                                                                                                                                                     |
| ----------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id          | int $$^{{\color{red}\*}}$$    | ID đơn hàng bên website của bạn                                                                                                                                                                                                                                                                                                 |
| reason      | int                           | <p>Lý do khiếu nại:<br>6: Lý do khác<br>7: Chậm chuyển tiền<br>8: Báo hàng hoàn<br>9: Báo phát lại<br>10: Yêu cầu miễn giảm cước vận chuyển, bồi thường<br>33: Báo lưu kho tại bưu cục<br>34: Yêu cầu cập nhật lại trạng thái<br>35: Báo hủy đơn<br>36: Thay đổi thông tin đơn hàng, đổi tiền thu hộ COD<br>37: Báo gom đơn</p> |
| description | string $$^{{\color{red}\*}}$$ | Nội dung khiếu nại                                                                                                                                                                                                                                                                                                              |

## Response

```javascript
{
   "code": 1, // 1 is success, 0 is error
   "messages": [ ], // error messages if code is 0
   "data": [
       "complainId" => 5174985,
       // complainId: ID khiếu nại trả về. Khi Nhanh.vn trả kết quả phản hồi khiếu nại sẽ kèm thêm complainId này.
   ]
}
```


---

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

```
GET https://apidocs.nhanh.vn/v2/order/addcomplain.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.
