Orders-orderId-account-contactInfo:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 98) |
Revision as of 07:51, 15 September 2014
GET /orders/{orderId}/account/contactInfo
Get all contact infos for an account in a given order.
Contents |
Request
GET /orders/{orderId}/account/contactInfo
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. |
404 Not Found | Resource not found | The order does not have any contact info. |
The specified order does not exist. | ||
AccountNumber is missing. Make sure the account is set before querying. | An account was not set for the order. | |
502 Bad Gateway | - | Unexpected backend response. Cannot retrieve contact infos. |
Response Body
{ "contactInfo": { "regular": {...}, "billing": {...}, "administrator": {...}, "technical": {...} }, "links": [ {"href": "https://api.hostway.com/orders/{orderId}/account/contactInfo/", "rel": "self"} ] }
Parameters
- contactInfo - dictionary
- Details for all contact types specified for the account.
- links - list
- Hypermedia for this resource.
Example
Non-existent contact info for the order
Request
GET /orders/{orderId}/account/contactInfo Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "80d5e49e-0795-4209-a929-1ee051e0f252", "message": "Resource not found", "code": 404, "details": "" } }
Order does not exist
Request
GET /orders/{non-existent_orderId}/account/contactInfo Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "80d5e49e-0795-4209-a929-1ee051e0f252", "message": "Resource not found", "code": 404, "details": "" } }
Unset account for the order
Request
GET /orders/{orderId}/account/contactInfo Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "80d5e49e-0795-4209-a929-1ee051e0f252", "message": "AccountNumber is missing. Make sure the account is set before querying.", "code": 404, "details": "" } }
See also