Orders-orderId:GET

From Hostway API Documentation
Revision as of 16:31, 27 September 2013 by Mike.robski (Talk | contribs)
Jump to: navigation, search

GET /orders/{orderId}

Returns the content of an order specified by the URI.

Contents

Request

GET /orders/{orderId}

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.
Authorization
Optional. Specify the Authorization header when requesting details for an order that was already submitted. Follow the instructions for API Authentication.

Response

Status Code

200 OK
Success.
401 Unauthorized
The OwnerId cookie or the Authorization header are not specified or do not permit access to the specified order.
404 Not Found
The specified order does not exist.

Response Body

The response body may contain additional information beyond what is specified in the documentation. Such information should be ignored or treated as volatile, since it may change in the future.

{
  "order": {
    "Status": "{orderStatus}",
    "Account": "{accountUrl}"
  },
  "links": {
    "self": {"href": "https://api.hostway.com/orders/{orderId}/", "rel": "self"}
  }
}
 

Parameters

orderStatus - string
The status of the order.
accountUrl - string (optional)
Hypermedia for the account of this order. Link to the account.
links - list
Hypermedia for this resource. Link to the order.

Example

Request

GET /orders/0000013ca61880fbfc068b33000a02c9d8ef861c
Cookie: OwnerId=948ce0d4-7cf0-43b6-88a5-2b3f1331b689; Path=/
 

Response

200 OK
Content-Type: application/json; charset=UTF-8

{
  "order": {
    "Status": "new",
    "Account": "http://accounts/acc20130821"
  },
  "links": {
    "self": {"href": "https://api.hostway.com/orders/0000013ca61880fbfc068b33000a02c9d8ef861c/", "rel": "self"}
  }
}
 

OPTIONS /orders/{order_id}

In addition to the GET method the API supports the OPTIONS method for direct browser access to the API. The format of the request is:

OPTIONS /orders/{order_id}

Parameters

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

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

200 OK
Success.
404 Not Found
The specified order does not exist.

Response Headers

Access-Control-Allow-Methods
A comma-separated list of request methods supported on this URI.
Access-Control-Allow-Origin
All origins are allowed. This header has value *.

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox