# Hàm kiểm tra tin nhắn theo SMSID

#### HTTP Request

\ <mark style="color:green;">**`GET`**</mark> <https://rest.esms.vn/MainService.svc/json/GetSendStatus?RefId={{SMSID}}&ApiKey={{ApiKey}}&SecretKey={{SecretKey}}>

* **Response Type:** <mark style="color:orange;">application/json</mark>

{% code overflow="wrap" %}

```json
curl --location 'https://rest.esms.vn/MainService.svc/json/GetSendStatus?RefId=6007b4bc6db546b194062c19620cc820200&ApiKey={{ApiKey}}&SecretKey={{SecretKey}}' \
```

{% endcode %}

* **Câu trúc body của request:**

<table><thead><tr><th width="139">Tham số</th><th width="129">Kiểu dữ liệu </th><th width="155" data-type="checkbox">Tính bắt buộc</th><th>Mô tả</th></tr></thead><tbody><tr><td>RefId</td><td>string</td><td>true</td><td>SmsId hệ thống trả về từ mỗi hàm gửi tin nhắn.</td></tr><tr><td>ApiKey</td><td>string</td><td>true</td><td>ApiKey eSMS cung cấp.</td></tr><tr><td>SecretKey</td><td>string</td><td>true</td><td>SecretKey eSMS cung cấp.</td></tr></tbody></table>

***

* **Response:**

{% tabs %}
{% tab title="100" %}

```
{
    "CodeResponse": "100",
    "SMSID": "434a124c-7818-4f45-bdf2-7f7b07fff210100",
    "SendFailed": 0,
    "SendStatus": 5,
    "SendSuccess": 1,
    "TotalPrice": 850.0000,
    "TotalReceiver": 1,
    "TotalSent": 1
}
```

**Request hợp lệ.**
{% endtab %}

{% tab title="101" %}

```json
{
    "CodeResponse": "101",
    "SMSID": "47756317-0cbe-494a-9d02-c85703a1baff20"
}
```

**Sai thông tin ApiKey/SecretKey.**
{% endtab %}
{% endtabs %}

**Cấu trúc body của response:**

<table><thead><tr><th width="174">Thuộc tính</th><th width="155">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>CodeResponse</td><td>string</td><td>Mã trả về.</td></tr><tr><td>SMSID</td><td>string</td><td>SmsId kiểm tra.</td></tr><tr><td>SendFailed</td><td>string</td><td>Số lượng tin thất bại.</td></tr><tr><td>SendStatus</td><td>string</td><td>Trạng thái tin nhắn<br>1: Chờ Duyệt<br>2: Chờ gửi.<br>5: Đã gửi xong.</td></tr><tr><td>SendSuccess</td><td>string</td><td>Số lượng tin thành công.</td></tr><tr><td>TotalPrice</td><td>string</td><td>Tổng tiền của đơn.</td></tr><tr><td>TotalReceiver</td><td>string</td><td>Số lượng người nhận.</td></tr><tr><td>TotalSent</td><td>string</td><td>Số lượng gửi.</td></tr></tbody></table>

* *<mark style="color:yellow;">**Thông tin chi tiết mã lỗi xem ở bảng:**</mark>* [**Mã lỗi**](/esms-api/bang-ma-loi.md) **.**
* *<mark style="color:yellow;">**Lấy code mẫu các ngôn ngữ trên Postman:**</mark>* [**Link code mẫu**](https://samplefordevelopers.esms.vn/#17b5d3c2-11b8-4748-ad0a-442a42d43532)**.**


---

# 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://developers.esms.vn/esms-api/ham-truy-xuat-va-dang-ky/ham-kiem-tra-tin-nhan-theo-smsid.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.
