PartnerAccounts-partnerAccountId-attributes:POST

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(POST /partnerAccounts/{partnerAccountId}/attributes)
 
m (1 revision: Release 86)
 

Latest revision as of 12:01, 11 October 2013

[edit] POST /partnerAccounts/{partnerAccountId}/attributes

Get attributes list.

Contents

[edit] Request

POST /partnerAccounts/{partnerAccountId}/attributes

[edit] Parameters

partnerAccountId - string
The Id of the partner account.

[edit] URI Parameters

None.

[edit] Request Headers

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

[edit] Request Body

{
  "name": "test_attribute",
  "value": "value"
}
 

[edit] Parameters

name - string
Descriptive name of the attribute
value - dictionary
Value of the attribute

[edit] Response

[edit] Status Code

201 Created
Success.
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.

[edit] Examples

[edit] Sending unauthorized request

Request

POST /partnerAccounts/partner-account-id/attributes

{"name": "test_Account", "value": "test"}
 

Response

401 Unauthorized
 

[edit] Sending request without setting Content-Type

Request

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

{"name": "test_Account", "value": "test"}
 

Response

415 Unsupported Media Type
 

[edit] Failure creating attribute for not existing partner

Request

POST /partnerAccounts/not-existing-partner-account-id/attributes
Authorization: Basic base64_encode(username:password)
Content-Type: application/json

{"name": "test_Account", "value": "test"}
 

Response

404 Not Found
 

[edit] Success scenario

Request

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

{"name": "test_Account", "value": "test"}
 

Response

201 Created

 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox