This allows you to set a tariff on the account. You set the tariff for a given serviceType ("ELECTRICITY" or "SOLAR_PV" for instance). You can optionally set an effective date which is useful for when the account switches tariffs. Tariffs can also store supplier rate or rates in deregulated markets.
Request Parameters
The account tariff to add or update needs to be placed within the body of the request. If you are making an edit to an existing tariff entry, then the service type and effective date is used to match it. When you want to switch the account from an existing tariff to a new tariff as of a point in time, make sure to set the effectiveDate. Note that we check for overlaps and will return an error if it is, so take care with your effective ranges. You can use this endpoint to also confirm a defaulted tariff by passing in "null" or "100" for the customerLikelihood value.
Example
Here's a simple example where you want to set or confirm a tariff on the account. Pass in the masterTariffId and the serviceType (defaults to "ELECTRICITY" if not set).
PUT /rest/v1/accounts/pid/api-eg-008/tariffs
Below is the request payload. You don't actually need the customerLikelihood ("null" is the same as "100"). Nor do you need the dates if you are setting them to "null"
{
"masterTariffId": 522,
"serviceType": "ELECTRICITY",
"customerLikelihood": 100,
"effectiveDate": null,
"endDate": null
}
From this call you will get back the following response.
{
"status": "success",
"count": 1,
"type": "Tariff",
"results": [
{
"masterTariffId": 522,
"customerClass": null,
"customerLikelihood": 100,
"endDate": null,
"timeZone": "America/Los_Angeles",
"billingPeriod": "MONTHLY",
"currency": "USD"
}
]
}