Orders-orderId-discounts:GET

(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 85)

Revision as of 15:31, 27 September 2013

GET /orders/{orderId}/discounts

Get discounts that were added at the Order level. Discounts that are applied to an entire order will be applied to all of the product and services within the order.

Contents


Request

GET /orders/{orderId}/discounts

Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.

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/user/",
      "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


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox