{"openapi":"3.1.0","info":{"title":"USMS Calculator API","version":"1.1.0","description":"Brunei electricity, water, top-up and EV charging estimates. Every result includes a headline, a per-block breakdown and a plain-text summary suitable for chat apps.\n\nChanges:\n- 1.1.0: Added lines[].start, so a line can be drawn in the right place on the price ladder.\n- 1.0.0: First release."},"servers":[{"url":"https://usmscalculator.brunei.app"}],"paths":{"/api/v1/calculate/bill":{"get":{"summary":"Monthly electricity and water bill","description":"Pass inputs as query parameters. Add format=text for a plain-text summary.","parameters":[{"name":"segment","in":"query","required":false,"description":"Customer type on the account","schema":{"default":"residential","description":"Customer type on the account","type":"string","enum":["residential","commercial"]}},{"name":"kwh","in":"query","required":false,"description":"Electricity used in one month, in kWh","schema":{"description":"Electricity used in one month, in kWh","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"m3","in":"query","required":false,"description":"Water used in one month, in m³","schema":{"description":"Water used in one month, in m³","minimum":0,"maximum":10000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"months","in":"query","required":false,"description":"Billing period to total: 1, 3, 6 or 12 months","schema":{"description":"Billing period to total: 1, 3, 6 or 12 months","anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]}},{"name":"kva","in":"query","required":false,"description":"Subscribed capacity in kVA; commercial price blocks scale with it","schema":{"description":"Subscribed capacity in kVA; commercial price blocks scale with it","minimum":1,"maximum":5000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"waterCategory","in":"query","required":false,"description":"Commercial water category code (02 to 07); each has one flat rate per m³","schema":{"description":"Commercial water category code (02 to 07); each has one flat rate per m³","type":"string","enum":["02","03","04","05","06","07"]}},{"name":"format","in":"query","required":false,"description":"text returns only the plain-text summary.","schema":{"type":"string","enum":["json","text"]}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"bill","input":{"segment":"residential","kwh":750,"m3":40,"months":1,"kva":140,"waterCategory":"02"},"title":"Residential bill","headline":{"label":"Your bill","value":22.4,"unit":"B$","caption":"per month"},"sentence":"Electricity B$18.00 for 750 kWh and water B$4.40 for 40 m³, each month.","lines":[{"key":"electricity","label":"Electricity","amount":18,"units":750,"unit":"kWh","start":0,"blocks":[{"from":0,"to":600,"rate":0.01,"units":600,"cost":6},{"from":600,"to":2000,"rate":0.08,"units":150,"cost":12},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1250,"nextRate":0.1}},{"key":"water","label":"Water","amount":4.4,"units":40,"unit":"m³","start":0,"blocks":[{"from":0,"to":54.54,"rate":0.11,"units":40,"cost":4.4},{"from":54.54,"to":null,"rate":0.44,"units":0,"cost":0}],"position":{"index":0,"rate":0.11,"toNext":14.54,"nextRate":0.44}}],"facts":[],"assumptions":["Estimate only. Meter rental, arrears and other charges are not included."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Residential bill\nYour bill: B$22.40 per month\n\nElectricity B$18.00 for 750 kWh and water B$4.40 for 40 m³, each month.\n\nElectricity (750 kWh):\n  600 kWh × B$0.01 = B$6.00\n  150 kWh × B$0.08 = B$12.00\n  Your next kWh costs B$0.08. 1,250 kWh until B$0.10.\n\nWater (40 m³):\n  40 m³ × B$0.11 = B$4.40\n  Your next m³ costs B$0.11. 14.54 m³ until B$0.44.\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}},"post":{"summary":"Monthly electricity and water bill","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment":{"default":"residential","description":"Customer type on the account","type":"string","enum":["residential","commercial"]},"kwh":{"description":"Electricity used in one month, in kWh","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"m3":{"description":"Water used in one month, in m³","minimum":0,"maximum":10000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"months":{"description":"Billing period to total: 1, 3, 6 or 12 months","anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+$"}]},"kva":{"description":"Subscribed capacity in kVA; commercial price blocks scale with it","minimum":1,"maximum":5000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"waterCategory":{"description":"Commercial water category code (02 to 07); each has one flat rate per m³","type":"string","enum":["02","03","04","05","06","07"]}}},"example":{"kwh":750,"m3":40}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"bill","input":{"segment":"residential","kwh":750,"m3":40,"months":1,"kva":140,"waterCategory":"02"},"title":"Residential bill","headline":{"label":"Your bill","value":22.4,"unit":"B$","caption":"per month"},"sentence":"Electricity B$18.00 for 750 kWh and water B$4.40 for 40 m³, each month.","lines":[{"key":"electricity","label":"Electricity","amount":18,"units":750,"unit":"kWh","start":0,"blocks":[{"from":0,"to":600,"rate":0.01,"units":600,"cost":6},{"from":600,"to":2000,"rate":0.08,"units":150,"cost":12},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1250,"nextRate":0.1}},{"key":"water","label":"Water","amount":4.4,"units":40,"unit":"m³","start":0,"blocks":[{"from":0,"to":54.54,"rate":0.11,"units":40,"cost":4.4},{"from":54.54,"to":null,"rate":0.44,"units":0,"cost":0}],"position":{"index":0,"rate":0.11,"toNext":14.54,"nextRate":0.44}}],"facts":[],"assumptions":["Estimate only. Meter rental, arrears and other charges are not included."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Residential bill\nYour bill: B$22.40 per month\n\nElectricity B$18.00 for 750 kWh and water B$4.40 for 40 m³, each month.\n\nElectricity (750 kWh):\n  600 kWh × B$0.01 = B$6.00\n  150 kWh × B$0.08 = B$12.00\n  Your next kWh costs B$0.08. 1,250 kWh until B$0.10.\n\nWater (40 m³):\n  40 m³ × B$0.11 = B$4.40\n  Your next m³ costs B$0.11. 14.54 m³ until B$0.44.\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}}},"/api/v1/calculate/topup":{"get":{"summary":"Units bought by a prepaid top-up","description":"Pass inputs as query parameters. Add format=text for a plain-text summary.","parameters":[{"name":"segment","in":"query","required":false,"description":"Customer type on the account","schema":{"default":"residential","description":"Customer type on the account","type":"string","enum":["residential","commercial"]}},{"name":"utility","in":"query","required":false,"description":"Which prepaid meter the top-up is for","schema":{"default":"electricity","description":"Which prepaid meter the top-up is for","type":"string","enum":["electricity","water"]}},{"name":"amount","in":"query","required":false,"description":"Top-up amount in B$","schema":{"description":"Top-up amount in B$","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"already","in":"query","required":false,"description":"B$ already topped up this month; cheaper blocks are used first","schema":{"description":"B$ already topped up this month; cheaper blocks are used first","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"kva","in":"query","required":false,"description":"Subscribed capacity in kVA; commercial price blocks scale with it","schema":{"description":"Subscribed capacity in kVA; commercial price blocks scale with it","minimum":1,"maximum":5000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"waterCategory","in":"query","required":false,"description":"Commercial water category code (02 to 07); each has one flat rate per m³","schema":{"description":"Commercial water category code (02 to 07); each has one flat rate per m³","type":"string","enum":["02","03","04","05","06","07"]}},{"name":"format","in":"query","required":false,"description":"text returns only the plain-text summary.","schema":{"type":"string","enum":["json","text"]}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"topup","input":{"segment":"residential","utility":"electricity","amount":20,"already":0,"kva":140,"waterCategory":"02"},"title":"Residential electricity top-up","headline":{"label":"You get","value":775,"unit":"kWh","caption":"for B$20.00 this month"},"sentence":"B$20.00 buys 775 kWh: 600 kWh at B$0.01 and 175 kWh at B$0.08.","lines":[{"key":"electricity","label":"Electricity","amount":20,"units":775,"unit":"kWh","start":0,"blocks":[{"from":0,"to":600,"rate":0.01,"units":600,"cost":6},{"from":600,"to":2000,"rate":0.08,"units":175,"cost":14},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1225,"nextRate":0.1}}],"facts":[{"label":"Average price","value":"B$0.0258 per kWh"},{"label":"Another B$5 would buy","value":"62.5 kWh"}],"assumptions":["Tiered rates restart each month. Top-ups earlier in the month use up the cheaper blocks first.","Assumes the whole top-up goes to usage, with no arrears or other deductions."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Residential electricity top-up\nYou get: 775 kWh for B$20.00 this month\n\nB$20.00 buys 775 kWh: 600 kWh at B$0.01 and 175 kWh at B$0.08.\n\nElectricity (775 kWh):\n  600 kWh × B$0.01 = B$6.00\n  175 kWh × B$0.08 = B$14.00\n  Your next top-up buys kWh at B$0.08 each. 1,225 kWh until B$0.10.\n\nAverage price: B$0.0258 per kWh\nAnother B$5 would buy: 62.5 kWh\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}},"post":{"summary":"Units bought by a prepaid top-up","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment":{"default":"residential","description":"Customer type on the account","type":"string","enum":["residential","commercial"]},"utility":{"default":"electricity","description":"Which prepaid meter the top-up is for","type":"string","enum":["electricity","water"]},"amount":{"description":"Top-up amount in B$","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"already":{"description":"B$ already topped up this month; cheaper blocks are used first","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"kva":{"description":"Subscribed capacity in kVA; commercial price blocks scale with it","minimum":1,"maximum":5000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"waterCategory":{"description":"Commercial water category code (02 to 07); each has one flat rate per m³","type":"string","enum":["02","03","04","05","06","07"]}}},"example":{"amount":20}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"topup","input":{"segment":"residential","utility":"electricity","amount":20,"already":0,"kva":140,"waterCategory":"02"},"title":"Residential electricity top-up","headline":{"label":"You get","value":775,"unit":"kWh","caption":"for B$20.00 this month"},"sentence":"B$20.00 buys 775 kWh: 600 kWh at B$0.01 and 175 kWh at B$0.08.","lines":[{"key":"electricity","label":"Electricity","amount":20,"units":775,"unit":"kWh","start":0,"blocks":[{"from":0,"to":600,"rate":0.01,"units":600,"cost":6},{"from":600,"to":2000,"rate":0.08,"units":175,"cost":14},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1225,"nextRate":0.1}}],"facts":[{"label":"Average price","value":"B$0.0258 per kWh"},{"label":"Another B$5 would buy","value":"62.5 kWh"}],"assumptions":["Tiered rates restart each month. Top-ups earlier in the month use up the cheaper blocks first.","Assumes the whole top-up goes to usage, with no arrears or other deductions."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Residential electricity top-up\nYou get: 775 kWh for B$20.00 this month\n\nB$20.00 buys 775 kWh: 600 kWh at B$0.01 and 175 kWh at B$0.08.\n\nElectricity (775 kWh):\n  600 kWh × B$0.01 = B$6.00\n  175 kWh × B$0.08 = B$14.00\n  Your next top-up buys kWh at B$0.08 each. 1,225 kWh until B$0.10.\n\nAverage price: B$0.0258 per kWh\nAnother B$5 would buy: 62.5 kWh\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}}},"/api/v1/calculate/ev":{"get":{"summary":"Monthly cost of charging an EV or plug-in hybrid at home","description":"Pass inputs as query parameters. Add format=text for a plain-text summary.","parameters":[{"name":"batteryKwh","in":"query","required":false,"description":"Battery size in kWh, from the car's spec sheet","schema":{"description":"Battery size in kWh, from the car's spec sheet","minimum":1,"maximum":200,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"rangeKm","in":"query","required":false,"description":"Range on a full charge in km; for a plug-in hybrid, its electric-only range","schema":{"description":"Range on a full charge in km; for a plug-in hybrid, its electric-only range","minimum":10,"maximum":1500,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"phev","in":"query","required":false,"description":"true for a plug-in hybrid: daily driving beyond the electric range runs on petrol","schema":{"description":"true for a plug-in hybrid: daily driving beyond the electric range runs on petrol","anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false"]}]}},{"name":"fuelLPer100km","in":"query","required":false,"description":"Fuel use of a comparable petrol car in L/100 km; a plug-in hybrid uses it for its petrol km","schema":{"description":"Fuel use of a comparable petrol car in L/100 km; a plug-in hybrid uses it for its petrol km","minimum":1,"maximum":30,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"tankL","in":"query","required":false,"description":"Plug-in hybrids only: fuel tank size in litres, for fill-ups and total range","schema":{"description":"Plug-in hybrids only: fuel tank size in litres, for fill-ups and total range","minimum":5,"maximum":80,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"from","in":"query","required":false,"description":"Battery % at the start of one charge","schema":{"description":"Battery % at the start of one charge","minimum":0,"maximum":99,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"to","in":"query","required":false,"description":"Battery % at the end of one charge; must be above from","schema":{"description":"Battery % at the end of one charge; must be above from","minimum":1,"maximum":100,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"chargeEveryDays","in":"query","required":false,"description":"Alternative to assuming the car starts every day fully charged: the days between charges. When set, a plug-in hybrid's electric driving is capped by what one charge from `from` to `to` supplies, and the result reports charges a month","schema":{"description":"Alternative to assuming the car starts every day fully charged: the days between charges. When set, a plug-in hybrid's electric driving is capped by what one charge from `from` to `to` supplies, and the result reports charges a month","minimum":1,"maximum":30,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"km","in":"query","required":false,"description":"Distance driven in a month","schema":{"description":"Distance driven in a month","minimum":0,"maximum":20000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"householdKwh","in":"query","required":false,"description":"Household electricity a month without the car; sets the starting price block","schema":{"description":"Household electricity a month without the car; sets the starting price block","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"householdSpend","in":"query","required":false,"description":"Alternative to householdKwh: B$ spent on electricity a month without the car. When set, it is converted to kWh at residential rates and householdKwh is ignored","schema":{"description":"Alternative to householdKwh: B$ spent on electricity a month without the car. When set, it is converted to kWh at residential rates and householdKwh is ignored","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"petrolPrice","in":"query","required":false,"description":"RON97 price per litre in B$","schema":{"description":"RON97 price per litre in B$","minimum":0,"maximum":10,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}},{"name":"format","in":"query","required":false,"description":"text returns only the plain-text summary.","schema":{"type":"string","enum":["json","text"]}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"ev","input":{"batteryKwh":49.92,"rangeKm":420,"phev":false,"fuelLPer100km":10,"tankL":50,"from":20,"to":80,"km":1000,"householdKwh":500,"petrolPrice":0.53},"title":"Electric car (49.92 kWh, 420 km)","headline":{"label":"Charging cost","value":3.46,"unit":"B$","caption":"a month, added to your electricity bill","note":"B$49.54 less than petrol","noteTone":"good"},"sentence":"Driving 1,000 km a month in an electric car uses about 130.74 kWh and adds B$3.46 to your bill, B$49.54 less than petrol (B$53.00).","lines":[{"key":"ev","label":"EV charging","amount":3.46,"units":130.74,"unit":"kWh","start":500,"blocks":[{"from":0,"to":600,"rate":0.01,"units":100,"cost":1},{"from":600,"to":2000,"rate":0.08,"units":30.74,"cost":2.46},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1369.26,"nextRate":0.1}}],"facts":[{"group":"Each month","label":"Electricity bill without the car","value":"B$5.00"},{"group":"Each month","label":"Electricity bill with the car","value":"B$8.46"},{"group":"Each month","label":"Petrol car, same distance","value":"B$53.00"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Home socket (2 kW)","value":"16 h 28 min"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Single-phase wallbox (7 kW)","value":"4 h 42 min"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Dual-phase wallbox (16 kW)","value":"2 h 4 min"}],"assumptions":["Energy use of 11.9 kWh per 100 km, from the 49.92 kWh battery and 420 km range.","Adds 10% for charging losses.","Petrol comparison: a car using 10 L per 100 km of RON97 at B$0.53 per litre.","Charging at home on the residential tariff, on top of your household usage."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Electric car (49.92 kWh, 420 km)\nCharging cost: B$3.46 a month, added to your electricity bill\nB$49.54 less than petrol\n\nDriving 1,000 km a month in an electric car uses about 130.74 kWh and adds B$3.46 to your bill, B$49.54 less than petrol (B$53.00).\n\nEV charging (130.74 kWh):\n  100 kWh × B$0.01 = B$1.00\n  30.74 kWh × B$0.08 = B$2.46\n  Your next kWh costs B$0.08. 1,369.26 kWh until B$0.10.\n\nEach month:\n  Electricity bill without the car: B$5.00\n  Electricity bill with the car: B$8.46\n  Petrol car, same distance: B$53.00\n\nOne charge, 20% to 80%: 32.95 kWh, B$0.33:\n  Home socket (2 kW): 16 h 28 min\n  Single-phase wallbox (7 kW): 4 h 42 min\n  Dual-phase wallbox (16 kW): 2 h 4 min\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}},"post":{"summary":"Monthly cost of charging an EV or plug-in hybrid at home","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"batteryKwh":{"description":"Battery size in kWh, from the car's spec sheet","minimum":1,"maximum":200,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"rangeKm":{"description":"Range on a full charge in km; for a plug-in hybrid, its electric-only range","minimum":10,"maximum":1500,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"phev":{"description":"true for a plug-in hybrid: daily driving beyond the electric range runs on petrol","anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false"]}]},"fuelLPer100km":{"description":"Fuel use of a comparable petrol car in L/100 km; a plug-in hybrid uses it for its petrol km","minimum":1,"maximum":30,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"tankL":{"description":"Plug-in hybrids only: fuel tank size in litres, for fill-ups and total range","minimum":5,"maximum":80,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"from":{"description":"Battery % at the start of one charge","minimum":0,"maximum":99,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"to":{"description":"Battery % at the end of one charge; must be above from","minimum":1,"maximum":100,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"chargeEveryDays":{"description":"Alternative to assuming the car starts every day fully charged: the days between charges. When set, a plug-in hybrid's electric driving is capped by what one charge from `from` to `to` supplies, and the result reports charges a month","minimum":1,"maximum":30,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"km":{"description":"Distance driven in a month","minimum":0,"maximum":20000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"householdKwh":{"description":"Household electricity a month without the car; sets the starting price block","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"householdSpend":{"description":"Alternative to householdKwh: B$ spent on electricity a month without the car. When set, it is converted to kWh at residential rates and householdKwh is ignored","minimum":0,"maximum":100000,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]},"petrolPrice":{"description":"RON97 price per litre in B$","minimum":0,"maximum":10,"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}]}}},"example":{"batteryKwh":49.92,"rangeKm":420,"km":1000}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["calculator","input","title","headline","sentence","lines","facts","assumptions","tariff","summary"],"properties":{"calculator":{"type":"string","enum":["bill","topup","ev"]},"input":{"type":"object","description":"The input after defaults were filled in."},"title":{"type":"string","description":"Short name for the result, e.g. Residential bill."},"headline":{"type":"object","description":"The answer. Show this first.","required":["label","value","unit","caption"],"properties":{"label":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string","enum":["B$","kWh","m³"]},"caption":{"type":"string"},"note":{"type":"string","description":"A second, smaller answer, e.g. the saving versus petrol."},"noteTone":{"type":"string","enum":["good"]}}},"sentence":{"type":"string","description":"The answer as one plain sentence."},"lines":{"type":"array","description":"One per utility.","items":{"type":"object","required":["key","label","amount","units","unit","start","blocks","position"],"properties":{"key":{"type":"string","enum":["electricity","water","ev"]},"label":{"type":"string","description":"Name to show, e.g. Electricity."},"amount":{"type":"number","description":"B$ for this line: a month's cost on a bill, the amount spent on a top-up, the monthly charging cost for an EV."},"units":{"type":"number","description":"kWh or m³ covered by this line."},"unit":{"type":"string","enum":["kWh","m³"]},"start":{"type":"number","description":"Units already used this month before this line: 0 on a bill, earlier top-ups on a top-up, the household's own use for EV charging. The line covers start to start + units on the price ladder. Added in 1.1.0."},"blocks":{"type":"array","description":"Every price block in the tariff, in order, with this line's share of each.","items":{"type":"object","required":["from","to","rate","units","cost"],"properties":{"from":{"type":"number","description":"Units where this price block starts."},"to":{"type":["number","null"],"description":"Units where it ends; null for the top block, which has no end."},"rate":{"type":"number","description":"B$ per unit in this block."},"units":{"type":"number","description":"This line's units that fall in the block."},"cost":{"type":"number","description":"B$ for those units, rounded to cents. The block costs add up to the line's amount."}}}},"position":{"type":"object","description":"Where the next unit lands on the price ladder.","required":["index","rate","toNext","nextRate"],"properties":{"index":{"type":"integer","description":"Which block the next unit falls in, counting from 0."},"rate":{"type":"number","description":"B$ per unit for the next unit."},"toNext":{"type":["number","null"],"description":"Units until the price changes; null in the top block."},"nextRate":{"type":["number","null"],"description":"B$ per unit after that; null in the top block."}}}}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"group":{"type":"string"}}}},"assumptions":{"type":"array","items":{"type":"string"}},"tariff":{"type":"object","required":["version","name","currency","sourceNote"],"properties":{"version":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"sourceNote":{"type":"string"}}},"summary":{"type":"string","description":"Everything above as plain text, for chat apps and emails."}}},"example":{"calculator":"ev","input":{"batteryKwh":49.92,"rangeKm":420,"phev":false,"fuelLPer100km":10,"tankL":50,"from":20,"to":80,"km":1000,"householdKwh":500,"petrolPrice":0.53},"title":"Electric car (49.92 kWh, 420 km)","headline":{"label":"Charging cost","value":3.46,"unit":"B$","caption":"a month, added to your electricity bill","note":"B$49.54 less than petrol","noteTone":"good"},"sentence":"Driving 1,000 km a month in an electric car uses about 130.74 kWh and adds B$3.46 to your bill, B$49.54 less than petrol (B$53.00).","lines":[{"key":"ev","label":"EV charging","amount":3.46,"units":130.74,"unit":"kWh","start":500,"blocks":[{"from":0,"to":600,"rate":0.01,"units":100,"cost":1},{"from":600,"to":2000,"rate":0.08,"units":30.74,"cost":2.46},{"from":2000,"to":4000,"rate":0.1,"units":0,"cost":0},{"from":4000,"to":null,"rate":0.12,"units":0,"cost":0}],"position":{"index":1,"rate":0.08,"toNext":1369.26,"nextRate":0.1}}],"facts":[{"group":"Each month","label":"Electricity bill without the car","value":"B$5.00"},{"group":"Each month","label":"Electricity bill with the car","value":"B$8.46"},{"group":"Each month","label":"Petrol car, same distance","value":"B$53.00"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Home socket (2 kW)","value":"16 h 28 min"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Single-phase wallbox (7 kW)","value":"4 h 42 min"},{"group":"One charge, 20% to 80%: 32.95 kWh, B$0.33","label":"Dual-phase wallbox (16 kW)","value":"2 h 4 min"}],"assumptions":["Energy use of 11.9 kWh per 100 km, from the 49.92 kWh battery and 420 km range.","Adds 10% for charging losses.","Petrol comparison: a car using 10 L per 100 km of RON97 at B$0.53 per litre.","Charging at home on the residential tariff, on top of your household usage."],"tariff":{"version":"brunei-1","name":"Brunei Darussalam electricity and water tariffs","currency":"BND","sourceNote":"Electricity rates follow the Department of Electrical Services (DES) tariff page. For water, only the domestic rate for the first 54.54 m³ is printed in the Public Works Department (PWD) water facts; the other water rates were carried over from an earlier calculator. For education and self-estimation only. For official figures or enquiries, contact DES (electricity) or PWD (water)."},"summary":"Electric car (49.92 kWh, 420 km)\nCharging cost: B$3.46 a month, added to your electricity bill\nB$49.54 less than petrol\n\nDriving 1,000 km a month in an electric car uses about 130.74 kWh and adds B$3.46 to your bill, B$49.54 less than petrol (B$53.00).\n\nEV charging (130.74 kWh):\n  100 kWh × B$0.01 = B$1.00\n  30.74 kWh × B$0.08 = B$2.46\n  Your next kWh costs B$0.08. 1,369.26 kWh until B$0.10.\n\nEach month:\n  Electricity bill without the car: B$5.00\n  Electricity bill with the car: B$8.46\n  Petrol car, same distance: B$53.00\n\nOne charge, 20% to 80%: 32.95 kWh, B$0.33:\n  Home socket (2 kW): 16 h 28 min\n  Single-phase wallbox (7 kW): 4 h 42 min\n  Dual-phase wallbox (16 kW): 2 h 4 min\n\nEstimate only. Check your bill or USMS app for exact charges. For official enquiries, contact DES (electricity) or PWD (water)."}},"text/plain":{"schema":{"type":"string","description":"The summary only, when format=text."}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string","description":"Safe to show to a user as-is."}}}}}}}}}}}},"/api/v1/tariffs":{"get":{"summary":"All tariff tables","responses":{"200":{"description":"Tariffs"}}}},"/api/v1/ev-models":{"get":{"summary":"Supported EV models","responses":{"200":{"description":"Models"}}}}}}