Orders-orderId-account-products-productId-discounts:GET
From Hostway API Documentation
Revision as of 11:50, 20 May 2013 by Mike.robski (Talk | contribs)
GET /orders/{orderId}/account/products/{productId}/discounts
Get discounts that were added at the Product level.
Contents |
Request
GET /orders/{orderId}/account/products/{productId}/discounts
Request Parameters
- orderId - string
- The unique order Id. The URI of the order is returned by the POST /orders call.
- productId - string
- UUID specifying the product for which actions are to be preformed
URI Parameters
None.
Request Headers
- Cookie
- A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.
Response
Status Code
- 200 OK
- The request was executed successfully.
- 401 Unauthorized
- The request was not properly authorized.
- 403 Forbidden
- The client does not have sufficient privileges.
- 404 Not Found
- Returned if the order could not be found.
Response Body
{ "discounts": [ { "priceName": "recurring", "recurrences": -1, "type": "amount", "value": "1.00" } ], "links": [ { "href": "https://api.hostway.com/orders/{orderId}/account/product/{productId}/discounts", "rel": "self" } ] }
Parameters
- discounts - list
- A list of discounts. Each discount contains the following:
- priceName - string
- The type of price to which the discount will be applied.
- recurrences - integer
- The number of times that the discount will be applied. A value of "-1" means the discount will be applied every time the fee is charged.
- type - string
- Specifies the discount type which determines the method used to calculate the amount that is discounted. Possible values are:
- amount: Discount will be treated as an exact amount.
- value - string
- The discount amount. The value will be interpreted based on the specified discount type.
- links - list
- Hypermedia for this resource. Links to self.
See also