PUT api/Domain/{handle}?user={user}

Update status (protect/unprotect), anonymouswhois, autorenew

Request Information

URI Parameters

NameDescriptionTypeAdditional information
handle

Domain handle

string

Required

user

Optional user handle - if empty logged in user will be used

string

None.

Body Parameters

Domain object with fields to update

UpdateDomain
NameDescriptionTypeAdditional information
Status

string

None.

HasAnonymousWhois

Flag to make whis anonymous

boolean

None.

AutoRenew

Has auto renew - only available to owner or reseller

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "HasAnonymousWhois": true,
  "AutoRenew": true
}

application/xml, text/xml

Sample:
<UpdateDomain xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Domain">
  <AutoRenew>true</AutoRenew>
  <HasAnonymousWhois>true</HasAnonymousWhois>
  <Status>sample string 1</Status>
</UpdateDomain>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'UpdateDomain'.

Response Information

Resource Description

Collection of errors. Error has a code of 200 with detail if successful.
Return codes
200 - ok
300 - ambiguous
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
570 - object status does not allow for operation
550 - parameter value policy error
572 - operation not allowed for this TLD

Collection of DomainError
NameDescriptionTypeAdditional information
Code

Error code

integer

None.

Detail

Error description

string

None.

Data

Additional information

Object

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Code": 200,
    "Detail": "Domain update ticket created.",
    "Data": {
      "Property": {
        "Name": "Status",
        "Value": "protected"
      }
    }
  },
  {
    "Code": 572,
    "Detail": "Anonmymous Whois not applicable on this extension (fr)",
    "Data": {
      "Property": {
        "Name": "OrHasAnonymousWhoisgName",
        "Value": true
      }
    }
  }
]

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' with data contract name 'ArrayOfKeyValueOfstringanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' with data contract name 'ArrayOfKeyValueOfstringanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.