Getting an Authorization

Get a specifc Authorization.


GET https://utilityapi.com/api/v2/authorizations/authorization_uid
# Get an Authorization
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/authorizations/1234'
# Get an Authorization with Meters
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/authorizations/1234?include=meters'
Parameter Format Description Example
include List(Include Parameters) Add the specified child objects to this Authorization object. Separate with commas (,). include=meters
expand_meter_blocks Boolean Load complete meter block information. This will be ignored if include=meters is not set. This is only for utilities that do not expand Meter blocks by default. For utilities that expand their Meter blocks by default, this parameter is ignored. expand_meter_blocks=true

For Authorizations, you can include objects that are connected to that Authorization as a key in the Authorization. This is so you can get both the Authorization and their child objects in one API request. For now, Meter is the only type of include that is enabled.

Parameter Description Format Example
meters Include Meters in a "meters" key on each Authorization object. MeterListing "meters": {"meters": [...], "next": null}

Returns the Authorization object.

// Example result
{
    "uid": "12345",
    "created": "2016-01-01T12:30:24.653422+00:00",
    ...
}
Code Response Format Description
200 Authorization Successful request.
401 Error Invalid or missing access_token. See our docs on Authentication for how to properly use your access_token.
404 Error This Authorization doesn't exist or you don't have permissions to see it.
429 N/A The request was rate limited. Check the Retry-After response header for how long to wait until retrying the request. Do not expect any specific response format for this error (could be html, json, or nothing).
500 N/A Internal server error. Do not expect any specific response format for this error (could be html, json, or nothing). This error is logged and will be fixed by our engineers.
503 N/A Site is currently down for maintenance. Do not expect any specific response format for this error (could be html, json, or nothing).
504 N/A We tried to build this request but timed out. Please try again later. Do not expect any specific response format for this error (could be html, json, or nothing).