ProductSpecifications-productSpecificationId-offerings-offeringId-prices:GET
From Hostway API Documentation
Revision as of 16:50, 15 February 2013 by Mike.robski (Talk | contribs)
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices
Retrieves prices for a particular product specification offering.
Contents |
Request
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices
URI Parameters
- filterType
- Indicates that the result should be filtered by price type.
- The legal values for this parameter are 'fee' and 'discount'
- This parameter is optional
- filterRecurrences
- Indicates that the result should be filtered by the number of recurrences
- This parameter is optional
- filterRelatedServiceSpecification
- Indicates that the result should be filtered by linked service specification URI.
- A value of indicates that only results with relatedServiceSpecification= should be returned.
- This parameter is optional
- filterName
- Indicates that the result should be filtered by name
- This parameter is optional
- sortField
- Indicates which field should be used for sorting.
- Legal values are 'name', 'type', 'recurrences' and 'relatedServiceSpecification'.
- This parameter is optional
- sortOrder
- Indicates the order in which the result should be sorted.
- Legal values are 'asc' and 'desc'
- This parameter is optional. If 'sortField' was specified and 'sortOrder' was omitted, then the result will be sorted in ascending order.
- pageSize
- Indicates the number of prices to be included on each page of the result (if pagination is desired)
- This parameter is optional. If 'page' is specified and 'pageSize' is omitted, then the result will show 100 prices per page.
- page
- Indicates the 1-based index of the page to view.
- The value must be an integer between 1 and the maximum number of pages (returned in the 'last' element of the 'links' attribute of the result)
- This parameter is optional, but if 'pageSize' was specified, then 'page' is also required.
Response
Returns a list of prices for a particular product specification offering Id.
Status Code
- 200 OK
- Success
- 400 Bad Request
- Returned if incorrect parameters are specified for filtering, sorting or pagination. The response body will contain details about the nature of the error.
- 404 Not Found
- Returned if the product specification Id or the offering Id could not be found.
Response Body
{ "list": [ { "name": "recurring", "amount": 1125.0, "billingPeriod": 3, "recurrences": -1, "relatedServiceSpecification": "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}", "type": "fee" } ], "links": [ { "rel": "self", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices?pageSize={pageSize}&page=3" }, { "rel": "first", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices?pageSize={pageSize}&page=1" }, { "rel": "previous", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices?pageSize={pageSize}&page=2" }, { "rel": "next", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices?pageSize={pageSize}&page=4" }, { "rel": "last", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}/prices?pageSize={pageSize}&page=12" }, ] }
Parameters
- list - list
- List of product offering price details. Each element of the list has the following attributes:
- name - string
- A name for the price. This is NOT guaranteed to be unique.
- billingPeriod - integer
- The billing frequency in months.
- recurrences - integer
- The number of time this price will recur. A value of -1 means that the price will recur throughout the entire lifetime of the provisioned product.
- relatedServiceSpecification - string
- The URI of the service specification (associated with the product) to which this price is linked. If this is an empty string, then the price is linked to the product itself.
- type - string
- This can be either 'fee' or 'discount'. A fee represents a fee that will be charged. A discount represents a downward adjustment of the amount of a fee.
See also