Get List of Neighbor Comparisons

get

/apis/neighborComparison-v1/bill/{utilityCode}/{utilityCustomerId}/{fuelType}

Returns a neighbor comparison for a customer for each billing period in the given time span. Data is available for the past 12 months, for a maximum of 13 bills. Any billing period partially or fully within the requested time span is included in the response. If start and end dates are not provided the most recent neighbor comparison for the customer is returned.

Request

Path Parameters
Query Parameters
  • The exclusive end date and time bounds in ISO8601 format. The default value is the end of the most recent complete billing period. The end value must be later than the start value.
  • The inclusive start date and time bounds in ISO8601 format. The default value is the start of the most recent complete billing period. The start value must be earlier than the end value.
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Successful response
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "response":{
        "utilityCode":"util",
        "utilityCustomerId":12345,
        "fuelType":"ELECTRICITY",
        "start":"2013-09-01T00:00:00-06:00",
        "end":"2014-09-01T00:00:00-06:00",
        "unit":"KWH",
        "neighborComparisons":[
            {
                "start":"2013-08-20T00:00:00-06:00",
                "end":"2013-09-20T00:00:00-06:00",
                "customerUsage":332,
                "allNeighborsUsage":358.1,
                "efficientNeighborsUsage":294.4
            },
            {
                "start":"2013-09-20T00:00:00-06:00",
                "end":"2013-10-20T00:00:00-06:00",
                "customerUsage":375.1,
                "allNeighborsUsage":382.7,
                "efficientNeighborsUsage":298.2
            }
        ]
    }
}
Nested Schema : BillNeighborComparisonListResponse
Type: object
Show Source
Nested Schema : neighborComparisons
Type: array
Minimum Number of Items: 1
Maximum Number of Items: 13
Unique Items Required: true
List of neighbor comparisons, ordered by start date.
Show Source
Nested Schema : BillNeighborComparison
Type: object
Show Source

400 Response

Bad request
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":400,
        "serviceErrorCode":"'INVALID_DATE_RANGE' or 'INVALID_DATE' or 'INVALID_FUEL_TYPE'",
        "details":"'Start must be within the last 12 months' or 'Start and end timestamp should be specified in ISO8601 format. For example: YYYY-MM-DDThh:mm:ssTZD' or 'Fuel type must be one of ELECTRICITY, GAS, COMBINED'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

401 Response

Unauthorized
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":401,
        "details":"Credentials are required to access this resource."
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

403 Response

Forbidden
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":403,
        "details":"User not authorized. Missing required scope utility.{utilityCode}.{tier}"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

404 Response

Not found
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":404,
        "serviceErrorCode":"'ACCOUNT_NOT_FOUND' or 'SITE_NOT_FOUND' or 'CUSTOMER_NOT_FOUND'",
        "details":"'The customer does not have an active account for that given fuel type' or 'The customer does not have a service point for the given fuel type' or 'No customer with the given utilityCustomerId'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

500 Response

Internal server error
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":500,
        "serviceErrorCode":"'INSIGHT_UNAVAILABLE' or 'UNKNOWN'",
        "details":"'The insight was unavailable for the given customer. This could occur if the site has more than one service point, or if there are not enough similar neighbors to generate an insight' or 'An internal server error occurred'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source
Back to Top