Accounts-accountId-products-productId:GET
From Hostway API Documentation
				
								
				(Difference between revisions)
				
																
				
				
								
				Mike.robski  (Talk | contribs) m (1 revision)  | 
		Mike.robski  (Talk | contribs)  m (1 revision: Release 100)  | 
		||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 37: | Line 37: | ||
{  | {  | ||
   "status": "open",  |    "status": "open",  | ||
| − |    "name": "Product Name",    | + |    "name": "Product Name",  | 
| + |   "displayName": "My custom product name",  | ||
| + |   "partnerId": "Partner Id",  | ||
   "billingCycle": 12,  |    "billingCycle": 12,  | ||
   "productSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/productSpecifications/{productSpecificationId}",  |    "productSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/productSpecifications/{productSpecificationId}",  | ||
| Line 68: | Line 70: | ||
; changes - ''list''  | ; changes - ''list''  | ||
: A list with the valid product change targets. Returned if ''getTargetProductSpecifications=1'' query parameter is passed  | : 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 specified for this product.  | ||
; links - ''list''  | ; links - ''list''  | ||
Latest revision as of 23:07, 18 November 2014
[edit] GET /accounts/{accountId}/products/{productId}
Get product information and (if requested) possible product changes.
Contents | 
[edit] Request
GET /accounts/{accountId}/products/{productId}
[edit] Parameters
- accountId - string
 - The Id of the account.
 
- productId - string
 - The Id of the product.
 
[edit] URI Parameters
- getTargetProductSpecifications - boolean
 - Optional. If set to 1 the response will include valid product specification change targets list.
 
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
 - The Authentication credentials of the client application.
 
[edit] Response
[edit] Status Code
- 200 OK
 - Success.
 
- 401 Unauthorized
 - Authorization credentials not submitted or invalid.
 
- 404 Not Found
 - The account or product Id not found.
 
[edit] 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"}
  ]
}
 
[edit] 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 specified for this product.
 
- links - list
 - Hypermedia for the product resource
 
[edit] See also