HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Account Properties - Overview

Account Properties

The Account Properties endpoint returns all of the properties associated with an account. The Account has a field named properties, a list of zero or more properties. Each entry has a few fields, most notably the keyName (signifying the property) and a dataValue (the value set for this property).

Properties can store a wide range of data for the account. This can include building attributes like buildingArea (square feet, etc.) and building type. Commonly this array is used to save tariff-specific options, electives, or applicability arguments. Many tariff rate plans have rates on them that vary for certain attributes.

For example, a Georgia Power Tariff will have a property for cityLimits because its rates differ on whether the customer is inside or outside city limits. Rates in Chicago will usually vary depending on whether you live in an apartment or single-family home, and whether your home is heated using gas or electricity. Commercial and Industrial tariffs almost always have one or more "rate applicability" properties like this.

The Account properties list functions as a "container" where you store these for your account allowing the calculation engine to reference this list and take the properties into consideration during the calculation.

Data Definitions

A PropertyData object has the following structure:

NameTypeDescription
keyNameStringThe unique name of this key, e.g. customerClass.
displayNameStringA string that can be used to display to users, e.g. Customer Class.
descriptionStringA user-friendly detailed description of the purpose of this property.
dataTypeStringThe data type of this property. Possible values are STRING, CHOICE, BOOLEAN, DATE, DECIMAL, INTEGER, FORMULA, LOOKUP, or DEMAND.
choicesArray of ChoicesFor properties of type CHOICE or LOOKUP, this contains the list of possible values.
dataValueStringThe value of this account property.
fromDateTimeDateThe optional starting date and time of this property, if applicable.
toDateTimeDateThe optional end date and time of this property, if applicable

Get Account Properties

Resource URI

GET /rest/v1/accounts/{accountId}/properties
GET /rest/v1/accounts/pid/{providerAccountId}/properties

Example

Below is an example call and response where we are returning the list of properties on the specified Account:

GET /rest/v1/accounts/9a6035d8-94cd-4d66-8a94-eac573fec42e/properties
GET /rest/v1/accounts/pid/acct-properties-example/properties
{
    "status": "success",
    "count": 3,
    "type": "PropertyData",
    "results": [
        {
            "keyName": "customerClass",
            "displayName": "Customer Class",
            "description": "The Class of customer (for tariff purposes) that this facility belongs to.",
            "dataType": "CHOICE",
            "choices": [
                {
                    "displayValue": "Residential",
                    "value": "1",
                    "dataValue": "1",
                    "likelihood": null
                },
                {
                    "displayValue": "General",
                    "value": "2",
                    "dataValue": "2",
                    "likelihood": null
                },
                {
                    "displayValue": "Special Use",
                    "value": "4",
                    "dataValue": "4",
                    "likelihood": null
                }
            ],
            "dataValue": "1"
        },
        {
            "keyName": "lseId",
            "displayName": "Utility or Load Serving Entity",
            "description": "ID of the Utility (Load Serving Entity)",
            "dataType": "INTEGER",
            "dataValue": "734"
        },
        {
            "keyName": "territoryId",
            "displayName": "Territory",
            "description": "Territory where tariff is operational",
            "dataType": "INTEGER",
            "dataValue": "3538",
            "accuracy": 100
        }
    ]
}

The properties returned by this call would apply to any analyses on the corresponding account.


Delete an Account Property

In the event you've incorrectly added a property or want to test different scenarios in the calculation you can easily delete properties on an account with the following call structure:

Resource URI

DELETE /rest/v1/accounts/{accountId}/properties/{keyName}
DELETE /rest/v1/accounts/pid/{providerAccountId}/properties/{keyName

Example

The account property to delete is specified as part of the URL (keyName) along with the accountId.

DELETE /rest/v1/accounts/9a6035d8-94cd-4d66-8a94-eac573fec42e/properties/customerClass

A "success" status is returned if the property is deleted or if the property does not exist.

{
   "status":"success",
   "count":0,
   "type":"PropertyData",
   "results":null
}

You can verify the removal of the property by using one of the "Get Account Properties" calls we covered earlier:

GET /rest/v1/accounts/{accountId}/properties
GET /rest/v1/accounts/pid/{providerAccountId}/properties