API documentation
ดูราคาจดโดเมน
ดึงข้อมูลราคาในการจดทะเบียน ต่ออายุ และโอนโดเมน
Content-Type
application-json
หมวดหมู่
domain
การทำงาน
get_price
พารามิเตอร์คำขอ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย | ตัวอย่าง |
|---|---|---|---|
| domain | สตริง (3-60) | ชื่อโดเมน | example.com |
| type | สตริง | ประเภทชื่อโดเมน: จดทะเบียน, โอน, ต่ออายุ, ทั้งหมด | register |
| year | จำนวนเต็ม (4) | เลือกระยะเวลาการจดทะเบียน/ต่ออายุ/โอน (1-10 ปี) | 1 |
พารามิเตอร์การตอบกลับ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย |
|---|---|---|
| domain | สตริง | ชื่อโดเมน |
| type | สตริง | ประเภทชื่อโดเมน (จดทะเบียน/โอน/ต่ออายุ) |
| currency | สตริง | ประเภทสกุลเงิน |
| price | หมายเลข | จำนวนราคา |
| is_premium | บูลีน | ระบุว่าโดเมนนี้เป็นโดเมนพรีเมียม (ใช้ได้เฉพาะประเภท register) |
ตัวอย่างคำขอ
{
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",
}






