Orders-orderId-account-products-productId-services-serviceId-attributes:PUT

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 97)
(Status Code)
Line 42: Line 42:
  
 
=== Status Code ===
 
=== Status Code ===
;200 OK
+
{| class="wikitable"
: The attributes were successfully set.
+
! Status Code
 
+
! Error Message
;400 Bad Request
+
! Description
: The request body contains invalid JSON or the values do not adhere to the restrictions set for them.
+
|-
 
+
| 204 No Content
;401 Unauthorized
+
| -
: The ''OwnerId'' cookie was not specified or is incorrect.
+
| The operation was successfully completed.
 
+
|-
;403 Forbidden
+
| rowspan="1"| 400 Bad Request
: The client does not have permissions to add services.
+
| POST data error
 
+
| Trying to create a attribute without body or with invalid body
;404 Not Found
+
|-
: An account has not been added to the given order or the order does not exist.
+
| 401 Unauthorized
 
+
| This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
;405 Method Not Allowed
+
| The ''OwnerId'' cookie was not specified or is incorrect.
: The service does not support attributes.
+
|-
 
+
| 403 Unauthorized
;409 Conflict
+
| -
: A conflict has occurred preventing attributes creation to particular service. There are different conflict situations for different products/services
+
| The client does not have permissions to add products.
:; Domain-dependent services:
+
|-
:: One of the domains to be ordered is already owned by another account or is blacklisted.
+
| 404 Not Found
 
+
| Resource not found
:; Email domain alias service:
+
| The client is trying to add attribute for non existing order, product or service.
:: A domain alias would produce impossible to delivery loops namely:
+
|-
:: - There is an email forwarder from the target domain name to a mailbox of the domain alias with the same username, OR
+
| 405 Method Not Allowed
:: - There is an email forwarder from the domain alias to a mailbox of the target domain name with the same username
+
| -
 +
| The service does not support attributes.
 +
|}
  
 
=== Response Body ===
 
=== Response Body ===

Revision as of 09:53, 11 September 2014

PUT /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes

Adds Attributes to the Service. Not all services support this call. Depending on the service, this call may return a response code of 405 (method not supported).

Contents


Request

PUT /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes

Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.
productId - string
UUID specifying the product
serviceId - string
UUID specifying the service

URI Parameters

None.

Request Headers

Content-Type
Required. Set this header to application/json; charset=UTF-8
Cookie
A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.

Request Body

A dictionary whose keys/values will depend on the service category of the service. See Service Attributes Structure.

{
  "key_one": "Value One",
  "key_two": "Value Two",
  ...
}
 

Validation Rules

  1. The service URL ( https://api.hostway.com/orders/{orderId}/account/products/{productId}/services/{serviceId} ) should point to a valid service already added to the product.
  2. The attribute key/value pair should be allowed for the service specification.

Response

Status Code

Status Code Error Message Description
204 No Content - The operation was successfully completed.
400 Bad Request POST data error Trying to create a attribute without body or with invalid body
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. The OwnerId cookie was not specified or is incorrect.
403 Unauthorized - The client does not have permissions to add products.
404 Not Found Resource not found The client is trying to add attribute for non existing order, product or service.
405 Method Not Allowed - The service does not support attributes.

Response Body

None.

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox