Accounts-accountId-domains-domainName:PUT
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 87) |
Mike.robski (Talk | contribs) m (1 revision: Release 100) |
||
| (One intermediate revision by one user not shown) | |||
| Line 26: | Line 26: | ||
"authInfo" : "{authInfo}", | "authInfo" : "{authInfo}", | ||
"nameservers" : [ "{nameserver}", "{nameserver}" ], | "nameservers" : [ "{nameserver}", "{nameserver}" ], | ||
| − | " | + | "extraParams": [{"name": "...", "value": "..."}, ...], |
| − | + | ||
| − | + | ||
| − | + | ||
"contactInfo" : { | "contactInfo" : { | ||
"registrant": { | "registrant": { | ||
| Line 70: | Line 67: | ||
; nameservers - ''list of strings'' | ; nameservers - ''list of strings'' | ||
: domain name servers (DNS) for the domain | : domain name servers (DNS) for the domain | ||
| − | + | {{ExtraParam}} | |
| − | + | ||
| − | + | ||
| − | + | ||
; company - ''string'' (optional) | ; company - ''string'' (optional) | ||
: The company or organization name | : The company or organization name | ||
| Line 186: | Line 180: | ||
"authInfo" : "mysecret", | "authInfo" : "mysecret", | ||
"nameservers" : [ "ns1.test.com", "ns2.test.com" ], | "nameservers" : [ "ns1.test.com", "ns2.test.com" ], | ||
| − | " | + | "extraParams": [{"name": "us_nexus", "value": "C11"}, {"name": "us_purpose", "value": "P1"}], |
| − | + | ||
| − | + | ||
| − | + | ||
"contactInfo" : { | "contactInfo" : { | ||
"registrant": { | "registrant": { | ||
| Line 223: | Line 214: | ||
<nowiki> | <nowiki> | ||
202 Accepted | 202 Accepted | ||
| + | |||
{ | { | ||
"orderId": "00000141381446d465883bc9007f000000010001", | "orderId": "00000141381446d465883bc9007f000000010001", | ||
Latest revision as of 23:09, 18 November 2014
[edit] PUT /accounts/{accountId}/domains/{domainName}
Place a domain registration order for an existing account.
Contents |
[edit] Request
PUT /accounts/{accountId}/domains/{domainName}
[edit] URI Parameters
- accountId - string
- The account number
- domainName - string
- The domain name. IE: example.com is a valid domain name, whereas http://www.example.com or www.example.com are not. If the domain name is invalid, or is otherwise not registerable such as for a non-existent or non-supported TLD, an error will be returned. Domain names are case insensitive. The domain name must be an open or suspended product under the authenticated franchise.
[edit] Request Headers
- Content-Type
- Required. Set this header to
application/json; charset=UTF-8 - Authorization
- Required.
[edit] Request Body
Request Body for registering a domain
{
"domainName": "{domainName}",
"operation": "register",
"term": {term},
"authInfo" : "{authInfo}",
"nameservers" : [ "{nameserver}", "{nameserver}" ],
"extraParams": [{"name": "...", "value": "..."}, ...],
"contactInfo" : {
"registrant": {
"type": "registrant",
"firstName": "{firstName}",
"lastName": "{lastName}",
"company": "{company}",
"street1": "{street1}",
"city": "{city}",
"zipOrPostal": "{zipOrPostal}",
"stateOrProvince": "{stateOrProvince}",
"countryCode": "{countryCode}",
"email1": "{email1}",
"phone1": "{phone1}" },
"administrative": {
"type": "administrative",
...
},
"billing": {
"type": "billing",
...
},
"technical": {
"type": "technical",
...
}
}
}
[edit] Request Parameters
- domainName - string
- The domain name
- operation - string
- "register" to register a domain
- term - integer
- the registration term (period) in years
- authInfo - string
- authentication info, currently not supported
- nameservers - list of strings
- domain name servers (DNS) for the domain
- extraParams - list of extra params (optional)
- List of additional parameters required for some TLDs. Each parameter is an object with "name" and "value" fields. For example, .us registration requires the fields "us_nexus" which can be one of the following [C11, C12, C21, C31, C32] - see What are Domain Name Application Purpose Codes? and "us_purpose" which can be one of [P1, P2, P3, P4, P5] - see What do the Nexus Codes mean? You can find more information on extra parameters in the GET /domains/tlds/{tld}/extparams documentation.
- company - string (optional)
- The company or organization name
- firstName - string
- The first name of the contact person
- lastName - string
- The last name of the contact person
- street1 - string
- The street address
- street2 - string (optional)
- The second line of the street address (if any)
- city - string
- The city
- countryCode - string
- The international 2-letter country code
- stateOrProvince - string
- The state or province. For US states use the 2-letter state code
- zipOrPostal - string
- The postal code
- email1 - string
- The e-mail address of the contact person
- phone1 - string
- The phone number of the contact person in valid E.164 format, e.g. +1.3209270625
[edit] Response
[edit] Status Code
- 202 Accepted
- The domain registration order has been submitted.
- 400 Bad Request
- The domain information is invalid.
[edit] Response Body
Response Body for registering domain
The response contains the order id and the link for the domain registration order.
{
"orderId": "0000013dfeb0db5aa6c51427000ac81d1e6e110e",
"links":
[{"href": "http://coreapi01.ote.chicago.hostway:8100/orders/0000013dfeb0db5aa6c51427000ac81d1e6e110e",
"rel": "self"}]
}
[edit] Example of ordering .com domain.
PUT /accounts/acct839326/domains/ng-test-fitnesse-shortcut-20130412-0940.com
Content-Type: application/json; charset=UTF-8
Authorization: Basic ...
{
"domainName": "ng-test-fitnesse-shortcut-20130412-0940.com",
"operation": "register",
"term": 1,
"authInfo" : "mysecret",
"nameservers" : [ "ns1.test.com", "ns2.test.com" ],
"contactInfo" : {
"registrant": {
"type": "registrant",
"firstName": "John",
"lastName": "Doe",
"company": "ACME Inc.",
"street1": "123 First Str.",
"city": "Chicago",
"zipOrPostal": "34567",
"stateOrProvince": "IL",
"countryCode": "US",
"email1": "john.doe@test.com",
"phone1": "+1.312.456789098"
},
"administrative": {
"type": "administrative",
...
},
"billing": {
"type": "billing",
...
},
"technical": {
"type": "technical",
...
}
}
}
Response
202 Accepted
{
"orderId": "0000013dfeb0db5aa6c51427000ac81d1e6e110e",
"links":
[{"href": "http://coreapi01.ote.chicago.hostway:8100/orders/0000013dfeb0db5aa6c51427000ac81d1e6e110e",
"rel": "self"}]
}
[edit] Example of ordering .us domain.
PUT /accounts/acct839326/domains/ng-test-Fitnesse-shortcut-20130919-0134.us
Content-Type: application/json; charset=UTF-8
Authorization: Basic ...
{
"domainName": "ng-test-Fitnesse-shortcut-20130919-0134.us",
"operation": "register",
"term": 1,
"authInfo" : "mysecret",
"nameservers" : [ "ns1.test.com", "ns2.test.com" ],
"extraParams": [{"name": "us_nexus", "value": "C11"}, {"name": "us_purpose", "value": "P1"}],
"contactInfo" : {
"registrant": {
"type": "registrant",
"firstName": "John",
"lastName": "Doe",
"company": "ACME Inc.",
"street1": "123 First Str.",
"city": "Chicago",
"zipOrPostal": "34567",
"stateOrProvince": "IL",
"countryCode": "US",
"email1": "john.doe@test.com",
"phone1": "+1.312.456789098"
},
"administrative": {
"type": "administrative",
...
},
"billing": {
"type": "billing",
...
},
"technical": {
"type": "technical",
...
}
}
}
Response
202 Accepted
{
"orderId": "00000141381446d465883bc9007f000000010001",
"links":
[{"href": "http://coreapi01.ote.chicago.hostway:8182/orders/00000141381446d465883bc9007f000000010001",
"rel": "self"}]}
}
[edit] See also