PartnerAccounts-partnerAccountId-attributes-attribute:PUT

From Hostway API Documentation
Revision as of 06:18, 7 October 2013 by Velimira.metodieva (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PUT /partnerAccounts/{partnerAccountId}/attributes/{attribute}

Updates attribute value.

Contents

Request

PUT /partnerAccounts/{partnerAccountId}/attributes/{attribute}

Parameters

partnerAccountId - string
The Id of the partner account.

URI Parameters

attribute - string

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Content-Type
application/json

Request Body

{
    "value": "{value}"
}
 

Parameters

value - string

Response

Status Code

204 No Content
Success.
400 Bad Request
The format of the request body is invalid.
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
403 Forbidden
Forbidden access to a user not authorized for such access.
404 Not Found
The partner account Id or attribute were not found.
415 Unsupported Media Type
The Content-Type header was not specified or the specified type is not supported. Use application/json.

Examples

Sending unauthorized request

Request

PUT /partnerAccounts/partner-account-id/attributes/test_attribute

{"value": "test"}
 

Response

401 Unauthorized
 

Sending request without setting Content-Type

Request

PUT /partnerAccounts/partner-account-id/attributes/test_attribute
Authorization: Basic base64_encode(username:password)

{"value": "test"}
 

Response

415 Unsupported Media Type
 

Failure updating not existing attribute

Request

PUT /partnerAccounts/partner-account-id/attributes/not_existing_attribute
Authorization: Basic base64_encode(username:password)
Content-Type: application/json

{"value": "test"}
 

Response

404 Not Found
 


Failure updating attribute with missing required value

Request

PUT /partnerAccounts/partner-account-id/attributes/not_existing_attribute
Authorization: Basic base64_encode(username:password)
Content-Type: application/json

{}
 

Response

400 Bad Request

{"value":"Required"}
 

Success scenario

Request

PUT /partnerAccounts/partner-account-id/attributes/test_attribute
Authorization: Basic base64_encode(username:password)
Content-Type: application/json

{"value": "test"}
 

Response

204 No Content
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox