HomeGuidesAPI ReferenceChangelog
Log In
Guides

Set Up an Account

Create a Switch Account, set the customer utility and tariff, and add account-level rates such as taxes.

Create a Switch Account, set the customer utility and tariff, and add account-level rates such as taxes.

When you want to do an analysis with the Arcadia API, first create an Account, then set a Tariff on that account. This page covers basic account setup. For a more detailed utility and tariff selection workflow, see Select the Right Utility and Tariff.

Create an account

An account is the basis for all analysis in the Arcadia API. It stores the data associated with a particular customer: their address, what tariff they're on, how much energy they're using, and more. Populate it with the data you need. In particular, specify where the customer is located and what kind of customer they are, such as residential or commercial.

Use the Account endpoint

Whether you're creating, modifying, or deleting an account, all operations happen through the Account endpoint:

https://api.genability.com/rest/v1/accounts

To create the account, send a PUT request to that URL:

PUT /rest/v1/accounts

Use the following JSON request body:

{  
    "providerAccountId":"example_account",  
    "accountName": "Example Account",  
    "address": {  
        "address1": "455 Market St",  
        "city" : "San Francisco",  
        "state" : "CA",  
        "zip" : "94105",  
        "country" : "US"  
    },  
    "properties": {  
        "customerClass": {  
            "keyName":"customerClass",  
            "dataValue":"1"  
        }  
    }  
}  

The following sections explain the key parts of this request.

Why a PUT request?

There are two options for creating an account: you can send either a POST or a PUT request. A PUT request lets you use the providerAccountId property to set your own unique identifier.

accountId versus providerAccountId

Each account that you create in the Arcadia API can have two unique identifiers: accountId and providerAccountId. accountId is a UUID that is generated by the API for each account. providerAccountId is a unique identifier that you can generate to track the accounts you create within the API. If you have an existing database of accounts, you can use the identifiers you've already created rather than also storing the new IDs generated by the API.

A providerAccountId does not have to be unique within the API. Specifically, as long as you haven't already used the ID, it will be available for you to assign to an account.

Set an address

Set the account's address so the API can use your customer's location to select default utility and tariff data.

Use structured address fields as shown in the example, or choose another format from the Address definition on the Account page. Include a ZIP code, either as part of addressString or in its separate zip field.

Set the customer class

The properties map is a dictionary that maps strings to account properties. Set customerClass to 1 for a residential customer, as shown in the request. Set this property when you create the account because you'll need it later when you specify the tariff.

ValueMeaning
1A residential customer.
2A "general" customer. Used to represent a commercial customer.
4Special use. Not normally used.

Select a tariff

When you create an account, the Arcadia API selects the most likely tariff for your customer based on the address and customerClass. For the example account above, the tariff is automatically set to Pacific Gas & Electric's "E-1 Residential" tariff, since that is the most common tariff for residential customers in the 94105 ZIP code.

However, sometimes your customer is not on the most popular tariff, or a particular ZIP code has service from multiple utilities. In that case, there's still some work to do to set up the account. Make sure that an account has the correct tariff set on it because the tariff determines how much the customer pays to their utility for the energy that they use. That, in turn, determines the amount they could save by going solar.

To pick the correct tariff when the default doesn't work, follow these 2 steps:

  1. Use the customer's address information to select the correct utility.
  2. Based on that utility selection, pick the right tariff.

Choose the correct LSE

For many customers, there is only one utility, also called a load-serving entity (LSE) in the Arcadia API, that provides power in their area. Some customers, though, will have some choices. Use the Load Serving Entity endpoint to pick the right one.

Search by address or ZIP code to find utilities available for your customer. For the example account, use:

GET /rest/public/lses?zipCode=94105&country=US&residentialServiceTypes=ELECTRICITY

Use residentialServiceTypes=ELECTRICITY to return only LSEs that provide electricity to residential customers. Without this filter, results can include solar providers and other LSEs. Use commercialServiceTypes or industrialServiceTypes for commercial or industrial customers, respectively.

The example response contains a matching utility:

{  
    "status": "success",  
    "count": 1,  
    "type": "LoadServingEntity",  
    "results": [  
    {  
        "lseId": 734,  
        "name": "Pacific Gas & Electric Co",  
        "code": "14328",  
        "websiteHome": "http://www.pge.com/"  
    }],  
    "pageCount": 25,  
    "pageStart": 0  
}  

Since there's only one choice, you know that the example customer gets electricity from PG&E. If there were more options, they would show up as additional entries in the results array. Use the lseId field in the results to set the lseId property on the account:

PUT /rest/v1/accounts/pid/example_account/properties
{  
    "keyName":"lseId",  
    "dataValue":"734"  
}  

Pick the right tariff

Now that you've created an account and chosen an LSE, you're ready to pick a tariff. For that, use the Account Tariff endpoint. This endpoint uses the data that you've already added to the account to show a list of available tariffs. For example, if you set up the account as a commercial account, the Account Tariff endpoint would only return commercial tariffs.

Use this request to see available tariffs:

GET /rest/v1/accounts/pid/example_account/tariffs

This will return a list of tariffs:

{  
    "status": "success",  
    "count": 21,  
    "type": "Tariff",  
    "results": [  
    {  
        "tariffId": 3215865,  
        "masterTariffId": 522,  
        "tariffCode": "E-1",  
        "tariffName": "Residential"
}]
}

The response lists 21 tariffs for the example account, ordered by likelihood. The tariffs most likely to be correct for your customer appear at the top; the least likely appear at the bottom.

Select the correct tariff from the list, then set the masterTariffId property on the account as you did for lseId earlier. For this example, use E-1:

POST /rest/v1/accounts/pid/example_account/properties
{  
    "keyName":"masterTariffId",  
    "dataValue":"522"  
}  

tariffId versus masterTariffId

Use masterTariffId to set the customer's tariff because tariff data changes periodically. E-1, for example, usually changes a few times per year. Each revision has a unique tariffId and represents a version of a single "master" tariff. All versions share the same masterTariffId.

Add a tax rate to an account

The Arcadia database only has rates that appear in utility tariff books. That means that it does not have state, local, and other tax rates. To incorporate a tax, such as a Utility User's Tax (UUT), into a calculation on your account, you can include it in that account's tariffs:

PUT /rest/v1/accounts/{accountId}/tariffs
PUT /rest/v1/accounts/pid/{providerAccountId}/tariffs
{  
   "masterTariffId":"522",  
   "serviceType":"ELECTRICITY",  
   "rates":[  
      {  
         "chargeType":"TAX",  
         "rateName":"Utility Tax",  
         "rateBands":[  
            {  
               "rateAmount":0.085,  
               "rateUnit":"PERCENTAGE"  
            }  
         ]  
      }  
   ]  
}  

Next steps

After you create the account, you can:


Did this page help you?