ProductSpecifications-productSpecificationId-offerings-offeringId:GET
From Hostway API Documentation
Revision as of 13:36, 30 May 2016 by Corinne.chui (Talk | contribs)
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}
Retrieves product specification offering details.
Contents |
Request
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}
Request Parameters
- productSpecificationId - string
- Product specification Id for a particular product specification
- offeringId - string
- Offering Id of the specific offering for a particular product specification
URI Parameters
- details - integer
- If set to 1, response will include list of pricing information. This is a short way to get both the offering details and offering prices
The following parameters are optional and work in combination with details=1. They are used for the pricing list filtering, sorting and pagination.
- filterType
- Indicates that the result should be filtered by price type.
- The legal values for this parameter are 'fee', 'discount' and 'usage_fee'
- fee - all product specification and its service specifications prices (e.g. setup fee, recurring fee, etc.)
- discount - all product specification and its service specifications discounts
- usage_fee - all product specification and its service specifications usage prices
- This parameter CANNOT be used with values containing any wildcards (*)
- filterRecurrences
- Indicates that the result should be filtered by the number of recurrences
- This parameter is optional.
- The values for this parameter can be specified using a wildcard(*).
- 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
- This parameter CANNOT be used with values containing any wildcards (*)
- filterName
- Indicates that the result should be filtered by name
- This parameter is optional
- This parameter CANNOT be used with values containing any wildcards (*)
- 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, 'pageSize' is required.
- 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 dictionary of product specification offering details
Status Code
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 404 Not Found
- Returned if the product specification Id or the offering Id could not be found.
Response Body
{ "billingPeriod": 3, "currency": "USD", "default": 1, "prices": "https://api.hostway.com/productspecifications/{productSpecificationId}/offerings/{offeringId}/prices", "links": [ {"href": "https://api.hostway.com/productspecifications/{productSpecificationId}/offerings/{offeringId}/", "rel": "self"} ] }
Parameters
- billingPeriod - integer
- Price's billing period in months
- currency - string
- Price's currency
- default - integer
- Specifies whether the offering uses the default billing cycle. Allowed values are 0 and 1
- prices - link
- Hyperlink to the product's offerings prices
- If request contains details parameter - response will return prices parameters instead of hyperlink
- links - list
- Hypermedia for this resource.
Examples
Success scenario
Request
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}
Response
{ "billingPeriod": 3, "currency": "USD", "default": 1, "prices": "https://api.hostway.com/productspecifications/{productSpecificationId}/offerings/{offeringId}/prices", "links": [ {"href": "https://api.hostway.com/productspecifications/{productSpecificationId}/offerings/{offeringId}/", "rel": "self"} ] }
Request with details
Request
GET /productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=2&pageSize=10
Response
{ "billingPeriod": 3, "currency": "USD", "default": 1, "prices": [ { "type": "fee" "name": "recurring", "deferred": 1, "amount": 1125.0, "billingPeriod": 3, "recurrences": -1, "relatedServiceSpecification": "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}", }, { "type" : "usage_fee", "name" : "mfg_mailbox_standard", "billingPeriod" : 1, "relatedServiceSpecification" : "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}", "unit" : "mfg_mailbox_standard", "rates" : [ { "start" : 1.0, "end" : 3.0, "pricePerIncrement" : 0.0, "includedPrice": 0.0, "increment": 1.0 }, { "start" : 3.0, "end" : -1.0, "pricePerIncrement" : 1.0, "includedPrice": 3.0, "increment": 1.0 } ] } ], "links": [ { "rel": "self", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=2" }, { "rel": "first", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=1" }, { "rel": "previous", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=1" }, { "rel": "next", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=3" }, { "rel": "last", "href": "https://api.hostway.com/productSpecifications/{productSpecificationId}/offerings/{offeringId}?details=1&page=3" }, ] }
See also