Accounts-accountId-products-productId:GET
From Hostway API Documentation
Revision as of 09:07, 14 October 2014 by Mike.robski (Talk | contribs)
GET /accounts/{accountId}/products/{productId}
Get product information and (if requested) possible product changes.
Contents |
Request
GET /accounts/{accountId}/products/{productId}
Parameters
- accountId - string
- The Id of the account.
- productId - string
- The Id of the product.
URI Parameters
- getTargetProductSpecifications - boolean
- Optional. If set to 1 the response will include valid product specification change targets list.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success.
- 401 Unauthorized
- Authorization credentials not submitted or invalid.
- 404 Not Found
- The account or product Id not found.
Response Body
The response body includes product specification change targets list when the getTargetProductSpecifications URI parameter is set to 1.
{ "status": "open", "name": "Product Name", "displayName": "My custom product name", "partnerId": "Partner Id", "billingCycle": 12, "productSpecification": "https://api.hostway.com/productSpecifications/{productSpecificationId}", "changes": [ { "type": "upgrade", "id": "{targetProductSpecificationId}", "href": "https://api.hostway.com/productSpecifications/{targetProductSpecificationId}" }, ] "links": [ {"href": "https://api.hostway.com/accounts/{accountId}/products/{productId}/", "rel": "self"} ] }
Parameters
- status - string
- Current status of the product. Allowed values are new, pending, open, suspended, close_pending, closed and purge_pending.
- name - string
- Name of the product.
- billingCycle - integer
- Billing cycle of the product in months.
- productSpecification - string
- Link to the specification of the current product.
- changes - list
- A list with the valid product change targets. Returned if getTargetProductSpecifications=1 query parameter is passed
- displayName - string
- A custom display name for the product.
- partnerId - string
- Partner id.
- links - list
- Hypermedia for the product resource
See also