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

From Hostway API Documentation
Jump to: navigation, search

GET /orders/{orderId}/account/products/{productId}/services/{serviceId}

Get details about a specific service in a given product.

Contents


Request

GET /orders/{orderId}/account/products/{productId}/services/{serviceId}

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
serviceId - string
UUID specifying the service

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 assess to get the information about the service.
404 Not Found Resource not found The client is trying to get the information for a service for non existing order, product or service.
502 Bad Gateway - Unexpected backend response.

Response Body

Successful response

{
  "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/{relatedServiceId}" ],
  "associatedTo": [ "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"
}
Parameters
status - string
Current status of the service. Allowed values are new, placed, 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 related in some way to the current service
associatedTo - list (optional)
A list containing other services that are associated in some way to the service. The list may contain links to other new services in the order and/or a link to an existing service that belongs to the same account and product. In most cases the list may be empty unless otherwise stated.
serviceSpecification - string
Link to the product catalogue specification describing the given service
billingCycle - integer
Billing cycle 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

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 service.
{
    "forbidden": {
        "guid": "d336dd8e-bc52-44f3-b672-9aa2fac7fbf4",
        "message": "Unauthorized: Services failed permission check",
        "code": 403,
        "details": ""
    }
}
404 Not Found - the order, product or service 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


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox