# Thêm khiếu nại đơn hàng

* API này dùng để tạo khiếu nại hoặc yêu cầu hỗ trợ cho việc vận chuyển đơn hàng.

## Request

* Xem các [common request params](/v3/readme.md#request-params)

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/order/addcomplain?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "id": 14889262,
    "reason": 37,
    "description": "Đến thu gom hàng giúp mình với"
}'
```

| Key         | Type                       | Description                                      |
| ----------- | -------------------------- | ------------------------------------------------ |
| id          | int $$^{{\color{red}\*}}$$ | ID đơn hàng                                      |
| reason      | int $$^{{\color{red}\*}}$$ | ID lý do khiếu nại, xem [bảng bên dưới](#reason) |
| description | string                     | Nội dung khiếu nại                               |

### reason

| Value | Description                                      |
| ----- | ------------------------------------------------ |
| 6     | Lý do khác                                       |
| 7     | Yêu cầu thanh toán COD                           |
| 8     | Báo hoàn hàng                                    |
| 9     | Báo phát lại                                     |
| 10    | Yêu cầu miễn giảm cước vận chuyển, bồi thường    |
| 33    | Báo lưu kho tại bưu cục                          |
| 34    | Yêu cầu cập nhật lại trạng thái                  |
| 35    | Báo hủy đơn                                      |
| 36    | Thay đổi thông tin đơn hàng, đổi tiền thu hộ COD |
| 37    | Báo thu gom                                      |
| 38    | Giao hàng một phần                               |

## Response

* Xem cấu trúc chung [tại đây](/v3/readme.md#response).

### Failed response

* Xem các mã lỗi chung [tại đây](/v3/readme.md#failed-response).

### Successful response

```json
{
    "code": 1,
    "data": {
      "complainId": "(int) ID khiếu nại"
    }
}
```


---

# 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://apidocs.nhanh.vn/v3/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.
