Orders-orderId-account-products-productId-services-serviceId:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision) |
(→Successful response) |
||
Line 24: | Line 24: | ||
=== Status Code === | === Status Code === | ||
− | + | {| class="wikitable" | |
− | + | ! 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 information for a service for non existing order, product or service. | ||
+ | |} | ||
=== Response Body === | === Response Body === | ||
+ | ==== Successful response ==== | ||
<nowiki> | <nowiki> | ||
{ | { | ||
Line 39: | Line 49: | ||
"name": "john.smith1", | "name": "john.smith1", | ||
"links": [ | "links": [ | ||
− | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{serviceId}/", "rel": "self"} | + | { |
+ | "href": "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{serviceId}/", | ||
+ | "rel": "self" | ||
+ | } | ||
], | ], | ||
"relatedTo": [ "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{relatedServiceId}" ], | "relatedTo": [ "</nowiki>{{APIBaseURL}}<nowiki>/orders/{orderId}/account/products/{productId}/services/{relatedServiceId}" ], | ||
Line 45: | Line 58: | ||
"billingCycle": 1, | "billingCycle": 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> |
− | + | ||
==== Parameters ==== | ==== Parameters ==== | ||
Line 69: | Line 81: | ||
; attributes - ''string'' | ; attributes - ''string'' | ||
: A link to the attributes of the service | : A link to the attributes of the service | ||
+ | |||
+ | ==== Error responses ==== | ||
+ | <nowiki> | ||
+ | 404 Not Found | ||
+ | { | ||
+ | "itemNotFound": { | ||
+ | "guid": "3a422918-24c3-4c20-9bee-f1c61695e987", | ||
+ | "message": "Resource not found", | ||
+ | "code": 404, | ||
+ | "details": "" | ||
+ | } | ||
+ | }</nowiki> | ||
== See also == | == See also == |
Revision as of 05:39, 11 September 2014
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. |
404 Not Found | Resource not found | The client is trying to get the information for a service for non existing order, product or service. |
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}" ], "serviceSpecification": "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}", "billingCycle": 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, 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 related in some way to the current service
- 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
- attributes - string
- A link to the attributes of the service
Error responses
404 Not Found { "itemNotFound": { "guid": "3a422918-24c3-4c20-9bee-f1c61695e987", "message": "Resource not found", "code": 404, "details": "" } }
See also