> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powerhq.co/llms.txt
> Use this file to discover all available pages before exploring further.

# utilityAccounts: Search Utility Service Accounts by Address

> Search existing utility service accounts by street address or account number to verify a customer's service location and account status before enrollment.

The `utilityAccounts` query searches existing utility service accounts by street address, account number, or both. Use it to verify that a customer's service location exists in the utility's system and to retrieve account details — such as account status and TDU code — before submitting an enrollment.

## Parameters

<Warning>
  At least one of `street` or `accountNumber` is required. If you omit both, the API returns the error: `"No street address or account number specified for utility accounts search"`.
</Warning>

<ParamField query="street" type="String">
  Street address line 1 of the service location. **Required if `accountNumber` is not provided.**
</ParamField>

<ParamField query="accountNumber" type="String">
  The utility account number associated with the service location. **Required if `street` is not provided.**
</ParamField>

<ParamField query="street2" type="String">
  Second address line, matched **exactly** against the value the utility has on file.

  Most accounts have no second line, and supplying one that does not match the stored value returns
  zero results rather than a looser match. **Omit it unless you already know the utility's exact
  string.** Apartment and unit numbers usually live inside `street`, in whatever format the utility
  recorded them, so pass those as part of `street`.
</ParamField>

<ParamField query="city" type="String">
  City of the service location.
</ParamField>

<ParamField query="state" type="String">
  Two-letter U.S. state code (for example, `"TX"`).
</ParamField>

<ParamField query="zipCode" type="String">
  Five-digit ZIP code of the service location.
</ParamField>

<ParamField query="isBusiness" type="Boolean">
  Filter results to business accounts (`true`) or residential accounts (`false`). Omit to return all matching accounts regardless of account type.
</ParamField>

## Example

```graphql theme={null}
{
  utilityAccounts(
    street: "901 BAGBY ST"
    city: "HOUSTON"
    state: "TX"
    zipCode: "77002"
  ) {
    id
    accountNumber
    utilityCode
    isBusiness
    accountStatus
    displayAddress
    serviceAddress {
      street
      street2
      city
      state
      zipCode
    }
  }
}
```

```json theme={null}
{
  "data": {
    "utilityAccounts": [
      {
        "id": "v2-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "accountNumber": "1000000000000000000000",
        "utilityCode": "CNP",
        "isBusiness": true,
        "accountStatus": "ACTIVE",
        "displayAddress": "901 BAGBY ST, HOUSTON, TX",
        "serviceAddress": {
          "street": "901 BAGBY ST",
          "street2": "",
          "city": "HOUSTON",
          "state": "TX",
          "zipCode": "77002"
        }
      }
    ]
  }
}
```

<Note>
  `id` and `accountNumber` above are masked. Real values are a `v2-` prefix followed by 32 hex
  characters, and a 22-digit ESID. Everything else is exactly what this query returns today.
</Note>

<Warning>
  A partial street matches every unit at that address. `901 BAGBY ST` returns one account, but a
  street with many units can return dozens. Narrow with `zipCode` and `isBusiness`, and read the
  `street` value back to see how the utility spelled the unit before querying for it.
</Warning>

## Response fields

<ResponseField name="id" type="ID">
  Unique identifier for the service account (for example, `"v2-CB1C1D302FC4B19F58D4F89F775AAFD6"`).
</ResponseField>

<ResponseField name="accountNumber" type="String">
  The utility-assigned account number. May be `null` for some accounts.
</ResponseField>

<ResponseField name="accountStatus" type="AccountStatus">
  Current status of the account. Possible values:

  * `ACTIVE` — The account is energized and in service.
  * `INACTIVE` — The account exists but is not currently in service.
  * `DE_ENERGIZED` — Service has been disconnected at this location.
</ResponseField>

<ResponseField name="utilityCode" type="String">
  The TDU or utility code associated with this account (for example, `"AEPCC"`).
</ResponseField>

<ResponseField name="isBusiness" type="Boolean">
  `true` if this is a business account; `false` if it is a residential account.
</ResponseField>

<ResponseField name="displayAddress" type="String">
  A pre-formatted, human-readable version of the full service address. May be `null` for some accounts.
</ResponseField>

<ResponseField name="serviceAddress" type="Address">
  The structured service address for this account.

  <Expandable title="serviceAddress fields">
    <ResponseField name="street" type="String">
      Street address line 1.
    </ResponseField>

    <ResponseField name="street2" type="String">
      Street address line 2 (for example, suite or unit). May be `null`.
    </ResponseField>

    <ResponseField name="city" type="String">
      City name.
    </ResponseField>

    <ResponseField name="state" type="String">
      Two-letter state code (for example, `"TX"`).
    </ResponseField>

    <ResponseField name="zipCode" type="String">
      Five-digit ZIP code.
    </ResponseField>
  </Expandable>
</ResponseField>
