# Kho đầu số

## Danh sách kho đầu số

<mark style="color:blue;">`GET`</mark> `[URL]/api/partner/public_number/list`

Danh sách kho đầu số

#### Query Parameters

| Name | Type    | Description                       |
| ---- | ------- | --------------------------------- |
| page | number  | Trang (Bắt đầu từ 1)              |
| size | boolean | Kích thước trang (Mặc định là 50) |

#### Headers

| Name          | Type   | Description                           |
| ------------- | ------ | ------------------------------------- |
| Authorization | string | Access token : Bearer 'partner token' |

{% tabs %}
{% tab title="200 Danh sách đầu số" %}

```
{
    "status_code": 9999,
    "payload": {
        "next_page": 2,
        "page_number": 1,
        "has_previous": false,
        "has_next": true,
        "total_pages": 3,
        "previous_page": 1,
        "items": [
            {
                "created_date": 1583725991806, // Ngày tạo
                "last_updated_date": 1601005495717, // Cập nhật lần cuối
                "number": "842477778823", // Số hotline
                "provider": "Itelecom", // Nhà mạng
                "provider_type": "itel", // Tên ngắn
                "number_type": "fixed", // Loại đầu số (Cố định, di động, 1900, 1800, ... )
                "nation": "vn" // Quốc gia,
                "maintaining_prices": [ // Phí duy trì đầu số
                    {
                        "currency": "VND",
                        "price": 22000
                    },
                    {
                        "currency": "USD",
                        "price": 0.977
                    }
                ],
                call_pricing { // Giá thoại
                }
            },
            {
                "created_date": 1583725991806,
                "last_updated_date": 1601092490032,
                "number": "842477778814",
                "provider": "Itelecom",
                "provider_type": "itel",
                "number_type": "fixed",
                "nation": "vn"
            },
            ......
        ],
        "total_items": 140,
        "page_size": 50
    },
    "key_enabled": false
}
```

{% endtab %}
{% endtabs %}

## Mua đầu số&#x20;

<mark style="color:green;">`POST`</mark> `[URL/api/partner/public_number/buy`

Mua số hotline

#### Path Parameters

| Name          | Type   | Description                           |
| ------------- | ------ | ------------------------------------- |
| Authorization | string | Access token : Bearer 'partner token' |

#### Request Body

| Name          | Type   | Description                          |
| ------------- | ------ | ------------------------------------ |
| number\_count | number | Số tháng sử dụng (Tối thiểu 6 tháng) |
| note          | string | Mô tả                                |
| number        | string | Số hotline                           |
| email         | string | Email chủ doanh nghiệp               |

{% tabs %}
{% tab title="200 Mua đầu số thành công" %}

```
```

{% endtab %}
{% endtabs %}


---

# 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://api.omicall.com/partner/public_number.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.
