Skip to content

Address lookup

There are two ways to do an address lookup:

  • Provide an ESI ID

  • Provide an address and a postcode. You have the option of filtering down by house number, city, and state.

Authentication Required

Requires CAN_USE_ADDRESSES_API permissions.

Arguments

  • esiId: String!
  • address: String!
  • address2: String!
  • city: String!
  • postCode: String!
  • state: String!

Returns

query getAddress($esiId: String) {
  addressLookup(esiId: $esiId) {
    houseNumber
    address
    postCode
    city
    state
    serviceProvider
    loadZone
    esiId
  }
}
1
2
3
4
5
6
7
8
9
# Input variables
{
  "esiId": "",
  "address": "",
  "address2": "",
  "city": "",
  "postCode": "",
  "state": "",
}

Examples

Using an ESI ID

query getAddress($esiId: String) {
  addressLookup(esiId: $esiId) {
    houseNumber
    address
    postCode
    city
    state
    serviceProvider
    loadZone
    esiId
  }
}
1
2
3
4
# Input variables
{
  "esiId": "1234567890123456789012"
}
import pprint

import requests

# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # Prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # Test
HEADERS = {}

QUERY = """
query getAddress($address:String, $postCode:String, $city:String, $state:String, $esiId:String){
  addressLookup(address:$address, postCode:$postCode, city:$city, state:$state, esiId:$esiId){
      houseNumber
      address
      address2
      postCode
      city
      state
      serviceProvider
      loadZone
      esiId
      isCustomer {
            isOeCustomer
      }
    }
}
"""

address = "1234 Test Avenue"
post_code = "77002"  # zipcode in question must be servicable by ERCOT
city = "Katy"

VARIABLES = {"address": address, "postCode": post_code, "city": city}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())

Note: ESI ID has been modified to protect customer privacy

{
  "data": {
    "addressLookup": [
      {
        "houseNumber": "1",
        "address": "34 Some Example ST",
        "postCode": "77098",
        "city": "HOUSTON",
        "state": "TX",
        "serviceProvider": "CENTERPOINT",
        "esiId": "1234567890123456789012",
        "loadZone": "LZ_HOUSTON"
      }
    ]
  }
}

Using Address and Postcode

query getAddress(
  $houseNumber: String
  $address: String
  $postCode: String
  $city: String
  $state: String
) {
  addressLookup(
    houseNumber: $houseNumber
    address: $address
    postCode: $postCode
    city: $city
    state: $state
  ) {
    houseNumber
    address
    postCode
    city
    state
    serviceProvider
    loadZone
    esiId
  }
}
# Input variables
{
  "houseNumber": "138"
  # Required
  "address": "138"
  # Required
  "postCode": "77541"
  "city": "Freeport"
  "state": "TX"
}
import pprint

import requests

# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # Prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # Test
HEADERS = {}

QUERY = """
query getAddress(
      $address: String
      $postCode: String
      $city: String
      $state: String
    ) {
      addressLookup(
        address: $address
        postCode: $postCode
        city: $city
        state: $state
      ) {
        address
        postCode
        city
        state
        serviceProvider
        loadZone
        esiId
      }
    }
"""

VARIABLES = {"address": "138", "postCode": "77541", "city": "Freeport", "state": "TX",}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())

Note: ESI IDs has been modified to protect customer privacy

{
    "data": {
      "addressLookup": [
          {
              "houseNumber": "138",
              "address": "138 DRIFTWOOD",
              "postCode": "77541",
              "city": "FREEPORT",
              "state": "TX",
              "serviceProvider": "CENTERPOINT",
              "esiId": "100890000000022100",
              "loadZone": "LZ_HOUSTON"
          },
          {
              "houseNumber": "138",
              "address": "138 JOLLY BOAT LN",
              "postCode": "77541",
              "city": "FREEPORT",
              "state": "TX",
              "serviceProvider": "CENTERPOINT",
              "esiId": "1008900000000610100",
              "loadZone": "LZ_HOUSTON"
          },
          {
              "houseNumber": "138",
              "address": "138 BALDWIN RD",
              "postCode": "77541",
              "city": "FREEPORT",
              "state": "TX",
              "serviceProvider": "CENTERPOINT",
              "esiId": "1008901000000002100",
              "loadZone": "LZ_HOUSTON"
          },
          {
              "houseNumber": "138",
              "address": "138 DUTCH LAKE CT",
              "postCode": "77541",
              "city": "FREEPORT",
              "state": "TX",
              "serviceProvider": "CENTERPOINT",
              "esiId": "10089010033100000000100",
              "loadZone": "LZ_HOUSTON"
          }
    }
}
Back to top