New domain name query and registration API interface class

Notes on POST parameters:
All phone numbers and postal codes must be numeric and cannot be zero
All English information fields must be
This interface does not currently support trusted proxy
1. Documentation
1.1 Document Introduction
This version uses HTTP+POST method for registration.
1.2 Usage Restrictions
Only official agents of Xinwang can use it.
You must conform to the interface authentication method to submit commands.
The registration interface performs real-time registration and real-time deduction according to the price of the agent. If the prepayment is insufficient, the registration application cannot be submitted.
The acquisition and dissemination of interface documents must comply with Xinwang's confidentiality agreement
1.3 Operating Instructions
1. The agent fills in the IP address and authentication password for authorized POST in the Xinwang agent area.
2. Write a client program according to the interface description to submit query and registration commands to the interface, and get the results immediately.

1.4 Domain Name Scope
International domain names, .com, .net, .org, .biz, .info, .cc, .mobi domain names, including Chinese .com, .cc
Domestic domain names, .cn, .com.cn, .china, .network, .company, general website
1.5 md5 string test address:
url: http://api.xinnet.com/domain/api.gb?method=testmd5
http://api.xinnet.com/domain/api.gb?method=testmd5&charset=utf-8 (utf-8 character set)
Parameters: strbuf
Output: strbuf content and encoded md5 string
The Chinese encoding uses gb2312 or utf-8 encoding, otherwise md5 verification errors are prone to occur: verify-failure digest authentication failure
About the instructions here: Please make sure that the charset setting of the relevant program file is the same as the encoding saved in the file itself.
And please ensure that all associated files have the same encoding, unless you explicitly request inconsistencies (requires transcoding)
The results of gb2312 and utf-8 Chinese md5 may be different, please make sure that the character set of the submitted content is consistent with the md5 string.
2. Interface overview
2.1 Interface Directory
Check interface: It is mainly responsible for querying domain names. It adopts multi-threaded mode and can query multiple domain names at the same time.
Register interface: Register interface, register in real time, and deduct fees immediately after success. If it times out, the domain name will be deleted without going to background registration.
Universal URL registration service is not provided.
Status API: Query whether the domain name registration is successful.
ModDns interface: perform online modification of DNS operations.
Domain renewal interface: domain name renewal interface, real-time renewal, and immediate deduction.
Get product password interface: Get the domain name management password, mydns password, and domain name expiration time.
Modify product password interface: modify the domain name management password and mydns password.
ModifyContactor interface: Modify all contact information except the owner of the domain name.
Register DNS under this domain name: Register the DNS under this domain name.
Query DNS under this domain name: Query the DNS under this domain name.
Modify DNS under this domain name: Modify the DNS under this domain name.
Delete DNS under this domain name: Delete DNS under this domain name.

2.2 Authentication method
1. IP restrictions, for any interface that must be authorized from the proxy, each proxy is limited to 3 IP addresses
2. MD5 irreversible encryption digest, except Check interface and Status interface, all other interfaces are required to provide

2.3 Return the result
Return data results in POST data format

3. Interface description
3.1 Check interface
POST address: http://api.xinnet.com/domain/api.gb?method=check
http://api.xinnet.com/domain/api.gb?method=check&charset=utf-8 (utf-8 character set)
POST parameters: name name; 1, no suffix
enc code, E, G; 1;
suffix suffix; 1-N, domain name suffix .com/.net/.org/.china/cnaddr/.company/
client proxy number; 1
For example: name=abc&enc=E&suffix=.com&suffix=.net&suffix=.cn&client=agent111
POST data, must be URL encoded
Verification: The source IP of client and POST must be the same as the address filled in by the agent

Return result: num number of domain names
enc encoding
name[1--N] Domain name, name + suffix N=num
chk[1--N] N=num Query result: 0 can not be registered 100 can be registered

Information code:
auth-failure authentication failed

For example: num=3&enc=E&name1=abc.com&chk1=0&name2=abc.net&chk2=100&name3=abc.org&chk3=-100
Note: Universal URL suffix=cnaddr (currently only renewal of old universal URL is provided, registration service is not provided)

3.2 Register interface
POST address: http://api.xinnet.com/domain/api.gb?method=Register
http://api.xinnet.com/domain/api.gb?method=Register&charset=utf-8 (utf-8 character set)
POST parameters:
[Domain name information]
dn domain name; 1, including name and suffix
enc code, E, G; 1;
client proxy number; 1
checksum MD5 encrypted digest
period The number of years of registration; [if not filled in, the default is 1 year], the valid value is 1-10 years
url URL forwarding [required for common URL, if not filled in, the default is www.xinnet.com]

[Information of registered owner or registered unit]

uname1 Chinese unit name of the registrant [Required]
uname2 English unit name of the registrant [required]------------------- must be in English with a space in between

grid
uname3 registered unit pinyin
uname4 registration unit abbreviation
location The location of the registrant's unit
rname1 registrant | Chinese name of the person in charge of the unit [domestic domain name must]
rname2 Registrant | English name of the person in charge of the unit [international domain name must]
ust English country name of the registrant Two letters [CN means China], the interface automatically translates into Chinese
uprov registrant's English province name such as: Beijing, the interface automatically translates into Chinese
ucity1 Chinese city name of the registrant [domestic domain name must]
ucity2 registrant's English city name [required for international domain names]
uaddr1 Chinese address of the registrant [domestic domain name required]
uaddr2 English address of the registrant [required for international domain names]
uzip registrant zip code [required]
utelc registrant's phone country code, it can be left blank and the default is 86, and the length cannot be greater than 3 digits
utela registrant's telephone area code If it is a mobile phone, it can be left blank, this item cannot be 0
uteln registrant phone number (area code + phone number length must be less than 12)
utele registrant phone extension
ufaxc The country code of the registrant's fax. It can be left blank and the default value is 86. The length cannot be greater than 3 digits.
ufaxa registrant's fax area code If it is a mobile phone, it can be left blank, this item cannot be 0
ufaxn registrant fax number must be numeric (area code + fax number length must be less than 12)
ufaxe Registrant Fax Extension
uemail registrant email address
trade The English code of the industry where the registrant is located [if not filled, the default is business S8]//This field is best left blank, if

Fill in, do not use lowercase S
[Domain name management contact information] The address information of the management contact unit is the same as the registrant information, so there is no need to fill in

Write
uincode travel domain name UIN code travel domain name required, other domain names not required
certtype asia domain name certificate type Required for asia domain names, not required for other domain names
passport passport or resident identity card
certificate business license
legislation chartered statutory body certificate
societiesRegistry non-profit organization registration certificate
politicalPartyRegistry party registration certificate
other

certcode asia domain name certificate number Required for asia domain names, not required for other domain names
entitytype asia domain name entity type required for asia domain name, not required for other domain names
naturalPerson
corporation
cooperative
partnership partnership or collective company
government government agency
politicalParty political party or union
society trust management institution, asset management institution, association or society
institution public institution
other
aname1 Chinese name of the management contact [domestic domain name required]
aname2 English name of the administrative contact [required for international domain names]
atelc management contact phone country code can be left blank, the default is 86, and the length cannot be greater than 3 digits
atela management contact phone area code if it is a mobile phone, you can leave it blank
ateln management contact phone number area code + phone number length must be less than 12
atele management contact phone extension can be left blank, this item cannot be 0
afaxc management contact fax country code, it can be left blank and the default is 86, and the length cannot be greater than 3 digits
afaxa management contact fax area code, if it is a mobile phone, it can be left blank, this item cannot be 0
afaxn admin contact fax number
afaxe Admin Contact Fax Extension
aemail administrative contact email address [required]
Note: The telephone and fax of the administrative contact and registrant must be kept complete.
Otherwise, if the administrative contact phone fax is missing, the registrant's phone fax will be used
If the registrant phone fax is missing, the administrative contact's phone fax will be used
If the registrant does not have an email address, the email address of the administrative contact will be used

[Technical Contact Information]

tname1 Chinese name of the technical contact [If not filled, the default is the management contact]
tname2 English name of technical contact [If not filled, the default is the management contact]
tunit1 Chinese name of the technical contact unit [If not filled, the default is the management contact person]
tunit2 The English name of the technical contact unit [if not filled, the default is the management contact]
tst English country name of technical contact, two letters [CN means China], [if not filled, the default is

Manage Contacts]
tprov Technical contact person in English province name such as: Beijing, the interface automatically translates into Chinese, [if not filled in, the default

for admin contacts]
tcity1 Chinese city name of technical contact [If not filled, the default is the management contact]
tcity2 English city name of technical contact [If not filled, the default is the management contact]
taddr1 Chinese address of technical contact [If not filled, the default is the management contact]
taddr2 English address of technical contact [If not filled, the default is the management contact]
tzip technical contact zip code [defaults to administrative contact if left blank]
temail technical contact email address [if not filled, the default is the administrative contact]
ttelc technical contact phone country code [if not filled, the default is the management contact]
ttela technical contact phone area code [if not filled, the default is the administrative contact]
tteln technical contact phone number [if not filled, the default is the administrative contact]
ttele technical contact phone extension [if not filled, the default is admin contact]
tfaxc technical contact fax country code [if not filled, the default is the management contact]
tfaxa technical contact fax area code [if not filled, the default is the administrative contact]
tfaxn technical contact fax number [if not filled, the default is the management contact]
tfaxe Technical Contact Fax Extension [If not filled, the default is Admin Contact]
[Payment Contact Information]
fname1 Chinese name of the payment contact [If not filled, the default is the management contact]
fname2 English name of the payment contact [If not filled, the default is the management contact]
funit1 Chinese name of the payment contact unit [If not filled, the default is the management contact]
funit2 English name of the payment contact unit [If not filled, the default is the management contact]
fst The English country name of the contact person for payment, two letters [CN means China], [if not filled, the default is

Manage Contacts]
fprov Name of the English province of the payment contact person, such as: Beijing, the interface will automatically translate into Chinese, [if not filled, the default

for admin contacts]
fcity1 Chinese city name of the payment contact [If not filled, the default is the management contact]
fcity2 English city name of the payment contact [If not filled, the default is the management contact]
faddr1 Chinese address of the payment contact [If not filled, the default is the management contact]
faddr2 English address of the payment contact [If not filled, the default is the management contact]
fzip billing contact zip code [if not filled, the default is the management contact]
femail billing contact email address [if not filled, the default is the management contact]
ftelc billing contact phone country code [if not filled, the default is the management contact]
ftela billing contact phone area code [if not filled, the default is the management contact]
fteln billing contact phone number [if not filled, the default is the management contact]
ftele billing contact phone extension [if not filled, the default is the management contact]
ffaxc Payment Contact Fax Country Code [If not filled, the default is the management contact]
ffaxa Payment Contact Fax Area Code [If not filled, the default is the management contact]
ffaxn payment contact fax number [if not filled, the default is the management contact]
ffaxe Payment Contact Fax Extension [If not filled, the default is the management contact]
[DNS information]
dns1 domain name main server name [if not filled, the default is ns.xinnetdns.com]
dns2 domain name secondary server name [if not filled, the default is ns.xinnet.cn]

For example: dn=abc.com&enc=E&client=agent111&period=1.
POST data must be URL encoded, otherwise the Chinese information will be incorrect

Verification: The source IP of client and POST must be the same as the address filled in by the agent
checksum=MD5("Register"+client+password+dn+aemail+uname2)
"Register" is a string constant representing the interface name.
Others without quotation marks are represented as POST parameter variables, and password is the authentication password set in the proxy area
client is the customer number, dn is the domain name, aemail is the management contact email, unit2 is the English name of the registered unit

Return result: ret registration result, 0 failure, 100 success, 50 timeout waiting
info normal information, 1
err wrong information, 0-N
returned messages:
Format: operation/object-result
reg-success registration is successful
reg-waiting submitted successfully, waiting for registration
reg-failure registration failed
reg-unauth is not authorized to register a generic URL [new]
auth-failure authentication failed
name-null Domain name is empty
name-wrong wrong domain name suffix
name-invalid Invalid domain name contains wrong characters
client-invalid Invalid client number
client-null Client ID is empty
verify-null no digest
Number of db-fails
Database connection failed
credit-fail customer insufficient prepayment
name-exist domain name already exists
period-invalid The registration period is invalid
verify-failure digest authentication failed
uname1-invalid The Chinese name of the registrant is invalid
uname1-null The Chinese name of the registrant unit is empty
uname2-invalid The English name of the registrant is invalid
uname2-null The English name of the registrant unit is empty
uname3-invalid The registrant unit's pinyin is invalid
uname3-null The pinyin of the registrant unit is empty
uname4-invalid Registrant unit abbreviation is invalid
uname4-null Registrant Unit Abbreviation is empty
rname1-invalid The Chinese name of the registrant is invalid
rname1-null The Chinese name of the registrant is empty
rname2-invalid The English name of the registrant is invalid
rname2-null The English name of the registrant is empty
uaddr1-invalid The Chinese name of the Chinese address of the registrant is invalid
uaddr1-null The Chinese address of the registrant's Chinese address is empty
uaddr2-invalid The Chinese address and English name of the registrant unit are invalid
uaddr2-null The Chinese address and English name of the registrant unit are empty
ucity1-invalid The Chinese city of the registrant is invalid
ucity1-null The Chinese city of the registrant is empty
ucity2-invalid The English city of the registrant is invalid
ucity2-null The English city of the registrant unit is empty
aname1-invalid The Chinese name of the management contact is invalid
aname1-null The Chinese name of the management contact is empty
aname2-invalid The English name of the administrative contact is invalid
aname2-null The English name of the management contact is empty
uteln-invalid Invalid registrant phone number
uteln-null registrant phone number is empty
ateln-invalid Invalid admin contact phone number
ateln-null admin contact phone number is empty
ufaxn-invalid Invalid registrant fax number
ufaxn-null The registrant's fax number is empty
afaxn-invalid Admin contact fax number is invalid
afaxn-null Admin contact fax number is empty
uzip-invalid Registrant postcode is invalid
uzip-null Registrant postcode is empty
aemail-invalid Admin contact email is invalid
aemail-null admin contact email is empty
uincode-invalid travel domain name UIN code is invalid
certtype-invalid asia domain name certificate type is invalid
certcode-invalid asia domain name certificate number is invalid
entitytype-invalid asia domain name entity type is invalid

Example: ret=100&info=reg-success
ret=0&err=auth-failure
ret=0&err=uname2-invalid&err=aemail-null&err=uaddr2-invalid&err=

3.3 Status interface
POST address: http://api.xinnet.com/domain/api.gb?method=Status
http://api.xinnet.com/domain/api.gb?method=Status&charset=utf-8 (utf-8 character set)
dn domain name; 1, including name and suffix
enc code, E, G; 1; if not filled, the module considers E
client proxy number; 1
For example: dn=abc.com&enc=E&client=agent111
POST data, must be URL encoded
Verification: The source IP of client and POST must be the same as the address filled in by the agent

Returns the result: ret returns the result,
100 successful registration, 0 unsuccessful registration, 50 waiting for registration, -100 the domain name does not exist -20 the domain name exists but you do not have administrative rights
err error message
Information code:
auth-failure authentication failed
name-invalid invalid domain name

For example: ret=0&err=auth-failure


3.4 ModDns interface
POST address: http://api.xinnet.com/domain/api.gb?method=ModDns
http://api.xinnet.com/domain/api.gb?method=ModDns&charset=utf-8 (utf-8 character set)
POST parameters:
[Domain name information]
dn domain name; 1, including name and suffix
enc code, E, G; 1;
client proxy number; 1
dns1 domain name master server name [required]
dns2 domain name secondary server name [required]
checksum MD5 encrypted digest

For example: dn=abc.com&enc=E&client=agent111&dns=ns.xinnetdns.com.
POST data must be URL encoded, otherwise the Chinese information will be incorrect

Verification: The source IP of client and POST must be the same as the address filled in by the agent
checksum=MD5("ModDns"+client+password+dn+dns1+dns2)
"ModDns" is a string constant representing the interface name.
Others without quotation marks are represented as POST parameter variables, and password is the authentication password set in the proxy area
client is the client number, dn is the domain name, dns1, dns2 is the name of the domain name server [for example: ns.xinnetdns.com]

Return result: ret registration result, 0 fails, 100 succeeds
info normal information, 1
err wrong information, 0-N
returned messages:
Format: operation/object-result
mod-success modified successfully
mod-failure Modification failed
auth-failure authentication failed
name-null Domain name is empty
name-wrong wrong domain name suffix
name-invalid Invalid domain name contains wrong characters
client-invalid Invalid client number
client-null Client ID is empty
verify-null no digest
db-fail database connection failed
verify-failure digest authentication failed
dns1-invalid Invalid primary name server name
dns1-null Primary name server name is empty
dns2-invalid The secondary domain name server name is invalid
dns2-null The secondary domain name server name is empty
domain-auth-Failed The domain name is not owned by the proxy

Example: ret=100&info=mod-success
ret=0&err=auth-failure
3.5 Domain renewal interface
POST address: http://api.xinnet.com/domain/api.gb?method=DomainRenew
http://api.xinnet.com/domain/api.gb?method=DomainRenew&charset=utf-8 (utf-8 character set)
parameter:
client proxy number; 1
dn domain name; 1, including name and suffix
enc code, E, G; 1;
begindate Renewal start date yyyy-mm-dd (start date refers to the current expiration time of the domain name)
period The number of renewal years, which cannot be greater than 9 or equal to 0

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us