1. General Description of the API
1.1. General Interaction Principles
HTTP is the transport protocol for calling API functions. The API supports both GET and POST requests. However, POST is the recommended method, as it has no limit on request length.
Each call is atomic and synchronous, meaning all requests are independent of each other. Most operations are synchronous: the result of the operation is returned immediately, and there are no intermediate states during the operation. Some operations may require verification of the result.
1.2. Request Format
The URL for calling functions looks like this:
https://api.registrar.com.ua/?action=<function_category_name>/<function_name>[&<HTTP_parameters_for_GET_requests>]
Example of a simple request:
https://api.registrar.com.ua/?action=account/info&username=test@user.com&password=testpassword
Almost all functions require additional parameters for calling. Requests are executed in UTF-8 encoding. IDN domains in the zone can also be transmitted in punycode.
1.3. Passing Input Parameters
Data is transferred in the following format:
- function
- authentication parameters
- function-specific parameters
1.4. Response Formats
JSON is the default format. Example of a request response:
{"account":{"email":"test@user.com","currency":"USD","prepay":"10.34","tariff":"Bronze"},"result":"success"}
2. List functions
- account/info
- account/prices
- account/domains
- account/invoices
- domain/check
- domain/register
- domain/transfer
- domain/renew
- domain/info
- domain/update
- domain/update/lock
- domain/update/privatewhois
- domain/update/nameservers
- domain/transfercode
- domain/contacts/get
- domain/contacs/validate
- domain/contacts/update
- domain/privatens/get
- domain/privatens/add
- domain/privatens/del
- domain/dns/get
- domain/dns/update
2.1 Function "account/info"
Getting account information - currency, tariff, account balance. Example:
https://api.registrar.com.ua/?action=account/info&username=test@user.com&password=testpassword
Response (successful):
{"account":{"email":"test@user.com","currency":"USD","prepay":"10.34","tariff":"Bronze"},"result":"success"}
Answer (with error):
{"result":"error","code":10,"message":"AUTH_FAILED","error_text":"Incorrect username\/password"}
2.2 Function "account/prices"
Returns a list of zones available for registration with registration, renewal, and transfer prices in the user's currency. Request:
https://api.registrar.com.ua/?action=account/prices&username=test@user.com&password=testpassword
Response:
{"zones":{".ru":{"register":"1.65","transfer":"1.50","renew":"2.15","idn":false},".\u0440\u0444":{"register":"1.65", "transfer":"1.50","renew":"2.15","idn":true},".\u0440\u0443\u0441":{"register":"1.60","renew":"9.70","idn":true},".\u0440\u0443\u0441":{"register":"1.60","renew":"9.70","idn":true},".\u0443\u043a\u0440":{"register":"7.00","transfer":"7.00","renew":"7.00","idn":false}},"result":"success"}
2.3 The "account/domains" Function
Returns a list of the user's domains with their registration expiration dates and current domain status. Query:
https://api.registrar.com.ua/?action=account/domains&username=test@user.com&password=testpassword
Answer:
{"domains":[{"domain":"testdomain.it","status":"Active","createdate":"2016-07-09","expiryda te":"2017-03-22"},{"domain":"testdomain.com.ua","status":"Expired","createdate":"2014-12-31","expirydate":"2016-12-31"},{"domain":"te stdomain.ru","status":"PendingTransfer","createdate":"2016-12-31","expirydate":"0000-00-00"}],"result":"success"}
Possible Domain statuses:
Pending - domain in the process of registration or awaiting payment
Active - active domain
PendingTransfer - domain awaiting transfer
Expired - expired domain
Cancelled - canceled registration or transfer, domains transferred from us
2.4 "Account/Invoices" Function
statdate - report start date (optional, defaults to the current date)
enddate - report end date (optional)(by default, minus 30 days from the start date. The maximum period is 1 year.)
Returns a list of invoices. Query:
https://api.registrar.com.ua/?action=account/invoices&username=test@user.com&password=testpassword
Answer:
{"invoices":[{"id":"71690","subtotal":"0.00","credit":"0.00","total":"0.00","date": "2020-01-10","paiddate":"2020-01-11 14:02:31","status":"Paid","items":[{"description":"WordPress Hosting - Portal (test-domain.com) \/ 3 months","amount":"5.00"},{"description":"Promo code: testcode - 100.00% current discount","amount":"-5.00"}]}],"result":"success"}
2.5 "domain/check" function
Checking the availability of a domain for registration. Query:
https://api.registrar.com.ua/?action=domain/check&username=test@user.com&password=testpassword&domain=testdomain.ru
Domain available for registration:
{"status":"available","result":"success"}
Domain not available for registration (busy/reserved):
{"status":"unavailable","whoisdata":"% By submitting a query to RIPN's Whois Service\u003Cbr \/\u003E\n% you agree to abide by the following terms of use:\u003Cbr \/\u003E\n% http:\/\/www.ripn.net\/about\/servpol.html#3.2 (in Russian) \u003Cbr \/\u003E\n% http:\/\/www.ripn.net\/about\/en\/servpol.html#3.2 (in English).\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nblocking: Domain can not be registered.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nLast updated on 2017.01.07 23:11:31 MSK\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n","result":"success"}
Error in Domain:
{"result":"error","code":21,"message":"DOMAIN_BAD_TLD","error_text":"Unsupported zone"}
2.6 "domain/register" Function
Domain registration. Contains a different set of parameters depending on the zone.
| Parameter name |
Length |
Note |
| Common fields for all domains |
domain |
2-63 |
The name of the domain being registered. This is a required field. |
country |
2 |
Two-letter ISO country code. Some domain extensions only allow countries officially covered by the extension. Required field. |
postcode |
3-10 |
Domain owner's postal code. Required field. |
state |
2-40 |
Domain owner's address: region/territory/state. |
city |
2-80 |
Domain owner's address: city. Required field. |
address |
8-80 |
Domain owner's address: street, building, office (apartment). Required field. |
phone |
8-20 |
Domain owner's phone number. The phone number must be specified in international format (+380.951112233). Required field. |
email |
6-255 |
Domain owner's contact email address. Required field. |
whoisprotect |
1 |
Disable 0 or enable 1 WHOIS data protection, if supported by the domain. |
nameservers |
0-255 |
A list of the domain's nameservers, separated by ";", example: ns1.nameserver.com.ua;ns2.nameserver.com.ua. Maximum of 4 name servers. |
| Fields for .US domains |
nexuscategory |
3 |
Domain Owner:
C11 - US Citizen
C12 - US Permanent Resident
C21 - US Company
C31 - Foreign Company Doing Business in the US
C32 - Foreign Company with an Office in the US
Required field. |
firstname |
1-80 |
First name of the domain owner. Required field. |
lastname |
1-80 |
Last name of the domain owner. Required field. |
companyname |
6-255 |
Name of the organization. |
uspurpose |
2 |
Scope of use:
P1 - For-profit business
P2 - Non-profit organization, club, etc.
P3 - Personal use
P4 - For educational purposes
P5 - For government purposes
Required field. |
| Fields for .IT domains |
regtype |
1 |
Domain owner:
1 - Italian and foreign individuals
2 - Companies/Individual entrepreneurs
3 - Freelancers/professionals
4 - Non-profit organizations
5 - Public organizations
6 - Other entities
7 - Foreigners who qualify 2-6
Required field. |
nationality |
2 |
Nationality. Two-letter ISO country code. Required for individuals (regtype=1). |
firstname |
1-80 |
Name of the domain owner. Required field. |
lastname |
1-80 |
Last name of the domain owner. Required field. |
companyname |
6-255 |
Name of organization. |
regcode |
4-20 |
For Italian citizens, this must include the Codice Fiscale; for foreigners, this must include the passport number; for organizations, this must include the tax identification number (for Italian organizations, this must include the 11-digit VAT number or n.a.). Required field. |
country |
2 |
Two-letter ISO country code of the European Union. Required field. |
state |
2-40 |
Region/province/state. For Italy - 2-letter provincial code. Required field. |
hidedetails |
1 |
Show 0 or hide 1 owner details in WHOIS |
itterms |
3 |
YES - agree to .IT zone rules. Required field. |
| Fields for .EU domains |
firstname |
1-80 |
Domain owner's name. Required field. |
lastname |
1-80 |
Domain owner's last name. Required field. |
companyname |
6-255 |
Organization name. |
country |
2 |
Two-letter ISO country code of the European Union. Required field. |
| Fields for domains .KZ/.ORG.KZ/.COM.KZ/.ҚАЗ |
firstname |
1-80 |
Domain owner's name. Required field. |
lastname |
1-80 |
Domain owner's last name. Required field. |
companyname |
6-255 |
Organization name. |
srvloc_sp |
2-40 |
Server location, region in Kazakhstan. Required field. |
srvloc_city |
2-80 |
Server location, city. Required field. |
srvloc_street |
8-80 |
Server location, address. Required field. |
| Fields for .FR/.RE/.PM domains |
regtype |
5-11 |
Domain Owner:
INDIVIDUAL - individual
COMPANY - company
TRADEMARK - trademark
ASSOCIATION - association
OTHER - other
Required field. |
firstname |
1-80 |
The domain owner's first name. This field is required when registering to an individual. |
lastname |
1-80 |
The domain owner's last name. This field is required when registering to an individual. |
birthdate |
10 |
The domain owner's date of birth in the format DD.MM.YYYY. A required field when registering to an individual. |
birthcountry |
2 |
ISO code of the domain owner's country of birth. A required field when registering to an individual. |
birthcity |
2-80 |
The domain owner's city of birth. A required field when registering to an individual and the birth country is FR. |
birthpostalcode |
5 |
The postal code in the domain owner's city of birth. A required field when registering for an individual and the country of birth is FR. |
hidedetails |
1 |
Show 0 or hide 1 the owner's details in WHOIS when registering for an individual |
otherstatus |
3-80 |
Legal status. A required field when regtype=OTHER. |
name |
3-80 |
Name of the domain owner (company, association, etc.). A required field when registering other domains to an individual. |
trademark |
3-80 |
Trademark. A required field when registering a trademark. |
waldec |
3-80 |
Waldec ID. An optional field when registering for an association. |
assocationdate |
10 |
Association date. A required field in the format DD.MM.YYYY when registering for an association unless waldec is specified. |
publicationdate |
10 |
Publication date. A required field in the format DD.MM.YYYY when registering for an association, if waldec is not specified. |
announce |
3-80 |
Announce No. A required field when registering for an association, if waldec is not specified. |
page |
3-10 |
Page No. A mandatory field when registering for an association if waldec is not specified. |
vatnum |
3-30 |
VAT number. |
duns |
9 |
D-U-N-S (Data Universal Numbering System) number. |
siren |
9 |
SIREN number. |
| Fields for .PRO domains |
firstname |
2-80 |
First name of the domain owner. Required field. |
lastname |
2-80 |
Last name of the domain owner. Required field. |
companyname |
6-255 |
Organization name. |
profession |
6-255 |
Profession. Required field. |
license |
6-255 |
License number. |
authority |
6-255 |
Name of the authority from which the registrant received the license. |
authority_url |
6-255 |
URL of the website of the authority that issued the license. |
| Fields for other domains |
firstname |
2-80 |
First name of the domain owner. Required field. |
lastname |
2-80 |
Last name of the domain owner. Required field. |
companyname |
6-255 |
Organization name. |
Response - successful registration:
{"status":"Completed","result":"success"}
Response - added to the registration queue:
{"status":"Queued","result":"success"}
Response - with an error:
{"result":"error","code":25,"message":"PARAMETER_INCORRECT","error_text":"phone has incorrect format or data"}
2.7 "domain/transfer" Function
Transfer a domain from another registrar. The parameters are identical to the "domain/register" function. Additional parameter:
transfercode - transfer code (you can get it from your current registrar)
2.8 "domain/renew" function
Domain renewal for 1 year.
domain - the domain being renewed.
2.9 "domain/info" function
Displays domain information - DNS list, blocking status, data protection status, and registration expiration date.
domain - the domain about which you are receiving information.
Successful response.
{"expirydate":"2017-10-14","lockstatus":"unknown","nameservers":[{"ns":"ns3.registrar.com.ua","ip":"198.27.126.94"},{"ns":"ns1.registrar.com.ua","ip":"198.245.60.140"},{"ns":"ns2.registrar.com.ua","ip":"198.27.126.95"}],"result":"success"}
2.10 "domain/update/lock" Function
Enable or disable transfer protection (for those zones that support it).
domain - domain
enable - with the value on, locked, or 1 - enables blocking; The values off, unlocked, or 0 disable locking.
Example request:
https://api.registrar.com.ua/?action=domain/update/lock&username=test@user.com&password=testpassword&domain=testdomain.com&enable=on
Response (successful enablement):
{"status":"Completed","result":"success"}
Response (successful enablement, task added to queue):
{"status":"Queued","result":"success"}
2.11 Function "domain/update/privatewhois"
Enables or disables privacy protection (for zones that support it).
domain - domain
enable - with a value of on, enabled, or 1 - enables privacy; The values off, disabled, or 0 disable data hiding.
Example request:
https://api.registrar.com.ua/?action=domain/update/privatewhois&username=test@user.com&password=testpassword&domain=testdomain.com&enable=on
Response (successful enabling):
{"status":"Completed","result":"success"}
Response (successful enabling, task added to queue):
{"status":"Queued","result":"success"}
2.12 Function "domain/update/nameservers"
Update the list of DNS servers for a domain.
domain - domain
nameservers - list of DNS servers, separated by ;
Example Request:
https://api.registrar.com.ua/?action=domain/update/privatewhois&username=test@user.com&password=testpassword&domain=testdomain.com&nameservers=ns1.registrar.com.ua;ns2.registrar.com.ua
Response (successful update):
{"status":"Completed","result":"success"}
Response (successful update, task added to queue):
{"status":"Queued","result":"success"}
2.13 Function "domain/transfercode"
Getting the code Domain transfer (if supported by the zone).
domain - the domain about which you are receiving information.
Example request:
https://api.registrar.com.ua/?action=domain/transfercode&username=test@user.com&password=testpassword&domain=testdomain.com
Successful response.
{"code":"USuV$AWY8r","result":"success"}
Error response.
{"result":"error","code":27,"message":"REGISTRY_ERROR","error_text":"Feature not supported for testdomain.ru"}
2.14 Function "domain/contacts/get"
Getting contact information for a domain.
domain - the domain about which you are receiving information.
The response is generated as a structured JSON array by contact information type:
- Registrant:
- postcode
- state
- city
- address
- phone
- email
- ...
- Admin:
- postcode
- state
- city
- address< /li>
- phone
- email
- ...
- Technical:
- postcode
- state
- city
- address
- phone
- email
- ...
- Billing:
- postcode
- state
- city
- address
- phone
- email
- ...
For each contact type, the fields are identical to those used in the domain/register request (unless the optimized parameter is used).
2.15 Function "domain/contacts/validate"
Verifying that contact information is filled in correctly before registering a domain.
The fields are identical to those used in the domain/create request.
Response (successful validation):
{"status":"Valid","result":"success"}
Response (validation error):
{"result":"error","code": 25,"message":"PARAMETER_INCORRECT","error_text":"passport_num, passport_issuer has incorrect format or data"}
2.16 Function "domain/contacts/update"
Updating domain contact information.
domain - the domain about which you are receiving information
contacts - a structured JSON array by contact data types (see domain/contacts/get)
2.17 Function "domain/privatens/get"
Displays a list of private DNS domains (for those zones that support it)
domain - the domain about which you are receiving information
The response is generated as a structured JSON array. Successful answer:
{"nameservers":{"ns1":["198.245.60.140"],"ns2":["192.99.9.183"],"ns3":["2002:6bb5:bb5e::94","107.181.187.94"]},"result":"success"}
2.18 "domain/privatens/add" Function
Adding a private DNS (for zones that support it)
domain - the domain about which you are receiving information
nameserver - the host
ip - the IP address; multiple addresses can be specified via comma
Example request:
https://api.registrar.com.ua/?action=domain/privatens/add&username=test@user.com&password=testpassword&domain=testdomain.com&nameserver=ns1&ip=198.245.60.140
2.19 Function "domain/privatens/del"
Removing private DNS (for those zones that support it)
domain - the domain about which you are receiving information
nameserver - the host
Example request:
https://api.registrar.com.ua/?action=domain/privatens/del&username=test@user.com&password=testpassword&domain=testdomain.com&nameserver=ns1
2.20 Function "domain/dns/get"
Getting DNS records.
2.21 Function "domain/dns/update"
Updating DNS records. Supported records are A, AAAA, MX, CNAME, and TXT.