Add or update an account tariff using your providerAccountId.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Add or update an account tariff using your providerAccountId.
Use this endpoint when you identify accounts with your own IDs. To add or update an account tariff using the Arcadia-generated account identifier, use Add or Update Account Tariff with accountId.
Set the tariff for a service type such as ELECTRICITY or SOLAR_PV. You can also set effectiveDate when the account switches tariffs or confirm a defaulted tariff by passing customerLikelihood as null or 100.
Resource URI
PUT /rest/v1/accounts/pid/{providerAccountId}/tariffsPath parameters
| Parameter | Type | Description |
|---|---|---|
providerAccountId | String | Your unique identifier for the Account object. Required. |
Request parameters
Place the account tariff to add or update in the request body. When editing an existing tariff entry, Switch matches the entry by serviceType and effectiveDate.
When switching an account from one tariff to another at a specific point in time, set effectiveDate. Switch checks for overlapping effective ranges and returns an error if one exists.
| Field | Type | Description |
|---|---|---|
masterTariffId | Integer | Master tariff ID to assign to the account. Required. |
serviceType | String | Service type for the tariff assignment, such as ELECTRICITY or SOLAR_PV. Defaults to ELECTRICITY when omitted. Optional. |
customerLikelihood | Number | Likelihood that the account is on this tariff. Use 100 or null to confirm a defaulted tariff. Optional. |
effectiveDate | Date | Date the tariff becomes effective for the account. Required when storing multiple tariff assignments. Optional otherwise. |
endDate | Date | Date the tariff assignment ends. Use null for an open-ended tariff assignment. Optional. |
For the full data model, account tariff workflow, tariff assignment behavior, and detailed examples, see Account Tariffs API.
Example
This example sets or confirms a tariff on the account. Pass masterTariffId and serviceType. If serviceType is not set, it defaults to ELECTRICITY.
PUT /rest/v1/accounts/pid/api-eg-008/tariffsThis request payload includes optional customerLikelihood and date fields. You do not need to include customerLikelihood when the value is null or 100, and you do not need to include date fields when setting them to null.
{
"masterTariffId": 522,
"serviceType": "ELECTRICITY",
"customerLikelihood": 100,
"effectiveDate": null,
"endDate": null
}A successful request returns a standard response payload with type set to Tariff and results containing the updated account tariff.
{
"status": "success",
"count": 1,
"type": "Tariff",
"results": [
{
"masterTariffId": 522,
"customerClass": null,
"customerLikelihood": 100,
"endDate": null,
"timeZone": "America/Los_Angeles",
"billingPeriod": "MONTHLY",
"currency": "USD"
}
]
}