รับราคาโดเมน
ดึงข้อมูลราคาสำหรับการจดทะเบียน การต่ออายุ และการโอนย้ายโดเมน
Content-Type
application/json
หมวดหมู่
domain
action
get_price
พารามิเตอร์คำขอ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย | ตัวอย่าง |
|---|---|---|---|
| domain | String (3-60) | ชื่อโดเมน | example.com |
| type | String | ประเภทชื่อโดเมน: register, transfer, renew, all | register |
| year | Integer (4) | เลือกระยะเวลาการจดทะเบียน/ต่ออายุ/โอนย้าย (1-10 ปี) | 1 |
พารามิเตอร์การตอบกลับ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย |
|---|---|---|
| domain | String | ชื่อโดเมน |
| type | String | ประเภทชื่อโดเมน (register/transfer/renew) |
| currency | String | ประเภทสกุลเงิน |
| price | Number | จำนวนราคา |
| is_premium | Boolean | ไม่ว่าโดเมนนั้นเป็นโดเมนพรีเมียมหรือไม่ (เฉพาะประเภทการจดทะเบียน) |
ตัวอย่างคำขอ
{
curl https://api.nicenic.net/v2/?category=domain&action=get_price&domain={domain}&type={type}&year={year}
-H "Authorization: username:api_secret"
-H "Content-Type: application/json"
}
ผลลัพธ์ที่ส่งกลับ
0 OK การตอบกลับที่สำเร็จ
{
"code": 0,
"msg" : "success",
"data" : {
[
{
"domain": "example.com",
"type": "register",
"currency": "USD",
"price": 15.99,
"is_premium": false
},
{
"domain": "example.com",
"type": "renew",
"currency": "USD",
"price": 15.99
}
]
}
}
400 คำขอไม่ถูกต้อง
{
"code": 400,
"msg" : "Request parameter error",
}






