Accounts-accountId-products-productId:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 98) |
(→GET /accounts/{accountId}/products/{productId}) |
||
Line 39: | Line 39: | ||
"name": "Product Name", | "name": "Product Name", | ||
"displayName": "My custom product name", | "displayName": "My custom product name", | ||
− | "partnerId": "Partner | + | "partnerId": "Partner Id", |
"billingCycle": 12, | "billingCycle": 12, | ||
"productSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/productSpecifications/{productSpecificationId}", | "productSpecification": "</nowiki>{{APIBaseURL}}<nowiki>/productSpecifications/{productSpecificationId}", | ||
Line 75: | Line 75: | ||
; partnerId - ''string'' | ; partnerId - ''string'' | ||
− | : Partner | + | : Partner id. |
; links - ''list'' | ; links - ''list'' |
Revision as of 08:02, 1 October 2014
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