API tên miền - API đăng ký tên miền - API dành cho nhà đăng ký ICANN - Dịch vụ tên miền nhãn trắng

Bắt đầu xây dựng với API tên miền NiceNIC v2

Mọi người dùng NiceNIC đang hoạt động đều được miễn phí truy cập API. Không cần nâng cấp lên tài khoản đại lý. Hãy cấu hình thông tin xác thực API, gửi một yêu cầu thử nghiệm an toàn, sau đó thêm các quy trình làm việc về tên miền, DNS, thanh toán, tuân thủ hoặc WHMCS mà ứng dụng của bạn cần.

Setting Auto-Renew

Enable or disable auto-renewal for up to 100 domains. New plans renew for one year at a time.

Content-Type application/json
category domain
action set_auto_renew

Tham số yêu cầu

Tên tham số Loại Mô tả Ví dụ
domain Chuỗi Required. Provide one domain or a comma-separated list of up to 100 domains. example.com,example.net
auto_renew Integer Required. 1 enables and 0 disables auto-renewal for all entries. 1

Tham số phản hồi

Tên tham số Loại Mô tả
results Object[] Each result has domain, code, and msg.
A code of 0 also returns the Boolean auto_renew status.
success_count Integer Number of successful entries, including settings already in effect.
fail_count Integer Number of entries that failed validation or could not be saved.

Ví dụ về yêu cầu

                                    
{
    curl -g -X POST 'https://api.nicenic.net/v2/?category=domain&action=set_auto_renew&domain={domain}&auto_renew=1'
      -H "Authorization: username:api_secret"
      -H "Content-Type: application/json"
}

Kết quả trả về

0 OK Phản hồi thành công
                                        
{
    "code": 0,
    "msg" : "success",
    "data" : {
        "results" : [
            {
                "domain" : "example.com",
                "code" : 0,
                "msg" : "success",
                "auto_renew" : true
            },
            {
                "domain" : "example.net",
                "code" : 404,
                "msg" : "Domain not found"
            }
        ],
        "success_count" : 1,
        "fail_count" : 1        
    }
}
400 Yêu cầu không hợp lệ
                                        
{
    "code": 400,
    "msg" : "Request parameter error",
    "data" : []
}
Bản quyền © 2006–2026 NICENIC INTERNATIONAL GROUP CO., LIMITED. Bảo lưu mọi quyền.