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

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
(4 intermediate revisions by 3 users not shown)
Line 63: Line 63:
 
   ],
 
   ],
 
   "relatedTo": [ "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{relatedServiceId}" ],
 
   "relatedTo": [ "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{relatedServiceId}" ],
 +
  "associatedTo": [ "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{serviceId}" ],
 
   "serviceSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/serviceSpecifications/{serviceSpecificationId}",
 
   "serviceSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/serviceSpecifications/{serviceSpecificationId}",
 
   "billingCycle": 1,
 
   "billingCycle": 1,
 +
  "quantity": 1,
 
   "attributes": "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes"
 
   "attributes": "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes"
 
}</nowiki>
 
}</nowiki>
Line 80: Line 82:
 
; relatedTo - ''list''
 
; relatedTo - ''list''
 
: A list containing other services related in some way to the current service
 
: 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 [[Orders#Services|other new services in the order]] and/or a link to an [[Account#Products_Management|existing service]] that belongs to the same account and product.  In most cases the list may be empty unless otherwise stated.
  
 
; serviceSpecification - ''string''
 
; serviceSpecification - ''string''
Line 86: Line 91:
 
; billingCycle - ''integer''
 
; billingCycle - ''integer''
 
: Billing cycle of the service. Allowed values are from '''1''' to '''120'''
 
: 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''
 
; attributes - ''string''

Latest revision as of 14:36, 30 May 2016

[edit] GET /orders/{orderId}/account/products/{productId}/services/{serviceId}

Get details about a specific service in a given product.

Contents


[edit] Request

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

[edit] 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

[edit] URI Parameters

None.

[edit] 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.

[edit] Response

[edit] 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.

[edit] Response Body

[edit] 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"
}
[edit] 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

[edit] 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"
    }
}

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox