HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Account Properties API

Use the Account Properties API to store account-specific values used by calculations and tariff applicability checks.

Use the Account Properties API to store account-specific values that calculations and tariff applicability checks need, such as customer class, building attributes, location details, and tariff-specific options.

An Account has a properties field that contains zero or more properties. Each property includes a keyName, which identifies the property, and a dataValue, which stores the value set for that property.

Use account properties after you create or retrieve an account with Accounts API, and before you run calculations that depend on customer, building, location, or tariff applicability inputs. For the full account workflow, see Account APIs Overview.

Properties can store a wide range of account data, including building attributes such as buildingArea and building type. You can also use properties to save tariff-specific options, electives, or applicability arguments. Many tariff rate plans vary based on these attributes.

For example, a Georgia Power tariff can use cityLimits because rates differ based on whether the customer is inside or outside city limits. Rates in Chicago commonly vary based on whether a customer lives in an apartment or single-family home, and whether the home is heated with gas or electricity. Commercial and industrial tariffs often have one or more rate applicability properties like this.

Store these values in the account properties list so the calculation engine can reference them during calculations.

Data definitions

A PropertyData object has the following structure.

NameTypeDescription
keyNameStringUnique name of this key, such as customerClass.
displayNameStringString that can be displayed to users, such as 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

Example

This example returns the list of properties on the specified account:

GET /rest/v1/accounts/9a6035d8-94cd-4d66-8a94-eac573fec42e/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 returned properties apply to calculations and analyses on the corresponding account.


Delete Account Property

Delete an account property when it was added incorrectly or when you want to test a different calculation scenario.

Resource URI

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

Example

Specify the property to delete with its keyName in the URL.

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
}

Verify that the property was removed by calling one of the Get Account Properties endpoints:

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

Next steps

  1. Return to Account APIs Overview to choose another account workflow.
  2. Use Account Tariffs API to assign tariff rate plans, contracted rates, or historical tariff changes.
  3. Use Account Rates API to inspect the rates associated with the account's assigned tariffs.
  4. Use Account Cost Calculation to calculate costs after account properties and tariffs are configured.