Query Utility Meter Data

Use the consumptionAndSpend query to get the total utility meter consumption and spend for a building.

Query Request

From your app or API client, use the below URL:

URL: https://api.abound.carrier.io/prod-ahs-api/graphql/

Argument:

  • currencyCode: Currency code for the building represented using the ISO 4217 standard
  • spaceId: Unique ID of the building. Building IDs can be obtained using the getNodeByType query.
  • years: Specify the year for which you are requesting data

Query Response

As a response, the above query will fetch the below details based on the specified spaceId.

QUERY
                    
                      {
consumptionAndSpend(
options: { currencyCode: "USD", spaceId:
"f8a7b2d3-1c5e-4f9b-9d4f-0a8c2e3d7b6a", years: [2024] }
) {
billingPeriod {
from
to
}
currencyCode
totalEnergyConsumption
totalSpend
}
}
RESPONSE
                    
                      
{
  "data": {
    "consumptionAndSpend": [
      {
        "billingPeriod": {
          "from": "2024-01-02T00:00:00.000Z",
          "to": "2024-01-02T00:00:00.000Z"
        },
        "currencyCode": "USD",
        "totalEnergyConsumption": 0,
        "totalSpend": 0
      }
    ]
  }
}