Get Bill Comparison

get

/apis/billComparison-v2/{utilityCode}/bill-comparison/accounts/{utilityAccountId}

Returns a customer's bill comparsion. Compare a customer's electricity or gas bill to a prior bill (either previous bill or last year's bill) along with an explanation of the cost differences.

Request

Path Parameters
Query Parameters
  • The most recent bill that ends before the asOf date is chosen as reference one
    Default Value: NOW
  • Type of bill to compare with. If there is no YEAR_AGO bill, fallback to PREVIOUS
    Default Value: PREVIOUS
    Allowed Values: [ "PREVIOUS", "YEAR_AGO" ]
  • Whether to use fallback from YEAR_AGO to PREVIOUS on missed bills
    Default Value: true
    Allowed Values: [ true, false ]
Back to Top

Response

Supported Media Types

200 Response

Successful response
Body ()
Root Schema : billComparisonResponse
Type: object
Returns a single object representing a bill comparison
Show Source
Example:
{
    "response":{
        "meterUnit":"KWH",
        "currencySymbol":"$",
        "temperatureUnit":"FAHRENHEIT",
        "analysisResults":[
            {
                "analysisName":"WEATHER",
                "costDifferenceExplained":-176.44
            },
            {
                "analysisName":"OTHER",
                "costDifferenceExplained":-840.16
            }
        ],
        "reference":{
            "charges":76.48,
            "usage":865.857,
            "startDate":"2016-03-02",
            "endDate":"2016-03-31",
            "averageTemperature":48.3,
            "ratePlan":"AB"
        },
        "compared":{
            "charges":1093.08,
            "usage":1200,
            "startDate":"2016-02-01",
            "endDate":"2016-03-01",
            "averageTemperature":34.1,
            "ratePlan":"AB"
        }
    }
}
Nested Schema : response
Type: object
Show Source
Nested Schema : analysisResult
Type: array
Contains bill difference insights
Show Source
  • analysisResult
    The Analysis Result contains the list of reasons for the difference from the prior bill and the amount monetary difference attributed to the reason
Nested Schema : bill
Type: object
The Bill object contains the bill attributes used to generate the comparison to the prior period.
Show Source
Nested Schema : analysisResult
Type: object
The Analysis Result contains the list of reasons for the difference from the prior bill and the amount monetary difference attributed to the reason
Show Source

401 Response

Authorization failure
Body ()
Root Schema : notAuthorizedErrorResponse
Type: object
Error reponse for unsuccessful bill comparison
Show Source
Example:
{
    "error":{
        "httpStatus":401,
        "errorMessage":"Credentials are required to access this resource"
    }
}
Nested Schema : error
Type: object
Brief error explaination
Show Source

404 Response

Utility account not found
Body ()
Root Schema : notFoundErrorResponse
Type: object
Error reponse for 'Not Found' http status
Show Source
Example:
{
    "error":{
        "httpStatus":404,
        "errorMessage":"No utility account with id xxxx"
    }
}
Nested Schema : error
Type: object
Brief error explaination
Show Source

500 Response

Internal server error
Body ()
Root Schema : internalServerErrorResponse
Type: object
Error reponse for unsuccessful bill comparison
Show Source
Example:
{
    "error":{
        "httpStatus":500,
        "errorMessage":"Comparison cannot be performed right now"
    }
}
Nested Schema : error
Type: object
Brief error explaination
Show Source
Back to Top