Domain API - Domain Registration API - ICANN Registrar API - บริการโดเมนแบบ White Label

เริ่มต้นใช้งาน NiceNIC Domain API v2

การเข้าถึง API นั้นฟรีสำหรับผู้ใช้ NiceNIC ที่ใช้งานอยู่ทุกคน ไม่จำเป็นต้องอัปเกรดเป็นผู้แทนจำหน่าย กำหนดค่าข้อมูลประจำตัว API ของคุณ ทดสอบคำขออย่างปลอดภัย จากนั้นเพิ่มเวิร์กโฟลว์โดเมน DNS การเรียกเก็บเงิน การปฏิบัติตามข้อกำหนด หรือ WHMCS ตามที่แอปพลิเคชันของคุณต้องการ

ความเป็นส่วนตัวของ WHOIS

Show or hide individual registrant fields for a supported domain. Fields omitted from the request keep their saved settings.

Content-Type application/json
หมวดหมู่ domain
action set_whois_privacy

พารามิเตอร์คำขอ

ชื่อพารามิเตอร์ ประเภท คำอธิบาย ตัวอย่าง
domain String Required. A supported domain managed by the authenticated account. example.com
whois_privacy Object Required. Use whois_privacy[field] for at least one of the fields below. whois_privacy[email]=0
whois_privacy.organization Integer Registrant Organization. 0 means Hide and 1 means Show. 0
whois_privacy.name Integer Registrant Name. 0 means Hide and 1 means Show. 0
whois_privacy.address Integer Registrant Address. 0 means Hide and 1 means Show. 0
whois_privacy.phone Integer Registrant Phone. 0 means Hide and 1 means Show. 1
whois_privacy.fax Integer Registrant Fax. 0 means Hide and 1 means Show. 0
whois_privacy.email Integer Registrant Email. 0 means Hide and 1 means Show. 0

พารามิเตอร์การตอบกลับ

ชื่อพารามิเตอร์ ประเภท คำอธิบาย
domain String Domain name.
whois_privacy Object All saved registrant visibility settings. Each field uses 0 for Hide or 1 for Show. Unset fields are omitted.
whois_privacy.organization Integer Registrant Organization. 0 means Hide and 1 means Show.
whois_privacy.name Integer Registrant Name. 0 means Hide and 1 means Show.
whois_privacy.address Integer Registrant Address. 0 means Hide and 1 means Show.
whois_privacy.phone Integer Registrant Phone. 0 means Hide and 1 means Show.
whois_privacy.fax Integer Registrant Fax. 0 means Hide and 1 means Show.
whois_privacy.email Integer Registrant Email. 0 means Hide and 1 means Show.

ตัวอย่างคำขอ

                                    
{
    curl -g -X POST 'https://api.nicenic.net/v2/?category=domain&action=set_whois_privacy&domain={domain}&whois_privacy[organization]=0&whois_privacy[name]=0&whois_privacy[address]=0&whois_privacy[phone]=1&whois_privacy[email]=0'
      -H "Authorization: username:api_secret"
      -H "Content-Type: application/json"
}

ผลลัพธ์ที่ส่งกลับ

0 OK การตอบกลับที่สำเร็จ
                                        
{
    "code": 0,
    "msg" : "success",
    "data" : {
        "domain" : "example.com",
        "whois_privacy" : {
            "organization" : 0,
            "name" : 0,
            "address" : 0,
            "phone" : 1,
            "email" : 0
        }        
    }
}
400 คำขอไม่ถูกต้อง
                                        
{
    "code": 400,
    "msg" : "Request parameter error",
    "data" : []
}
ลิขสิทธิ์ © 2006–2026 NICENIC INTERNATIONAL GROUP CO., LIMITED. สงวนลิขสิทธิ์ทั้งหมด