電気料金プラン関連 API(ドラフト)
電気料金プラン関連 ¶
エリアプライス管理 ¶
市場連動プランに用いるエリアプライスの管理
エリアプライス取得GET/db/areaprices/
area_cd
- 
1: 北海道エリア
 - 
2: 東北エリア
 - 
3: 東京エリア
 - 
4: 北陸エリア
 - 
5: 中部エリア
 - 
6: 関西エリア
 - 
7: 中国エリア
 - 
8: 四国エリア
 - 
9: 九州エリア
 
Example URI
GET https://api.enegaeru.com//db/areaprices/
Response  
200Headers
Content-Type: application/jsonBody
[
  {
    "area_cd": "1",
    "year_month": "2023-01",
    "prices": [
      10.02
    ]
  }
]Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "area_cd": {
        "type": "string",
        "description": "エリアコード"
      },
      "year_month": {
        "type": "string",
        "description": "対象年月"
      },
      "prices": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "description": "時間ごとの単価 (長さ 24 の配列 (0時~23時))"
      }
    }
  }
}Response  
400Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "エラーメッセージ"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラー)"
        }
      }
    }
  }
}Response  
500Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "Internal Server Error"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}電気事業者 ¶
電気事業者取得GET/db/epcorps{?area_cd}
電気事業者の一覧を取得します。
*エリアコード(旧電力管内)
  1:北海道エリア 
  2:東北エリア  
  3:東京エリア  
  4:北陸エリア  
  5:中部エリア  
  6:関西エリア  
  7:中国エリア 
  8:四国エリア 
  9:九州エリア  
  10:沖縄エリア
Example URI
GET https://api.enegaeru.com//db/epcorps?area_cd=4
URI Parameters
- area_cd
 string(optional) Example: 4エリアコード
Response  
200Body
[
  {
    "epcorp_cd": 4,
    "epcorp_name": "東京電力エナジーパートナー",
    "surplus_selling": 24,
    "after_surplus_selling\"": 8.5,
    "area_cd": "4",
    "occtoepcorp_cd": "K003",
    "metiepcorp_cd": "A0269",
    "occto_cd": "4203"
  }
]Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "epcorp_cd": {
        "type": "number",
        "description": "電気事業者コード"
      },
      "epcorp_name": {
        "type": "string",
        "description": "電気事業者名"
      },
      "surplus_selling": {
        "type": "number",
        "description": "FIT期間内余剰売電単価"
      },
      "after_surplus_selling\"": {
        "type": "number",
        "description": "FIT期間後余剰売電単価"
      },
      "area_cd": {
        "type": "string",
        "description": "エリアコード"
      },
      "occtoepcorp_cd": {
        "type": "string",
        "description": "広域機関システムコード"
      },
      "metiepcorp_cd": {
        "type": "string",
        "description": "エネ庁登録番号"
      },
      "occto_cd": {
        "type": "string",
        "description": "広域機関スイッチングコード"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}Response  
400Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "エラーメッセージ"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラー)"
        }
      }
    }
  }
}Response  
500Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "Internal Server Error"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}電気料金プラン ¶
電気料金プラン取得GET/db/epplans{?epcorp_cd}
電気事業者コードより電気料金プランを取得します。
contract_type
- 
0: 電灯契約
 - 
1: 電力契約(現在非対応)
 - 
2: 高圧(現在非対応)
 - 
3: 特別高圧(現在非対応)
 
base_type
- 
1: 固定方式
 - 
2: 契約容量方式
 - 
3: 契約容量超過方式(現在非対応)
 - 
4: 最低料金方式(現在非対応)
 - 
5: ピーク電力容量方式(現在非対応)
 - 
6: ピーク電力容量超過方式(現在非対応)
 - 
7: ピーク電力固定方式(現在非対応)
 - 
8: 契約容量方式(固定料金あり)(現在非対応)
 - 
9: 契約容量超過方式(固定料金あり)(現在非対応)
 
plan_type
- 
1: 従来型(現在非対応)
 - 
2: 市場連動型
 
Example URI
GET https://api.enegaeru.com//db/epplans?epcorp_cd=13
URI Parameters
- epcorp_cd
 number(required) Example: 13電気事業者コード
Response  
200Body
[
  {
    "epcorp_cd": 4,
    "epplan_cd": 10,
    "epplan_name": "朝得プラン(7~10kVA)",
    "contract_type": 1,
    "base_type": 1,
    "base_unit": 10,
    "plan_type": 2
  }
]Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "epcorp_cd": {
        "type": "number",
        "description": "電気事業者コード"
      },
      "epplan_cd": {
        "type": "number",
        "description": "料金プランコード"
      },
      "epplan_name": {
        "type": "string",
        "description": "料金プラン名称"
      },
      "contract_type": {
        "type": "number",
        "description": "契約種別"
      },
      "base_type": {
        "type": "number",
        "description": "基本料金計算方法"
      },
      "base_unit": {
        "type": "number",
        "description": "基本料金単価"
      },
      "plan_type": {
        "type": "number",
        "description": "従量料金計算方法"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}Response  
400Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "エラーメッセージ"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラー)"
        }
      }
    }
  }
}Response  
500Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "Internal Server Error"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}電気料金計算 ¶
電気料金計算POST/db/epchargecalc/
料金プランと買電量により電気料金を計算します。
- 現在は市場連動プランのみ対応。
 
Example URI
POST https://api.enegaeru.com//db/epchargecalc/
Request  
with bodyHeaders
Content-Type: application/jsonBody
{
  "epcorp_cd": 64,
  "epplan_cd": 56,
  "ampare": 50,
  "capacity": 5,
  "purchase": [
    {
      "date": "2023-01-01",
      "hourlyPowers": [
        0.564516
      ]
    }
  ],
  "detail": 1
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "epcorp_cd": {
      "type": "number",
      "description": "電気事業者コード"
    },
    "epplan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "ampare": {
      "type": "number",
      "description": "契約アンペア"
    },
    "capacity": {
      "type": "number",
      "description": "契約容量"
    },
    "purchase": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "対象日"
          },
          "hourlyPowers": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯買電量 (長さ24の配列 (0:00~23:00))"
          }
        },
        "required": [
          "date",
          "hourlyPowers"
        ]
      },
      "description": "各時間帯買電量の配列(長さ24(0:00~23:00))を日毎に配列にしたもの"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "epcorp_cd",
    "epplan_cd",
    "purchase"
  ]
}Response  
200Body
{
  "epcorp_cd": 4,
  "epcorp_name": "東京電力エナジーパートナー",
  "epplan_cd": 6,
  "epplan_name": "従量電灯B(50A)",
  "yearcharge": 167080,
  "monthlycharges": [
    14200
  ],
  "detail": {
    "discount_rate": 0,
    "yearcharge": {
      "charge": 142000,
      "base": 20000,
      "usage": 110000,
      "adjust": 2000,
      "levy": 10000
    },
    "monthlycharges": [
      {
        "charge": 14200,
        "base": 2000,
        "usage": 11000,
        "adjust": 200,
        "levy": 1000
      }
    ]
  }
}Schema
{
  "type": "object",
  "properties": {
    "epcorp_cd": {
      "type": "number",
      "description": "電気事業者コード"
    },
    "epcorp_name": {
      "type": "string",
      "description": "事業者名"
    },
    "epplan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "epplan_name": {
      "type": "string",
      "description": "料金プラン名"
    },
    "yearcharge": {
      "type": "number",
      "description": "年間電気料金総額"
    },
    "monthlycharges": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月電気料金 (長さ12の配列 (1月~12月))"
    },
    "detail": {
      "type": "object",
      "properties": {
        "discount_rate": {
          "type": "number",
          "description": "割引率(%)(charge以外の料金を合計した後、割引率を適用して chargeを算出しています。)"
        },
        "yearcharge": {
          "type": "object",
          "properties": {
            "charge": {
              "type": "number",
              "description": "電気料金"
            },
            "base": {
              "type": "number",
              "description": "基本料金"
            },
            "usage": {
              "type": "number",
              "description": "従量料金"
            },
            "adjust": {
              "type": "number",
              "description": "燃料調整費"
            },
            "levy": {
              "type": "number",
              "description": "再エネ賦課金"
            }
          },
          "description": "年間電気料金"
        },
        "monthlycharges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "charge": {
                "type": "number",
                "description": "電気料金"
              },
              "base": {
                "type": "number",
                "description": "基本料金"
              },
              "usage": {
                "type": "number",
                "description": "従量料金"
              },
              "adjust": {
                "type": "number",
                "description": "燃料調整費"
              },
              "levy": {
                "type": "number",
                "description": "再エネ賦課金"
              }
            }
          },
          "description": "各月電気料金 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "detail=1 がセットされた場合に追加"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}Response  
400Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "エラーメッセージ"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラー)"
        }
      }
    }
  }
}Response  
500Headers
Content-Type: application/jsonBody
{
  "error": {
    "message": "Internal Server Error"
  }
}Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}