Estimated charges operations

The operations described in this section enable developers to manage estimated charges.

Get estimated charges

GET /v2/accounts/{ran}/estimated_charges

Returns a list of summarized estimated charges for the current billing period. Currently, the call is supported only for current billing cycle.

Request

The request has the following URI and header parameters:

NameTypeDescription
{ran}URI string (Required)A billing account number.
chargeTypeStringThe type of billable charge. Refer the Appendix to know the valid values
offeringCodeStringThis parameter is used to filter results specific to a product. Refer the Appendix to know the valid values.
X-Auth-TokenHeader string (Required)A valid authentication token associated with the particular role.
AcceptHeader stringValue: application/json

This operation does not accept a request body.

Response

Example Get estimated charges - Cloud (partial example): JSON response

{
   "estimatedCharges": {
      "total": 30,
      "discountTotal": "-50.00",
      "chargeSubTotal": "100.00",
      "chargeHierarchyTotal": "0.00",
      "currency": "USD",
      "currentBillingPeriodStartDate":"2016-10-16T21:32:52",
      "currentBillingPeriodEndDate":"2016-11-16T21:32:52",
      "durationRemainingInCycle": "P15D",
      "estimatedCharge": [{
         "offeringCode": "DBAAS",
         "quantity": "10.00",
         "amount": "1000.00",
         "unitOfMeasure": "HRS",
         "rate": ".40",
         "category": "CHARGE",
         "chargeType": "UPTIME"
      }, {
         "offeringCode": "MAAS",
         "amount": "3.09",
         "chargeType": "NUM_CHKS_HRS",
         "quantity": "3000.00",
         "category": "CHARGE",
         "rate": "2.00",
         "unitOfMeasure": "CHKS_HRS"
      }, {
         "offeringCode": "CSITES",
         "rate": ".12",
         "quantity": "12.00",
         "category": "CHARGE",
         "amount": "3.14",
         "unitOfMeasure": "COUNT",
         "chargeType": "COMPUTE_CYCLE_OVERAGE"
      }, {
         "offeringCode": "RCDN",
         "amount": "3.14",
         "chargeType": "BWOUT",
         "quantity": "12.00",
         "category": "CHARGE",
         "unitOfMeasure": "GB"
      },{
         "rate": "100.00",
         "quantity": "1.00",
         "category": "DISCOUNT",
         "amount": "-100.00",
         "unitOfMeasure": "COUNT",
         "endDate": "2016-05-30T09:30:10Z",
         "chargeType": "Commit Discount",
         "chargeDetails":"10% off spending over $1,000.00.",
         "chargeDescription": "10% off spending over $1,000.00."
      }],
      "link": [{
         "rel": "next",
         "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"
      }, {
         "rel": "prev",
         "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"
      }]
   }
}

Example Get estimated charges – Dedicated: JSON response

{
   "estimatedCharges": {
      "total": 30,
      "discountTotal": "-50.00",
      "chargeSubTotal": "100.00",
      "chargeTotal": "50.00",
      "chargeHierarchyTotal": "0.00",
      "currency": "USD",
      "currentBillingPeriodStartDate":"2016-10-16T21:32:52",
      "currentBillingPeriodEndDate":"2016-11-16T21:32:52",
      "durationRemainingInCycle": "P15D"
      "link": [{
         "rel": "next",
         "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"
      }, {
         "rel": "prev",
         "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"
      }]
   }
}

This table shows the possible response codes for this operation:

Response codeNameDescription
200OKThe request succeeded.
400Bad RequestA general error has occurred.
401UnauthorizedThe request has not been applied because it lacks valid authentication credentials for the target resource. The credentials are either expired or invalid.
404Not FoundThe server could not find what was requested.
405Method Not AllowedThe method received in the request line is known by the origin server but is not supported by the target resource.
406Not AcceptableThe server cannot produce a response matching the list of acceptable values defined in the request.
415Unsupported Media TypeThis error might result if the wrong media type is used in the cURL request.
500Internal Server ErrorThe server encountered an unexpected condition that prevented it from fulfilling the request.

Users with any of the following roles can access this API:

  • identity:user-admin
  • admin
  • billing:admin
  • observer
  • billing:observer