Get Latest Neighbor Comparison

get

/apis/neighborComparison-v1/{utilityCode}/customers/{id}/neighbor_comparison

Provides the latest neighbor comparison for a customer as of a particular date. Note that the date ranges for gas and electric are usually different. These ranges come from the billing cycle of the customer and it is uncommon for customers to receive both gas and electric bills on the same cycle. For the combined fuel-type, we pro-rate and normalize the gas reads (including those outside the gas bill returned in the "gas" section) to the electric billing cycle. A comparison is not guaranteed for all fuel types. For example, a customer's gas account may have usage gaps that prohibit the generation of a neighbor comparison.

Request

Path Parameters
Query Parameters
  • Date in `YYYY-MM-DD` format (example 2001-12-31). The default value of the parameter is 'now'
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Successful response. A 200 response is returned if at least one fuel type generates a neighbor comparison. For dual-fuel customers, both fuel types and a combined comparison are not guaranteed if billing periods are not aligned or there are gaps in the billing data.
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "response":{
        "ELEC":{
            "you":123.45,
            "neighbors":456.78,
            "efficientNeighbors":100.1,
            "startDate":"2018-01-02",
            "endDate":"2018-02-31",
            "numNeighbors":98,
            "numEfficientNeighbors":20
        },
        "GAS":{
            "you":12.45,
            "neighbors":45.78,
            "efficientNeighbors":10.1,
            "startDate":"2018-01-03",
            "endDate":"2018-02-02",
            "numNeighbors":94,
            "numEfficientNeighbors":20
        },
        "COMBINED":{
            "you":12.45,
            "neighbors":45.78,
            "efficientNeighbors":10.1,
            "startDate":"2018-01-03",
            "endDate":"2018-02-01",
            "numNeighbors":96,
            "numEfficientNeighbors":20
        }
    }
}
Nested Schema : NeighborComparisonResponse
Type: object
Container for the neighbor comparisons based on a particular fuel type. If a particular fuel is not defined there will be no key for it
Show Source
Nested Schema : SingleFuelTypeComparison
Type: object
Show Source

400 Response

Bad request
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":400,
        "errorMessage":"For input string: '{inputString}'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

401 Response

Authorization failure
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":401,
        "errorMessage":"Unauthorized"
    }
}
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

Customer not found
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":404,
        "errorMessage":"'No customer with id {customerId}' or 'HTTP 404 Not Found'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source

500 Response

Internal error
Body ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "error":{
        "httpStatus":500,
        "serviceErrorCode":"UNKNOWN",
        "details":"For input string: '{inputString}'"
    }
}
Nested Schema : ErrorResponse
Type: object
Show Source
Back to Top