Orders-orderId-account-attributes:GET

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
Line 14: Line 14:
 
=== Request Headers ===
 
=== Request Headers ===
 
{{Cookie-OwnerId}}
 
{{Cookie-OwnerId}}
 +
  
 
== Response ==
 
== Response ==
  
 
=== Status Code ===
 
=== Status Code ===
;200 OK
+
{| class='wikitable'
: The operation was successfully completed.
+
|-
 
+
! Status Code
;404 Not Found
+
! Error Message
: An account has not been added to the given order or the order does not exist.
+
! Description
 +
|-
 +
| 200 OK
 +
| align="center" | -
 +
| The operation was successfully completed.
 +
|-
 +
| 401 Unauthorized
 +
| align="center" | -
 +
| No owner Id specified or the specified owner is not authorized to get attributes for this account.
 +
|-
 +
| rowspan="2" | 404 Not Found
 +
| Resource not found
 +
| The specified order does not exist.
 +
|-
 +
| MetaData is missing. Make sure the account is set before querying attributes.
 +
| An account should be set before getting info for attributes.
 +
|}
  
 
=== Response Body ===
 
=== Response Body ===
Line 49: Line 66:
 
; links - ''list''
 
; links - ''list''
 
: [[Hypermedia]] for this resource.
 
: [[Hypermedia]] for this resource.
 +
 +
 +
== Example ==
 +
=== Get attributes of unset account ===
 +
'''Request'''
 +
<nowiki>
 +
GET /orders/{orderId}/account/attributes
 +
Cookie: OwnerId={owner_id}; Path=/</nowiki>
 +
 +
'''Response'''
 +
<nowiki>
 +
404 Not Found
 +
Content-Type : application/json; charset=UTF-8
 +
 +
{
 +
  "itemNotFound": {
 +
    "guid": "0068a205-0c4c-4105-9a14-dafe313bfc3a",
 +
    "message": "MetaData is missing. Make sure the account is set before querying attributes.",
 +
    "code": 404,
 +
    "details": ""
 +
  }
 +
}</nowiki>
  
 
== See also ==
 
== See also ==
 
* [[Orders|Orders API]]
 
* [[Orders|Orders API]]
 
* [[Common Features]]
 
* [[Common Features]]
 
 
{{disqus}}
 
{{disqus}}
 
[[Category:Hostway API]]
 
[[Category:Hostway API]]
 
[[Category:Ordering API]]
 
[[Category:Ordering API]]

Revision as of 06:27, 5 September 2014

GET /orders/{orderId}/account/attributes

Get the list of attributes for an account in a given order.

Contents


Request

GET /orders/{orderId}/account/attributes

Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.

URI Parameters

None.

Request Headers

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.


Response

Status Code

Status Code Error Message Description
200 OK - The operation was successfully completed.
401 Unauthorized - No owner Id specified or the specified owner is not authorized to get attributes for this account.
404 Not Found Resource not found The specified order does not exist.
MetaData is missing. Make sure the account is set before querying attributes. An account should be set before getting info for attributes.

Response Body

{
 "list": [
  {
   "name": "{attributeName}",
   "value": "{attributeValue}"
  },
  ...
 ],
 "links": [
  {"href": "https://api.hostway.com/orders/{orderId}/account/attributes/", "rel": "self"}
 ]
}
 

Parameters

attributeName - string
The unique name of the attribute.
attributeValue - string
The value of the attribute.
links - list
Hypermedia for this resource.


Example

Get attributes of unset account

Request

GET /orders/{orderId}/account/attributes
Cookie: OwnerId={owner_id}; Path=/

Response

404 Not Found
Content-Type : application/json; charset=UTF-8

{
  "itemNotFound": {
    "guid": "0068a205-0c4c-4105-9a14-dafe313bfc3a",
    "message": "MetaData is missing. Make sure the account is set before querying attributes.",
    "code": 404,
    "details": ""
  }
}

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox