# Lịch sử cập nhật trạng thái

<mark style="color:green;">`POST`</mark> `api/Customer/GetStatusLogs`

#### Headers

| Name                                       | Type   | Description                  |
| ------------------------------------------ | ------ | ---------------------------- |
| ClientID<mark style="color:red;">\*</mark> | Number | ClientID lấy ở api đăng nhập |
| Token<mark style="color:red;">\*</mark>    | String | Token lấy ở api đăng nhập    |

#### Request Body

| Name                                       | Type     | Description                                                         |
| ------------------------------------------ | -------- | ------------------------------------------------------------------- |
| FromDate<mark style="color:red;">\*</mark> | DateTime | Từ ngày                                                             |
| ToDate<mark style="color:red;">\*</mark>   | DateTime | Đến ngày                                                            |
| OrderCodes                                 | String   | Mã đơn hàng 247 (Có thể truyền nhiều vận đơn cách nhau bởi dấu ",") |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Thành công" %}
{% code fullWidth="true" %}

```json
{
  "Data": {
    "Orders": [
      {
        "OrderCode": "HD000003",
        "Histories": [
          {
            "OrderCode": "HD000003",
            "ExternalCode": "HD000003",
            "ReferenceCode": "HD000003",
            "Status": "21",
            "StatusName": "DATIEPNHAN",
            "Description": null,
            "RequestFeedbackCount": 0,
            "DelayCode": null,
            "DelayNotes": null,
            "DeliveryNotes": null,
            "Mailman": null,
            "TransactionId": "8b2213ed-g2de-457b-a0e1-9a26c4d23a3f",
            "DeliveryDate": null,
            "ReceiverName": null,
            "Time": "2023-01-03T10:11:19.6240597+07:00",
            "IsCallError": false,
            "ErrorMessage": null,
            "IsPartnerResponseError": false,
            "PartnerResponseErrorMsg": null
          },
          {
            "OrderCode": "HD000003",
            "ExternalCode": "HD000003",
            "ReferenceCode": "HD000003",
            "Status": "23",
            "StatusName": "DALAYHANG",
            "Description": null,
            "RequestFeedbackCount": 0,
            "DelayCode": null,
            "DelayNotes": null,
            "DeliveryNotes": null,
            "Mailman": null,
            "TransactionId": "eda18522-2ffc-48ce-beb8-abe32aa60a54",
            "DeliveryDate": null,
            "ReceiverName": null,
            "Time": "2023-01-04T10:11:19.6240597+07:00",
            "IsCallError": false,
            "ErrorMessage": null,
            "IsPartnerResponseError": false,
            "PartnerResponseErrorMsg": null
          }
        ]
      }
    ]
  },
  "IsError": false,
  "ErrorMessage": ""
}
```

{% endcode %}
{% endtab %}

{% tab title="Lỗi" %}

```json
{
    "Data": null,
    "IsError": true,
    "ErrorMessage": "" // Mô tả lỗi
}

```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Mô tả kết quả trả về

| Trường                  | Mô tả                                                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Data                    | Dữ liệu chính                                                                                                    |
| Orders                  | Danh danh sách đơn hàng                                                                                          |
| Histories               | Danh sách những lần thay đổi trạng thái đơn hàng                                                                 |
| OrderCode               | Mã vận đơn                                                                                                       |
| ExternalCode            | Mã vận đơn khách hàng                                                                                            |
| ReferenceCode           | Mã tham chiếu khách hàng                                                                                         |
| Status                  | Mã trạng thái [*(xem chi tiết)*](/webhooks/webhooks.md#danh-sach-trang-thai)                                     |
| StatusName              | Tên trạng thái                                                                                                   |
| Description             | Mô tả trạng thái                                                                                                 |
| RequestFeedbackCount    | Số lần yêu cầu phản hồi                                                                                          |
| DelayCode               | Mã lý do chưa phát thành công [*(xem chi tiết)*](/tracking/tracking-don-hang.md#bang-ly-do-phat-chua-thanh-cong) |
| DelayNotes              | Lý do chưa phát thành công                                                                                       |
| Mailman                 | Nhân viên phát thư                                                                                               |
| TransactionId           | Mã giao dịch                                                                                                     |
| DeliveryDate            | Ngày phát                                                                                                        |
| DeliveryNotes           | Ghi chú phát                                                                                                     |
| ReceiverName            | Tên người nhận                                                                                                   |
| Time                    | Thời điểm phát sinh sự kiện                                                                                      |
| IsCallError             | Lỗi gửi trạng thái?                                                                                              |
| ErrorMessage            | Mô tả lỗi gửi trạng thái                                                                                         |
| IsPartnerResponseError  | Lỗi hệ thống khách hàng trả về?                                                                                  |
| PartnerResponseErrorMsg | Mô tả lỗi hệ thống khách hàng trả về                                                                             |


---

# 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://apidoc.247express.vn/webhooks/lich-su-cap-nhat-trang-thai.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.
