Orders-orderId-account-products-productId-services:GET

From Hostway API Documentation
Revision as of 07:51, 15 September 2014 by Mike.robski (Talk | contribs)
Jump to: navigation, search

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.
404 Not Found Resource not found The client is trying to get the services for non existing order or non existing product

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,
      "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"}
  ]
} 

Error responses

404 Not Found
{
    "itemNotFound": {
        "guid": "3a422918-24c3-4c20-9bee-f1c61695e987",
        "message": "Resource not found",
        "code": 404,
        "details": ""
    }
}

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 and purge_pending
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
attributes - string
A link to the attributes of the service
links - list
Hypermedia for the list of product resources

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox