HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Add Account

This allows you to create a new account. You can add it with only a couple of fields set or flush it out more completely. Once added, all the fields can be updated at any time after the account has been created using the update methods documented below. TIP - If you have a providerAccountId, you can perform an "upsert" using the Update an Account endpoint. It's the same as the Add an Account endpoint but a PUT, not a POST (see below). This will add an account if necessary or update it if it already exists.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create a new account with account details, address data, and optional account properties.

Use this endpoint when you want to create an account with a POST request. If you have a providerAccountId and want to create or update the account with the same request, use the account update endpoint with PUT instead.

For the full account data model, account workflow, default tariff behavior, and detailed examples, see Accounts API.

Resource URI

POST /rest/v1/accounts

Request parameters

Pass a valid account structure in the request body. The body can be minimal or can include as many Account attributes as you know when the account is created.

The following fields are recommended because they identify the account and help Arcadia populate information such as the account's likely utility and tariff:

NameTypeDescription
providerAccountIdStringYour unique ID for this account.
accountNameStringHuman-readable name of the account.
address.addressString or itemized fieldsStringFull address. ZIP code or postcode can be enough for some workflows.
properties.customerClass1=RESIDENTIAL, 2=GENERALCustomer class for the account.

Example 1: Minimum recommended values

POST /rest/v1/accounts
{  
   "providerAccountId":"api-eg-01",  
   "accountName":"Example 1 API Home",  
   "address":{  
      "addressString":"221 Main Street, San Francisco, CA 94105"  
   },  
   "properties":{  
      "customerClass":{  
         "keyName":"customerClass",  
         "dataValue":"1"  
      }  
   }  
}

If the account has a location that resolves to a valid ZIP or postcode, Arcadia usually sets the most likely utility and tariff rate plan automatically. Arcadia uses address properties, customer class, usage levels, and other relevant data to select the most likely rate plan. This selection is stored in the account's tariffs property.

The tariff entry can include a likelihood field. A value below 100% means the tariff was automatically set. A value of 100% or null means the tariff was explicitly set. A source field may also indicate where the value came from, such as a default or an interview answer.

When an account is updated, Arcadia reviews the changes and determines whether they should update the account's default utility and tariff rate plan. If the account tariff was explicitly set, Arcadia does not override it with the best default. Only defaulted values are updated.

The response from adding an account contains the fully populated Account object.

{  
   "status":"success",  
   "count":1,  
   "type":"Account",  
   "results":[  
      {  
         "accountId":"c2a630e8-c99a-4347-a460-d116e83439d2",  
         "providerAccountId":"api-eg-10",  
         "accountName":"Example 1 API Home",  
         "customerOrgId":null,  
         "customerOrgName":null,  
         "address":{  
            "addressString":"221 Main Street, San Francisco, CA 94105",  
            "address1":"221 Main St",  
            "city":"San Francisco County",  
            "state":"CA",  
            "zip":"94105",  
            "country":"US",  
            "lon":-122.3920575,  
            "lat":37.7904127  
         },  
         "owner":null,  
         "status":"ACTIVE",  
         "type":null,  
         "properties":{  
            "customerClass":{  
               "keyName":"customerClass",  
               "dataType":"CHOICE",  
               "dataValue":"1"  
            }  
         },  
         "tariffs":[  
            {  
               "masterTariffId":522,  
               "tariffCode":"E-1",  
               "tariffName":"Residential",  
               "lseId":734,  
               "lseName":"Pacific Gas & Electric Co",  
               "customerLikelihood":74.03,  
               "endDate":null,  
               "timeZone":"US/Pacific",  
               "billingPeriod":"MONTHLY",  
               "currency":"USD"  
            }  
         ],  
         "projects":null  
      }  
   ]  
}

Optional: Use individual address fields

In example 1, the request passed an address with addressString. The returned account included parsed address fields plus latitude and longitude. Arcadia uses Google's geocoding service for this.

If you already have the address parsed into individual fields, use this approach so Arcadia does not override those fields based on geocoding results.

{  
   "providerAccountId":"api-eg-11",  
   "accountName":"Example 1 API Home",  
   "address":{  
      "address1":"221 Main Street",  
      "city":"San Francisco",  
      "state":"CA",  
      "zip":"94105",  
      "country":"US"  
   },  
   "properties":{  
      "customerClass":{  
         "keyName":"customerClass",  
         "dataValue":"1"  
      }  
   }  
}

In this request, Arcadia saves the individual address fields you passed instead of using the geocoding service to parse them. Arcadia still calls the geocoding service to determine latitude and longitude by concatenating the address fields.

The addressString field is not populated in the response. To see the sanitized address information, call Get One Account with accountId with fields=ext.

{  
   "status":"success",  
   "count":1,  
   "type":"Account",  
   "results":[  
      {  
         "accountId":"7918e7b9-9ae7-4942-bd77-b33ef0c8962a",  
         "providerAccountId":"api-eg-01",  
         "accountName":"Example 1 API Home",  
         "customerOrgId":null,  
         "customerOrgName":null,  
         "address":{  
            "addressString":null,  
            "address1":"221 Main Street",  
            "city":"San Francisco",  
            "state":"CA",  
            "zip":"94105",  
            "country":"US",  
            "lon":-122.3920575,  
            "lat":37.7904127  
         },  
         "owner":null,  
         "status":"ACTIVE",  
         "type":null,  
         "properties":{  
            "customerClass":{  
               "keyName":"customerClass",  
               "dataType":"CHOICE",  
               "dataValue":"1"  
            }  
         },  
         "tariffs":[  
            {  
               "masterTariffId":522,  
               "tariffCode":"E-1",  
               "tariffName":"Residential",  
               "lseId":734,  
               "lseName":"Pacific Gas & Electric Co",  
               "customerClass":null,  
               "customerLikelihood":74.03,  
               "endDate":null,  
               "timeZone":"US/Pacific",  
               "billingPeriod":"MONTHLY",  
               "currency":"USD"  
            }  
         ],  
         "projects":null  
      }  
   ]  
}
Body Params
RAW_BODY
array of objects
RAW_BODY
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json