Đăng ký tên miền
Đăng ký tên miền là quá trình giữ chỗ một tên duy nhất trên Internet trong một khoảng thời gian nhất định, thường là một năm hoặc lâu hơn
Tham số yêu cầu
| Tên tham số | Kiểu | Mô tả | Ví dụ |
|---|---|---|---|
| domain | Chuỗi (3-60) | Tên domain | example.com |
| year | Số nguyên (4) | Thời hạn đăng ký từ 1 đến 10 năm, với một số ngoại lệ đối với một số domain. | 1 |
| dns1 | Máy chủ | Máy chủ tên chính | ns3.my-ndns.com |
| dns2 | Máy chủ | Máy chủ tên phụ | ns4.my-ndns.com |
| organization | Chuỗi (1-255) | Tên tổ chức / công ty | XXX Ltd. |
| name | Chuỗi (1-16) | Tên người đăng ký | Xiao Ming |
| country | Chuỗi (1-255) | Mã quốc gia, chẳng hạn CN | CN |
| state | Chuỗi (1-255) | Tỉnh / bang | BeiJing |
| city | Chuỗi (1-255) | Chữ viết tắt thành phố | BJ |
| address | Chuỗi (1-255) | Địa chỉ thư tín | BeiJing |
| postcode | Số nguyên (4-10) | Mã bưu chính / Zip code | 100000 |
| phone | "." để phân tách các số (30) | +Mã quốc gia.mã vùng và số điện thoại | +86.13800000000 |
| fax | "." để phân tách các số (30) | +Mã quốc gia.mã vùng và số fax | +86.13800000000 |
| Địa chỉ email | Địa chỉ email | [email protected] | |
| contact_source | Chuỗi (1-255) | Set to member to use của bạn member profile instead of the supplied Thông tin liên hệ. | member |
| document_type | Chuỗi | Required fhoặc HK tên miềns. Common values: PASSNO (Hộ chiếu), OTHIDV (Other Individual Số tài liệu), OTHHOẶCG (Other Organization Số tài liệu). | PASSNO |
| document_number | Chuỗi (1-40 bytes) | Document number matching the selected type. Required fhoặc HK tên miềns. | E12345678 |
HK tên miềns require both document fields, including when using contact_source=member. Other tên miềns ignhoặce them. Fhoặc .com.hk, only BR is accepted.
Tham số phản hồi
| Tên tham số | Kiểu | Mô tả |
|---|---|---|
| domain | Chuỗi | Tên domain |
| created_date | Ngày | Thời gian đăng ký domain |
| expired_date | Ngày | Ngày hết hạn của domain |
Ví dụ yêu cầu
{
curl https://api.nicenic.net/v2/?category=domain&action=register&domain={domain}&year={year}&dns1={dns1}&dns2={dns2}&organization={organization}&name={name}&country={country}&state={state}&city={city}&address={address}&postcode={postcode}&phone={phone}&fax={fax}&email={email}&contact_source={contact_source}
-H "Authorization: username:api_secret"
-H "Content-Type: application/json"
}
Kết quả trả về
{
"code": 0,
"msg" : "success",
"data" : {
"domain":"example.com",
"created_date":"2025-01-21",
"expired_date":"2026-01-21"
}
}
{
"code": 201,
"msg" : "Pending order, please wait for the order to be processed!"
}
}
Lưu ý: code "201" means the registration hoặcder was submitted successfully và the fee was deducted. Final tên miền activation is still subject to registry confirmation. Nếu the tên miền cannot be activated, the registration fee will be refunded to của bạn account balance within 24 hours.
{
"code": 400,
"msg" : "Request parameter error",
}






