Orders-orderId-account-products-productId-services:GET
From Hostway API Documentation
Revision as of 12:12, 24 July 2015 by Mike.robski (Talk | contribs)
GET /orders/{orderId}/account/products/{productId}/services
Get all Services in a given product.
Contents |
Request
GET /orders/{orderId}/account/products/{productId}/services
Request Parameters
- orderId - string
- The unique order Id. The URI of the order is returned by the POST /orders call.
- productId - string
- UUID specifying the product
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 services for the order and product (if any) are successfully returned. |
401 Unauthorized | This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | The OwnerId cookie or the Authorization header are not specified or do not permit access to the specified order. |
403 Forbidden | Unauthorized: Services failed permission check | The client does not have permissions to get information about the services. |
404 Not Found | Resource not found | The client is trying to get the services for non existing order or non existing product. |
502 Bad Gateway | - | Unexpected backend response. |
Response Body
Successful response
200 OK { "list": [ { "status": "new", "name": "john.smith1", "links": [ {"href": "https://api.hostway.com/orders/{orderId}/account/products/{productId}/services/{serviceId}/", "rel": "self"} ], "relatedTo": [ "https://api.hostway.com/orders/{orderId}/account/products/{productId}/services/{serviceId}" ], "serviceSpecification": "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}", "billingCycle": 1, "quantity": 1, "attributes": "https://api.hostway.com/orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes" } ], "links": [ {"href": "https://api.hostway.com/orders/{orderId}/account/products/{productId}/services/", "rel": "self"} ] }
Parameters
- list - list
- List of the services for the given product. Each element of the list has the following attributes:
- status - string
- Current status of the service. Allowed values are new, pending, open, suspended, close_pending, closed, purge_pending and purged
- name - string
- The name of the specific service
- links - list
- Hypermedia for the product resource
- relatedTo - list
- A list containing other services in the current order related in some way to the current service
- serviceSpecification - string
- Link to the product catalogue specification describing the given service
- billingCycle - integer
- Billing cycle (length of billing period in months) of the service. Allowed values are from 1 to 120
- quantity- integer
- Quantity (if multiple services is allowed) of the service.
- attributes - string
- A link to the attributes of the service
- links - list
- Hypermedia for the list of product resources
Error responses
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
403 Forbidden - the client does not have assess to get the information about the services. { "forbidden": { "guid": "d336dd8e-bc52-44f3-b672-9aa2fac7fbf4", "message": "Unauthorized: Services failed permission check", "code": 403, "details": "" } }
404 Not Found - the order or the product doesn't exist. { "itemNotFound": { "guid": "3a422918-24c3-4c20-9bee-f1c61695e987", "message": "Resource not found", "code": 404, "details": "" } }
502 Bad Gateway - unexpected error from the backend. { "computeFault": { "guid": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce", "timestamp": "2014-09-10 20:59:50", "code": 502, "errorRefId": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce" } }
See also