Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 4 > REST API reference > Discounts and surcharges > Get discounts

Get discounts

Retrieves detailed information for discounts and surcharges. If you specify no query parameters, all discounts and surcharges are retrieved.

This method is available in Cloud Cruiser version 4.1 and later.

Resource URL

GET http://<ccServerURL>/rest/v2/discounts



Use the following parameters:

  Name Type Description
URL query parameters (optional) discountName string The name of the discount or surcharge to retrieve.
type string The type of discounts or surcharges to retrieve. Valid values are discount or surcharge.
unitsType string The type of units used for the discounts and surcharges to retrieve. Valid values are percentage and fixed.
allServices boolean Specify whether to retrieve discounts and surcharges that apply to all services (true) or specific services (false).






Details for discounts and surcharges, as XML text with the root element discount or JAXB type


This XML schema describes a discount or surcharge.

<xs:schema xmlns:xs="" xmlns:ns1="" xmlns:tns=""attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="">
  <xs:import namespace=""/>
  <xs:element name="discount" type="tns:Discount"/>
  <xs:element name="discountList">
        <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:discount"/>
      <xs:attribute name="totalCount" type="xs:int"/>
      <xs:attribute name="retrievedCount" type="xs:int"/>
  <xs:complexType name="Discount">
      <xs:element name="name" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element default="DISCOUNT" name="type" type="xs:string"/>
      <xs:element default="PERCENTAGE" name="unitsType" type="xs:string"/>
      <xs:element name="value" type="xs:double"/>
      <xs:element default="true" name="allServices" type="xs:boolean"/>
      <xs:element minOccurs="0" name="appliedServices">
            <xs:element maxOccurs="unbounded" minOccurs="0" name="service" type="ns1:Service"/>
    <xs:attribute name="id" type="xs:int"/>


URL invocation

GET http://localhost:8080/rest/v2/discounts​​?type=discount

Java invocation
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<discountList xmlns="" totalCount="2" retrievedCount="2">
    <discount id="10000">
        <description>A 5% discount for new accounts</description>
    <discount id="10001">
        <description>A 7% discount for all services</description>
Last modified


This page has no custom tags.


This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP