POST request/Tariffs
Returns energy suppliers tariffs applicable for the quote being rendered through ‘Switch Request’ and the consumer’s current payment method captured.
Request Information
URI Parameters
None.
Body Parameters
The tariff(s) filter. Requests should be made per consumption.
TariffsBindingModelName | Description | Type | Additional information |
---|---|---|---|
CurrentPayMethod | PayMethod |
Required |
|
Economy7Percentage | decimal number |
Required Range: inclusive between 0 and 100 |
|
Postcode | string |
Required Data type: PostalCode |
|
SupplierId | integer |
Required |
|
SwitchType | SwitchType |
Required |
Request Formats
application/json, text/json
Sample:
{ "switchType": "DualConsolidatedToDualConsolidated", "postcode": "sample string 1", "currentPayMethod": "MonthlyDirectDebit", "economy7Percentage": 2.0, "supplierId": 3 }
application/xml, text/xml
Sample:
<TariffsBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Domain.Default.BindingModel"> <CurrentPayMethod>MonthlyDirectDebit</CurrentPayMethod> <Economy7Percentage>2</Economy7Percentage> <Postcode>sample string 1</Postcode> <SupplierId>3</SupplierId> <SwitchType>DualConsolidatedToDualConsolidated</SwitchType> </TariffsBindingModel>
multipart/form-data
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="SwitchType" DualConsolidatedToDualConsolidated --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Postcode" sample string 1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="CurrentPayMethod" MonthlyDirectDebit --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Economy7Percentage" 2 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="SupplierId" 3 --MultipartDataMediaFormatterBoundary1q2w3e--
Response Information
Resource Description
TariffDtoResponseName | Description | Type | Additional information |
---|---|---|---|
ApiVersion | string |
None. |
|
TariffsDto | TariffsDto |
None. |
|
Uri | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "apiVersion": "sample string 1", "uri": "sample string 2", "tariffsDto": { "tariffs": [ { "id": 1, "name": "sample string 2", "isDefaultOrStandard": true, "dnoAreaId": 4, "dnoAreaName": "sample string 5", "isDefaultOrStandardPaperBilling": true, "isDefaultOrStandardPaperlessBilling": true, "isFixedFromEnergyStartDate": true, "isFixed": true }, { "id": 1, "name": "sample string 2", "isDefaultOrStandard": true, "dnoAreaId": 4, "dnoAreaName": "sample string 5", "isDefaultOrStandardPaperBilling": true, "isDefaultOrStandardPaperlessBilling": true, "isFixedFromEnergyStartDate": true, "isFixed": true } ] } }
application/xml, text/xml
Sample:
<TariffDtoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Models.DtoResponse"> <ApiVersion>sample string 1</ApiVersion> <TariffsDto xmlns:d2p1="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Models.Dto"> <d2p1:Tariffs> <d2p1:TariffDto> <d2p1:DnoAreaId>4</d2p1:DnoAreaId> <d2p1:DnoAreaName>sample string 5</d2p1:DnoAreaName> <d2p1:Id>1</d2p1:Id> <d2p1:IsDefaultOrStandard>true</d2p1:IsDefaultOrStandard> <d2p1:IsDefaultOrStandardPaperBilling>true</d2p1:IsDefaultOrStandardPaperBilling> <d2p1:IsDefaultOrStandardPaperlessBilling>true</d2p1:IsDefaultOrStandardPaperlessBilling> <d2p1:IsFixed>true</d2p1:IsFixed> <d2p1:IsFixedFromEnergyStartDate>true</d2p1:IsFixedFromEnergyStartDate> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:TariffDto> <d2p1:TariffDto> <d2p1:DnoAreaId>4</d2p1:DnoAreaId> <d2p1:DnoAreaName>sample string 5</d2p1:DnoAreaName> <d2p1:Id>1</d2p1:Id> <d2p1:IsDefaultOrStandard>true</d2p1:IsDefaultOrStandard> <d2p1:IsDefaultOrStandardPaperBilling>true</d2p1:IsDefaultOrStandardPaperBilling> <d2p1:IsDefaultOrStandardPaperlessBilling>true</d2p1:IsDefaultOrStandardPaperlessBilling> <d2p1:IsFixed>true</d2p1:IsFixed> <d2p1:IsFixedFromEnergyStartDate>true</d2p1:IsFixedFromEnergyStartDate> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:TariffDto> </d2p1:Tariffs> </TariffsDto> <Uri>sample string 2</Uri> </TariffDtoResponse>
multipart/form-data
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="ApiVersion" sample string 1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Uri" sample string 2 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].Id" 1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].Name" sample string 2 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].IsDefaultOrStandard" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].DnoAreaId" 4 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].DnoAreaName" sample string 5 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].IsDefaultOrStandardPaperBilling" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].IsDefaultOrStandardPaperlessBilling" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].IsFixedFromEnergyStartDate" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[0].IsFixed" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].Id" 1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].Name" sample string 2 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].IsDefaultOrStandard" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].DnoAreaId" 4 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].DnoAreaName" sample string 5 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].IsDefaultOrStandardPaperBilling" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].IsDefaultOrStandardPaperlessBilling" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].IsFixedFromEnergyStartDate" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="TariffsDto.Tariffs[1].IsFixed" True --MultipartDataMediaFormatterBoundary1q2w3e--