Back to top

電気料金API 太陽光・蓄電池経済効果診断API - エネがえる V4 一般用 API

ログイン・ログアウト、単機能のシミュレーション、料金計算など基本的なAPIをご提供します。

  • ログ用の最低限のデータを除き、APIによる計算結果は エネがえるのシステム側には残りません。

  • ある条件下での電気料金等の計算は シミュレーションの結果をもとに料金計算を実行するなど、複数の API を組み合わせて実装できます。

  • 効果額は 条件の異なる複数のシミュレーション&料金計算の結果を比較することで実装できます。

なお、各APIの記述にある Request Body のサンプルは簡略化されており、このとおりにパラメータをセットしてもエラーが発生します。 Request Schema にパラメータの詳細を記述していますので、こちらの内容に従って APIのパラメータをセットして呼び出してください。

API利用の最初のステップ、利用例についてはこちら

API共通のエラーコード

API共通のエラーコード

エラーの種類によって、次の http response を返します。 (エラーメッセージの内容以外は API, method によらず同じです)

  • 400 : パラメータエラー等のリクエスト内容に起因するエラー

  • 403 : 認証エラー(有効でない認証トークン)

  • 500 : システム内部エラー(API内部での処理エラー:エネがえる担当者にご連絡ください)

  • 504 : タイムアウト(再実行しても改善されない場合、エネがえる担当者にご連絡ください)

API共通
GET/xxxx

Example URI

GET https://api.enegaeru.com/v4/xxxx
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "不足パラメータ:xxx,xxx,..."
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラーの場合、エラーの内容を返します)"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "xxxx Internal Server Error"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}
Response  504
HideShow
Headers
Content-Type: application/json

API共通
POST/xxxx

Example URI

POST https://api.enegaeru.com/v4/xxxx
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "不足パラメータ:xxx,xxx,..."
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラーの場合、エラーの内容を返します)"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "xxxx Internal Server Error"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}
Response  504
HideShow
Headers
Content-Type: application/json

API共通
PUT/xxxx

Example URI

PUT https://api.enegaeru.com/v4/xxxx
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "不足パラメータ:xxx,xxx,..."
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラーの場合、エラーの内容を返します)"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "xxxx Internal Server Error"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}
Response  504
HideShow
Headers
Content-Type: application/json

API共通
DELETE/xxxx

Example URI

DELETE https://api.enegaeru.com/v4/xxxx
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "不足パラメータ:xxx,xxx,..."
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(パラメータエラー等のリクエストエラーの場合、エラーの内容を返します)"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "message": "xxxx Internal Server Error"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "エラーメッセージ(システム内部における異常発生時)"
        }
      }
    }
  }
}
Response  504
HideShow
Headers
Content-Type: application/json

ログイン

ログイン

ログイン
POST/login/

ユーザーIDとパスワードでシステムにログインします。

Example URI

POST https://api.enegaeru.com/v4/login/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "user0000",
  "password": "Password",
  "forcelogin": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "ユーザー名"
    },
    "password": {
      "type": "string",
      "description": "パスワード"
    },
    "forcelogin": {
      "type": "boolean",
      "description": "2重ログインの場合、強制的にログインするための指定(それ以前に同じユーザー名でログインしていた他の利用者は以降認証エラーとなります。)"
    }
  },
  "required": [
    "id",
    "password"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "AQxCxxgKnxxLLhxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "userinfo": {}
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uid": {
      "type": "string",
      "description": "アクセストークン(API call時は Header の Authorization に この値をセットします)"
    },
    "userinfo": {
      "type": "object",
      "properties": {},
      "description": "ユーザーの情報(API利用時は通常使用しません)"
    }
  }
}

ログアウト

ログアウト
GET/logout/

システムからログアウトします。

Example URI

GET https://api.enegaeru.com/v4/logout/
Response  200
HideShow
Body
{
  "result": true
}
Schema
{
  "type": "object",
  "properties": {
    "result": {
      "type": "boolean",
      "description": "処理完了"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ユーザー情報

ユーザー情報更新
PUT/userinfo/

ログインしているユーザーの設定を変更します。

Example URI

PUT https://api.enegaeru.com/v4/userinfo/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "current_password": "OldPassword",
  "new_password": "NewPassword"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "current_password": {
      "type": "string",
      "description": "現在のパスワード"
    },
    "new_password": {
      "type": "string",
      "description": "新しいパスワード"
    }
  },
  "required": [
    "current_password",
    "new_password"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "username": "user0000@example.com",
  "modified": "2019-01-24T06:17:49.811Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "description": "ユーザー名"
    },
    "modified": {
      "type": "string",
      "description": "レコード更新日時"
    }
  }
}

シミュレーション

電気使用量計算

電気使用量計算
POST/usepowercalc/

現在の電気使用量、居住地、生活パターンテンプレートにより電気使用量を推計します。

  • average_epower あるいは epowers のいずれかが必須。(同時指定も可)

  • epowersは配列の内、1つ以上の入力が必須。(未入力の月は null または ‘’(空文字) をセット)

  • うるう年は考慮せず、2月は 28日固定として計算します。

Example URI

POST https://api.enegaeru.com/v4/usepowercalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "prefectures_cd": "13",
  "template_id": 1,
  "timeperiod": [
    {
      "from": 0,
      "to": 6,
      "ratio": 10
    }
  ],
  "average_epower": 500,
  "epowers": [
    500
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "prefectures_cd": {
      "type": "string",
      "description": "都道府県コード"
    },
    "template_id": {
      "type": "number",
      "description": "テンプレートID(1:朝型, 2:昼型, 3:夜型, 4:オール電化型, -1:カスタム)"
    },
    "timeperiod": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "number",
            "description": "時間帯(from)"
          },
          "to": {
            "type": "number",
            "description": "時間帯(to)"
          },
          "ratio": {
            "type": "number",
            "description": "電力量割合 (%)"
          }
        },
        "required": [
          "from",
          "to",
          "ratio"
        ]
      },
      "description": "時間帯別電力量割合 (template_id=-1の場合必要, それ以外は指定不可)"
    },
    "average_epower": {
      "type": "number",
      "description": "月平均の電気使用量"
    },
    "epowers": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月の電気使用量 (長さ12の配列 (1月~12月))"
    }
  },
  "required": [
    "prefectures_cd",
    "template_id"
  ]
}
Response  200
HideShow
Body
{
  "basemonth": "2018-01",
  "weekday": {
    "day_usepower": [
      [
        0.564516
      ]
    ]
  },
  "holiday": {
    "day_usepower": [
      [
        0.564516
      ]
    ]
  },
  "average": {
    "day_usepower": [
      [
        0.564516
      ]
    ]
  }
}
Schema
{
  "type": "object",
  "properties": {
    "basemonth": {
      "type": "string",
      "description": "基準月 (YYYY-MM形式)"
    },
    "weekday": {
      "type": "object",
      "properties": {
        "day_usepower": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "平日データ"
    },
    "holiday": {
      "type": "object",
      "properties": {
        "day_usepower": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "休日データ"
    },
    "average": {
      "type": "object",
      "properties": {
        "day_usepower": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "平均データ"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

日射量観測地点

日射量観測地点取得
GET/sunpoints/{?prefectures_cd}

都道府県コードより日射量観測地点を取得します。

  • 都道府県コードについては 電気事業者取得(/epcorps) API を参照ください。

Example URI

GET https://api.enegaeru.com/v4/sunpoints/?prefectures_cd=13
URI Parameters
HideShow
prefectures_cd
string (required) Example: 13

都道府県コード

Response  200
HideShow
Body
[
  {
    "point_no": 44134,
    "point_name": "東京",
    "pref_capital": 1
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "point_no": {
        "type": "number",
        "description": "地点No."
      },
      "point_name": {
        "type": "string",
        "description": "設置場所."
      },
      "pref_capital": {
        "type": "number",
        "description": "県庁所在地フラグ (0:県庁所在地でない, 1:県庁所在地)"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

太陽光発電量計算

太陽光発電量計算
POST/pvpowercalc/

設置地点、太陽光パネル情報から太陽光発電量を計算します。

  • maker_correction あるいは panels のいずれかが必須

Example URI

POST https://api.enegaeru.com/v4/pvpowercalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "point_no": 44132,
  "maker_correction": 4200,
  "pcs_conversion": 98,
  "pcs_output": 5.5,
  "panels ": [
    {
      "installation": 2,
      "basic_coeff": 0.76,
      "azimuth": 0,
      "tilt": 23,
      "vol": 4,
      "maxtemp_coeff": -0.44
    }
  ],
  "monthlyPvPowers ": [
    400
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "point_no": {
      "type": "number",
      "description": "地域番号"
    },
    "maker_correction": {
      "type": "number",
      "description": "メーカー補正値"
    },
    "pcs_conversion": {
      "type": "number",
      "description": "PCS変換効率"
    },
    "pcs_output": {
      "type": "number",
      "description": "PCS出力値"
    },
    "panels ": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "installation": {
            "type": "number",
            "description": "設置形態(1:架台設置, 2:屋根置き, 3:建材一体)"
          },
          "basic_coeff": {
            "type": "number",
            "description": "基本設計係数 (0.65~0.99)"
          },
          "azimuth": {
            "type": "number",
            "description": "方位角 (-179~180度)"
          },
          "tilt": {
            "type": "number",
            "description": "傾斜角 (0~90度)"
          },
          "vol": {
            "type": "number",
            "description": "出力値 1方角あたりの出力(kWh)"
          },
          "maxtemp_coeff": {
            "type": "number",
            "description": "最大出力温度係数(結晶系:-0.44, 化合物:-0.31, 薄膜ハイブリッド:-0.35, アモルファス:-0.21)"
          }
        },
        "required": [
          "installation",
          "basic_coeff",
          "azimuth",
          "tilt",
          "vol",
          "maxtemp_coeff"
        ]
      },
      "description": "太陽光パネルの情報 (配列)"
    },
    "monthlyPvPowers ": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "太陽光パネルの月発電量予測 (配列(1月~12月))"
    }
  },
  "required": [
    "point_no",
    "pcs_conversion",
    "pcs_output"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pcs_conversion": 98,
  "pcs_output": [
    [
      0
    ]
  ],
  "pcs_roundoff": [
    [
      0
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pcs_conversion": {
      "type": "number",
      "description": "PCS変換効率"
    },
    "pcs_output": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 PCS出力量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "pcs_roundoff": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 PCS過積載分の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    }
  }
}

太陽光・蓄電池シミュレーション

太陽光・蓄電池シミュレーション
POST/pvcellsimulation/

電気使用量、太陽光発電量、蓄電池情報、売電モード(余剰売電/全量売電)、蓄電の優先順位(自家消費優先/売電優先)から日々の使用推移のシミュレーションを行います。

  • cell_info が指定された場合、selling_modeは指定に関わらず '1’として計算します。

Example URI

POST https://api.enegaeru.com/v4/pvcellsimulation/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "day_usepower": [
    [
      0.504123
    ]
  ],
  "selling_mode": 1,
  "charge_priority": 1,
  "pvpowers": {
    "pcs_conversion": 98,
    "pcs_output": [
      [
        0.263547
      ]
    ],
    "pcs_roundoff": [
      [
        0.263547
      ]
    ]
  },
  "cell_info": {
    "id": 3,
    "actual_capacity": 90,
    "charge_from": 23,
    "charge_to": 5,
    "discharge_from": 5,
    "discharge_to": 23,
    "twocycle": 1,
    "ignore_waitpower": 1
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "day_usepower": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "各時間帯使用量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12 (1月~12月))にしたもの"
    },
    "selling_mode": {
      "type": "number",
      "description": "売電モード(1:余剰売電, 2:全量売電)"
    },
    "charge_priority": {
      "type": "number",
      "description": "蓄電の優先順位(1:自家消費優先, 2:売電優先)"
    },
    "pvpowers": {
      "type": "object",
      "properties": {
        "pcs_conversion": {
          "type": "number",
          "description": "PCS変換効率"
        },
        "pcs_output": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "1日の各時間帯 PCS出力量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
        },
        "pcs_roundoff": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "1日の各時間帯 PCS過積載分の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
        }
      },
      "required": [
        "pcs_output",
        "pcs_roundoff"
      ],
      "description": "太陽光発電量"
    },
    "cell_info": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "蓄電池ID"
        },
        "actual_capacity": {
          "type": "number",
          "description": "実効容量(%)"
        },
        "charge_from": {
          "type": "number",
          "description": "充電可能時間帯 From (系統から)"
        },
        "charge_to": {
          "type": "number",
          "description": "充電可能時間帯 To (系統から)"
        },
        "discharge_from": {
          "type": "number",
          "description": "放電可能時間帯 From"
        },
        "discharge_to": {
          "type": "number",
          "description": "放電可能時間帯 To"
        },
        "twocycle": {
          "type": "number",
          "description": "2サイクル充電(0:なし, 1:あり)"
        },
        "ignore_waitpower": {
          "type": "number",
          "description": "待機電力の考慮(0:考慮する, 1:考慮しない, 省略時は 0)"
        }
      },
      "required": [
        "id",
        "actual_capacity",
        "charge_from",
        "charge_to",
        "discharge_from",
        "discharge_to",
        "twocycle"
      ],
      "description": "蓄電池情報"
    }
  },
  "required": [
    "day_usepower",
    "selling_mode"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "day_purchase": [
    [
      0
    ]
  ],
  "day_usepower": [
    [
      0
    ]
  ],
  "day_pvpower": [
    [
      0
    ]
  ],
  "day_pv2self": [
    [
      0
    ]
  ],
  "day_pv2sell": [
    [
      0
    ]
  ],
  "day_pv2cell": [
    [
      0
    ]
  ],
  "day_cell2self": [
    [
      0
    ]
  ],
  "day_ep2cell": [
    [
      0
    ]
  ],
  "day_ep2self": [
    [
      0
    ]
  ],
  "day_cellrest": [
    [
      0
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "day_purchase": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 買電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_usepower": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 電気使用量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_pvpower": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 太陽光発電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_pv2self": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 太陽光発電からの自家消費量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_pv2sell": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 太陽光発電売電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_pv2cell": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 太陽光発電から蓄電池への充電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_cell2self": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 蓄電池からの自家消費量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_ep2cell": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 系統から蓄電池への充電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_ep2self": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 系統からの自家消費量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    },
    "day_cellrest": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "1日の各時間帯 蓄電池の残量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12(1月~12月))にしたもの"
    }
  }
}

既設太陽光発電シミュレーション

既設太陽光発電シミュレーション
POST/pvinstalledcalc/

既設太陽光の買電量からシミュレーションを実行します。

  • average_epower あるいは epowers のいずれかが必須。(同時指定も可)

  • epowersは配列の内、1つ以上の入力が必須。(未入力の月は null または ‘’(空文字) をセット)

  • maker_correction あるいは panels のいずれかが必須

Example URI

POST https://api.enegaeru.com/v4/pvinstalledcalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "prefectures_cd": "13",
  "template_id": 1,
  "timeperiod": [
    {
      "from": 0,
      "to": 6,
      "ratio": 10
    }
  ],
  "average_epower": 500,
  "epowers": [
    500
  ],
  "point_no": 44132,
  "maker_correction": 4200,
  "pcs_conversion": 98,
  "pcs_output": 5.5,
  "panels ": [
    {
      "installation": 2,
      "basic_coeff": 0.76,
      "azimuth": 0,
      "tilt": 23,
      "vol": 4,
      "maxtemp_coeff": -0.44
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "prefectures_cd": {
      "type": "string",
      "description": "都道府県コード"
    },
    "template_id": {
      "type": "number",
      "description": "テンプレートID(1:朝型, 2:昼型, 3:夜型, 4:オール電化型, -1:カスタム)"
    },
    "timeperiod": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "number",
            "description": "時間帯(from)"
          },
          "to": {
            "type": "number",
            "description": "時間帯(to)"
          },
          "ratio": {
            "type": "number",
            "description": "電力量割合(%)"
          }
        }
      },
      "description": "時間帯別電力量割合 (template_id=-1 の場合必須)"
    },
    "average_epower": {
      "type": "number",
      "description": "月平均の電気買電量"
    },
    "epowers": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月の電気買電量 (長さ12の配列 (1月~12月))"
    },
    "point_no": {
      "type": "number",
      "description": "地域番号"
    },
    "maker_correction": {
      "type": "number",
      "description": "メーカー補正値"
    },
    "pcs_conversion": {
      "type": "number",
      "description": "PCS変換効率"
    },
    "pcs_output": {
      "type": "number",
      "description": "PCS出力値"
    },
    "panels ": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "installation": {
            "type": "number",
            "description": "設置形態(1:架台設置, 2:屋根置き, 3:建材一体)"
          },
          "basic_coeff": {
            "type": "number",
            "description": "基本設計係数 (0.65~0.99)"
          },
          "azimuth": {
            "type": "number",
            "description": "方位角 (-179~180度)"
          },
          "tilt": {
            "type": "number",
            "description": "傾斜角 (0~90度)"
          },
          "vol": {
            "type": "number",
            "description": "出力値 1方角あたりの出力(kWh)"
          },
          "maxtemp_coeff": {
            "type": "number",
            "description": "最大出力温度係数(結晶系:-0.44, 化合物:-0.31, 薄膜ハイブリッド:-0.35, アモルファス:-0.21)"
          }
        },
        "required": [
          "installation",
          "basic_coeff",
          "azimuth",
          "tilt",
          "vol",
          "maxtemp_coeff"
        ]
      },
      "description": "太陽光パネルの情報 (配列)"
    }
  },
  "required": [
    "prefectures_cd",
    "template_id",
    "point_no",
    "pcs_conversion",
    "pcs_output"
  ]
}
Response  200
HideShow
Body
{
  "basemonth": "2018-01",
  "simulation": {
    "day_purchase": [
      [
        0
      ]
    ],
    "day_usepower": [
      [
        0
      ]
    ],
    "day_pvpower": [
      [
        0
      ]
    ],
    "day_pv2self": [
      [
        0
      ]
    ],
    "day_pv2sell": [
      [
        0
      ]
    ],
    "day_pv2cell": [
      [
        0
      ]
    ],
    "day_cell2self": [
      [
        0
      ]
    ],
    "day_ep2cell": [
      [
        0
      ]
    ],
    "day_ep2self": [
      [
        0
      ]
    ],
    "day_cellrest": [
      [
        0
      ]
    ]
  },
  "pvpowers": {
    "pcs_conversion": 98,
    "pcs_output": [
      [
        0
      ]
    ],
    "pcs_roundoff": [
      [
        0
      ]
    ]
  }
}
Schema
{
  "type": "object",
  "properties": {
    "basemonth": {
      "type": "string",
      "description": "基準月 (YYYY-MM形式)"
    },
    "simulation": {
      "type": "object",
      "properties": {
        "day_purchase": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 買電量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_usepower": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 電気使用量(蓄電池の待機電力を含む)(長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_pvpower": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 太陽光発電量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_pv2self": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 太陽光発電からの自家消費量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_pv2sell": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 太陽光発電売電量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_pv2cell": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 太陽光発電から蓄電池への充電量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_cell2self": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 蓄電池からの自家消費量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_ep2cell": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 系統から蓄電池への充電量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_ep2self": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 系統からの自家消費量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "day_cellrest": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 蓄電池の残量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "太陽光発電シミュレーション結果"
    },
    "pvpowers": {
      "type": "object",
      "properties": {
        "pcs_conversion": {
          "type": "number",
          "description": "PCS変換効率"
        },
        "pcs_output": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 PCS出力量 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        },
        "pcs_roundoff": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1日の各時間帯 PCS過積載分 (長さ24の配列 (0:00~23:00))"
          },
          "description": "各月の配列 (長さ12の配列 (1月~12月))"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ガス使用量計算

ガス使用量計算
POST/usegascalc/

現在のガス使用量、世帯人数、使用ガス機器等により月毎のガス使用量を推計します。

  • average_gas あるいは volumes のいずれかが必須。(同時指定も可)

  • volumes は配列の内、1つ以上の入力が必須。(未入力の月は null または ‘’(空文字) をセット)

Example URI

POST https://api.enegaeru.com/v4/usegascalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "gastype": 1,
  "gcorp_cd": 3,
  "hh_size": 3,
  "cooker": 1,
  "hotwater": 1,
  "heater": 1,
  "average_gas": 35,
  "volumes": [
    35.01
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "gastype": {
      "type": "number",
      "description": "ガス種類 (都市ガス:1, LPガス:2)"
    },
    "gcorp_cd": {
      "type": "number",
      "description": "ガス事業者コード(都市ガスの場合、必須)"
    },
    "hh_size": {
      "type": "number",
      "description": "世帯人数,"
    },
    "cooker": {
      "type": "number",
      "description": "ガスコンロ (無:0, 有:1)"
    },
    "hotwater": {
      "type": "number",
      "description": "ガス給湯器 (無:0, 有:1)"
    },
    "heater": {
      "type": "number",
      "description": "ガス暖房 (無:0, 有:1)"
    },
    "average_gas": {
      "type": "number",
      "description": "月平均のガス使用量(㎥)"
    },
    "volumes": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量(㎥) (長さ12の配列 (1月~12月))"
    }
  },
  "required": [
    "gastype",
    "hh_size",
    "cooker",
    "hotwater",
    "heater"
  ]
}
Response  200
HideShow
Body
{
  "basemonth": "2018-01",
  "volumes": [
    35.01
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "basemonth": {
      "type": "string",
      "description": "基準月 (YYYY-MM形式)"
    },
    "volumes": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量(㎥) (長さ12の配列 (1月~12月))"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

オール電化シミュレーション

オール電化シミュレーション
POST/aesimulation/

オール電化のシミュレーションを実行します。

Example URI

POST https://api.enegaeru.com/v4/aesimulation/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "prefectures_cd": "13",
  "zip_cd": "1000005",
  "gas_type": 1,
  "gcorp_cd": 3,
  "hh_size": 3,
  "hotwater_from": 1,
  "hotwater_to": 1,
  "cooker_from": 1,
  "cooker_to": 1,
  "heater": 1,
  "gasvolumes": [
    35.01
  ],
  "epvolumes": {
    "day_pv2self": [
      [
        0
      ]
    ],
    "day_pv2sell": [
      [
        0
      ]
    ],
    "day_ep2self": [
      [
        0
      ]
    ]
  },
  "ecocute_info": {
    "id": 1,
    "heatup_from": 1,
    "heatup_to": 8,
    "peakcut_from": 11,
    "peakcut_to": 17,
    "powersave": 1,
    "reheat_start": 19
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "prefectures_cd": {
      "type": "string",
      "description": "都道府県コード"
    },
    "zip_cd": {
      "type": "string",
      "description": "郵便番号"
    },
    "gas_type": {
      "type": "number",
      "description": "ガス種類 (都市ガス:1, LPガス:2)"
    },
    "gcorp_cd": {
      "type": "number",
      "description": "ガス事業者コード (都市ガスの場合 必須)"
    },
    "hh_size": {
      "type": "number",
      "description": "世帯人数,"
    },
    "hotwater_from": {
      "type": "number",
      "description": "給湯器の種類 (従来型ガス給湯器:1, エコジョーズ:2, 不明:3, ガス以外:0)"
    },
    "hotwater_to": {
      "type": "number",
      "description": "電気給湯器へのリフォーム (しない:0, する:1)"
    },
    "cooker_from": {
      "type": "number",
      "description": "コンロ (ガス以外:0, ガス:1)"
    },
    "cooker_to": {
      "type": "number",
      "description": "IHクッキングヒーターへのリフォーム (しない:0, する:1)"
    },
    "heater": {
      "type": "number",
      "description": "ガス暖房 (無:0, 有:1)"
    },
    "gasvolumes": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量(㎥) (長さ12の配列 (1月~12月))"
    },
    "epvolumes": {
      "type": "object",
      "properties": {
        "day_pv2self": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "1日の各時間帯 太陽光発電からの自家消費量の配列を 各月の配列(長さ12(1月~12月))にしたもの"
        },
        "day_pv2sell": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "1日の各時間帯 太陽光発電売電量の配列を 各月の配列(長さ12(1月~12月))にしたもの"
        },
        "day_ep2self": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "1日の各時間帯 系統からの自家消費量の配列を 各月の配列(長さ12(1月~12月))にしたもの"
        }
      },
      "required": [
        "day_pv2self",
        "day_pv2sell",
        "day_ep2self"
      ]
    },
    "ecocute_info": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "エコキュートID"
        },
        "heatup_from": {
          "type": "number",
          "description": "系統利用の沸き上げ時間帯(From)"
        },
        "heatup_to": {
          "type": "number",
          "description": "系統利用の沸き上げ時間帯(To)"
        },
        "peakcut_from": {
          "type": "number",
          "description": "ピークカット時間帯(From)"
        },
        "peakcut_to": {
          "type": "number",
          "description": "ピークカット時間帯(To)"
        },
        "powersave": {
          "type": "number",
          "description": "パワーセーブ (OFF:0, ON:1)"
        },
        "reheat_start": {
          "type": "number",
          "description": "追い炊き開始時間"
        }
      },
      "required": [
        "id",
        "heatup_from",
        "heatup_to",
        "peakcut_from",
        "peakcut_to",
        "powersave",
        "reheat_start"
      ],
      "description": "エコキュート情報"
    }
  },
  "required": [
    "prefectures_cd",
    "zip_cd",
    "gas_type",
    "hh_size",
    "hotwater_from",
    "hotwater_to",
    "cooker_from",
    "cooker_to",
    "heater",
    "gasvolumes",
    "epvolumes"
  ]
}
Response  200
HideShow
Body
{
  "usegas": [
    0
  ],
  "useepower": [
    {
      "day_purchase": [
        [
          0
        ]
      ],
      "day_usepower": [
        [
          0
        ]
      ],
      "day_pv2self": [
        [
          0
        ]
      ],
      "day_pv2sell": [
        [
          0
        ]
      ],
      "day_ep2self": [
        [
          0
        ]
      ]
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "usegas": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ガス使用量(残分):各月の配列 (長さ12の配列 (1月~12月))"
    },
    "useepower": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "day_purchase": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "description": "1日の各時間帯 買電量 (長さ24の配列 (0:00~23:00))"
            },
            "description": "各月の配列(長さ12(1月~12月))"
          },
          "day_usepower": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "description": "1日の各時間帯 電気使用量(蓄電池の待機電力を含む)(長さ24の配列 (0:00~23:00))"
            },
            "description": "各月の配列(長さ12(1月~12月))"
          },
          "day_pv2self": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "description": "1日の各時間帯 太陽光発電からの自家消費量 (長さ24の配列 (0:00~23:00))"
            },
            "description": "各月の配列(長さ12(1月~12月))"
          },
          "day_pv2sell": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "description": "1日の各時間帯 太陽光発電売電量 (長さ24の配列 (0:00~23:00))"
            },
            "description": "各月の配列(長さ12(1月~12月))"
          },
          "day_ep2self": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "description": "1日の各時間帯 系統からの自家消費量 (長さ24の配列 (0:00~23:00))"
            },
            "description": "各月の配列(長さ12(1月~12月))"
          }
        }
      },
      "description": "電気使用量: (長さ2の配列 (沸き上げに太陽光を 0:利用しない、1:利用する))"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

電気使用量計算(電気料金から)

電気使用量計算(電気料金から)
POST/useepchargecalc/

現在の居住地、生活パターンテンプレート、電気料金プラン、電気料金により電気使用量を推計します(料金が近似値となる使用量を推計します)。
想定している使用量は 0 ~ 3,500 kWh/月 です。それを超える場合、エラーを返します。
ampare または capacity が必須。

Example URI

POST https://api.enegaeru.com/v4/useepchargecalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "prefectures_cd": "13",
  "template_id": 1,
  "timeperiod": [
    {
      "from": 0,
      "to": 6,
      "ratio": 10
    }
  ],
  "epcorp_cd": 64,
  "plan_cd": 56,
  "ampare": 50,
  "capacity": 5,
  "month": 1,
  "price": 15000,
  "basemonth": "2022-08",
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "prefectures_cd": {
      "type": "string",
      "description": "都道府県コード"
    },
    "template_id": {
      "type": "number",
      "description": "テンプレートID(1:朝型, 2:昼型, 3:夜型, 4:オール電化型, -1:カスタム)"
    },
    "timeperiod": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "number",
            "description": "時間帯(from)"
          },
          "to": {
            "type": "number",
            "description": "時間帯(to)"
          },
          "ratio": {
            "type": "number",
            "description": "電力量割合 (%)"
          }
        },
        "required": [
          "from",
          "to",
          "ratio"
        ]
      },
      "description": "時間帯別電力量割合 (template_id=-1の場合必要, それ以外は指定不可)"
    },
    "epcorp_cd": {
      "type": "number",
      "description": "電気事業者コード"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "ampare": {
      "type": "number",
      "description": "契約アンペア"
    },
    "capacity": {
      "type": "number",
      "description": "契約容量"
    },
    "month": {
      "type": "number",
      "description": "対象月、特定の月ではなく平均の場合は 0を指定"
    },
    "price": {
      "type": "number",
      "description": "電気料金"
    },
    "basemonth": {
      "type": "string",
      "description": "基準月(実行時前月までのものを指定してください。)"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "prefectures_cd",
    "template_id",
    "epcorp_cd",
    "plan_cd",
    "month",
    "price"
  ]
}
Response  200
HideShow
Body
{
  "month": 1,
  "volume": 500,
  "usepower": {
    "basemonth": "2018-01",
    "weekday": {
      "day_usepower": [
        [
          0.564516
        ]
      ]
    },
    "holiday": {
      "day_usepower": [
        [
          0.564516
        ]
      ]
    },
    "average": {
      "day_usepower": [
        [
          0.564516
        ]
      ]
    }
  },
  "epcharge": {
    "epcorp_cd": 4,
    "epcorp_shortname": "東京電力エナジーパートナー",
    "plan_cd": 6,
    "plan_name": "従量電灯B(50A)",
    "plan_info": "料金プランの概要",
    "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": {
    "month": {
      "type": "number",
      "description": "対象月、平均の場合は 0"
    },
    "volume": {
      "type": "number",
      "description": "対象の電気使用量(kWh) 推計"
    },
    "usepower": {
      "type": "object",
      "properties": {
        "basemonth": {
          "type": "string",
          "description": "基準月 (YYYY-MM形式) (指定された場合は、それをそのままセットして返します。)"
        },
        "weekday": {
          "type": "object",
          "properties": {
            "day_usepower": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
              },
              "description": "各月の配列 (長さ12の配列 (1月~12月))"
            }
          },
          "description": "平日データ"
        },
        "holiday": {
          "type": "object",
          "properties": {
            "day_usepower": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
              },
              "description": "各月の配列 (長さ12の配列 (1月~12月))"
            }
          },
          "description": "休日データ"
        },
        "average": {
          "type": "object",
          "properties": {
            "day_usepower": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "推計した1日の各時間帯使用量 (長さ24の配列 (0:00~23:00))"
              },
              "description": "各月の配列 (長さ12の配列 (1月~12月))"
            }
          },
          "description": "平均データ"
        }
      },
      "description": "電気使用量の推計結果"
    },
    "epcharge": {
      "type": "object",
      "properties": {
        "epcorp_cd": {
          "type": "number",
          "description": "電気事業者コード"
        },
        "epcorp_shortname": {
          "type": "string",
          "description": "事業者名"
        },
        "plan_cd": {
          "type": "number",
          "description": "料金プランコード"
        },
        "plan_name": {
          "type": "string",
          "description": "料金プラン名"
        },
        "plan_info": {
          "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 がセットされた場合に追加"
        }
      },
      "description": "電気料金"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ガス使用量計算(ガス料金から)

ガス使用量計算(ガス料金から)
POST/usegaschargecalc/

現在の世帯人数、使用ガス機器、ガス料金プラン、ガス料金等によりガス使用量を推計します(料金が近似値となる使用量を推計します)。
想定している使用量は 0 ~ 300 ㎥/月 です。それを超える場合、エラーを返します。

Example URI

POST https://api.enegaeru.com/v4/usegaschargecalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "gastype": 1,
  "gcorp_cd": 3,
  "plan_cd": 56,
  "hh_size": 3,
  "cooker": 1,
  "hotwater": 1,
  "heater": 1,
  "month": 1,
  "price": 15000,
  "basemonth": "2022-08",
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "gastype": {
      "type": "number",
      "description": "ガス種類 (都市ガス:1, LPガス:2)"
    },
    "gcorp_cd": {
      "type": "number",
      "description": "ガス事業者コード(都市ガスの場合、必須)"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "hh_size": {
      "type": "number",
      "description": "世帯人数,"
    },
    "cooker": {
      "type": "number",
      "description": "ガスコンロ (無:0, 有:1)"
    },
    "hotwater": {
      "type": "number",
      "description": "ガス給湯器 (無:0, 有:1)"
    },
    "heater": {
      "type": "number",
      "description": "ガス暖房 (無:0, 有:1)"
    },
    "month": {
      "type": "number",
      "description": "対象月、特定の月ではなく平均の場合は 0を指定"
    },
    "price": {
      "type": "number",
      "description": "ガス料金"
    },
    "basemonth": {
      "type": "string",
      "description": "基準月(実行時前月までのものを指定してください。)"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "gastype",
    "gcorp_cd",
    "plan_cd",
    "hh_size",
    "cooker",
    "hotwater",
    "heater",
    "month",
    "price"
  ]
}
Response  200
HideShow
Body
{
  "basemonth": "2022-08",
  "volumes": [
    35.01
  ],
  "gascharge": {
    "gcorp_cd": 3,
    "gcorp_shortname: `東京ガス_東京地区`": "Hello, world!",
    "plan_cd": 1,
    "plan_name": "一般契約",
    "yearcharge": 73171,
    "monthlycharges": [
      6098
    ],
    "detail": {
      "yearcharge": {
        "charge": 142000,
        "base": 20000,
        "usage": 110000,
        "adjust": 2000
      },
      "monthlycharges": [
        {
          "charge": 14200,
          "base": 2000,
          "usage": 11000,
          "adjust": 200
        }
      ]
    }
  }
}
Schema
{
  "type": "object",
  "properties": {
    "basemonth": {
      "type": "string",
      "description": "基準月"
    },
    "volumes": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量(㎥) (長さ12の配列 (1月~12月))"
    },
    "gascharge": {
      "type": "object",
      "properties": {
        "gcorp_cd": {
          "type": "number",
          "description": "ガス事業者コード"
        },
        "gcorp_shortname: `東京ガス_東京地区`": {
          "type": "string",
          "description": "事業者名"
        },
        "plan_cd": {
          "type": "number",
          "description": "料金プランコード"
        },
        "plan_name": {
          "type": "string",
          "description": "料金プラン名"
        },
        "yearcharge": {
          "type": "number",
          "description": "年間ガス料金総額"
        },
        "monthlycharges": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
        },
        "detail": {
          "type": "object",
          "properties": {
            "yearcharge": {
              "type": "object",
              "properties": {
                "charge": {
                  "type": "number",
                  "description": "ガス料金"
                },
                "base": {
                  "type": "number",
                  "description": "基本料金"
                },
                "usage": {
                  "type": "number",
                  "description": "従量料金"
                },
                "adjust": {
                  "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": "原料費調整"
                  }
                }
              },
              "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
            }
          },
          "description": "detail=1 がセットされた場合に追加"
        }
      },
      "description": "ガス料金"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

機器マスター関連

蓄電池情報

蓄電池情報取得
GET/cells{?unlimited}

蓄電池の情報を取得します。

Example URI

GET https://api.enegaeru.com/v4/cells?unlimited=1
URI Parameters
HideShow
unlimited
number (optional) Example: 1

無制限出力の指定(1:無制限)

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 32,
    "maker": "DMM",
    "model": "MS3098-DM",
    "name": "【DMM】DMM.make smart(9.8kWh)",
    "cell_capacity": 6.5,
    "rated_capacity": 2.2,
    "charge_time": 6,
    "charge_depth": 90,
    "discharge_depth": 0,
    "push_up": 0,
    "charge_from": 23,
    "charge_to": 5,
    "discharge_from": 5,
    "discharge_to": 23,
    "charge_from_a": 23,
    "charge_to_a": 5,
    "discharge_from_a": 5,
    "discharge_to_a": 23,
    "use_pv_overloaded": 1,
    "twocycle_default": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "number",
        "description": "蓄電池ID"
      },
      "maker": {
        "type": "string",
        "description": "メーカー名"
      },
      "model": {
        "type": "string",
        "description": "モデル"
      },
      "name": {
        "type": "string",
        "description": "蓄電池名称"
      },
      "cell_capacity": {
        "type": "number",
        "description": "蓄電池容量"
      },
      "rated_capacity": {
        "type": "number",
        "description": "定格出力"
      },
      "charge_time": {
        "type": "number",
        "description": "充電時間"
      },
      "charge_depth": {
        "type": "number",
        "description": "充電深度"
      },
      "discharge_depth": {
        "type": "number",
        "description": "放電深度"
      },
      "push_up": {
        "type": "number",
        "description": "ダブル発電(0:なし, 1:あり)"
      },
      "charge_from": {
        "type": "number",
        "description": "(太陽光なしor売電優先時) 充電可能時間帯 From (系統から)"
      },
      "charge_to": {
        "type": "number",
        "description": "(太陽光なしor売電優先時) 充電可能時間帯 To (系統から)"
      },
      "discharge_from": {
        "type": "number",
        "description": "(太陽光なしor売電優先時) 放電可能時間帯 From"
      },
      "discharge_to": {
        "type": "number",
        "description": "(太陽光なしor売電優先時) 放電可能時間帯 To"
      },
      "charge_from_a": {
        "type": "number",
        "description": "(太陽光自家消費優先時) 充電可能時間帯 From (系統から)"
      },
      "charge_to_a": {
        "type": "number",
        "description": "(太陽光自家消費優先時) 充電可能時間帯 To (系統から)"
      },
      "discharge_from_a": {
        "type": "number",
        "description": "(太陽光自家消費優先時) 放電可能時間帯 From"
      },
      "discharge_to_a": {
        "type": "number",
        "description": "(太陽光自家消費優先時) 放電可能時間帯 To"
      },
      "use_pv_overloaded": {
        "type": "number",
        "description": "太陽光過積載充電(0:なし, 1:あり)"
      },
      "twocycle_default": {
        "type": "number",
        "description": "2サイクル充電デフォルト値(0:OFF, 1:ON)"
      }
    }
  }
}

エコキュート情報

エコキュート情報取得
GET/ecocutes{?unlimited}

エコキュート機器の情報を取得します。

Example URI

GET https://api.enegaeru.com/v4/ecocutes?unlimited=1
URI Parameters
HideShow
unlimited
number (optional) Example: 1

無制限出力の指定(1:無制限)

Response  200
HideShow
Body
{
  "id": 5,
  "maker_code": 1,
  "maker_name": "パナソニック",
  "category_cd": 1,
  "capacity": 370,
  "efficiency": 3.8,
  "epower": 0.975,
  "epower_winter": 1.5,
  "epower_save": 0.975,
  "epower_winter_save": 1.5
}
Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "エコキュート機器ID"
    },
    "maker_code": {
      "type": "number",
      "description": "エコキュート事業者コード"
    },
    "maker_name": {
      "type": "string",
      "description": "事業者名"
    },
    "category_cd": {
      "type": "number",
      "description": "種別 (スタンダード(標準機):1, プレミアム:2, その他:3)"
    },
    "capacity": {
      "type": "number",
      "description": "貯湯容量 (ℓ)"
    },
    "efficiency": {
      "type": "number",
      "description": "エネルギー消費効率 (ヒートポンプ給湯器を運転した時の単位消費電力量あたりの給湯熱量および保温熱量)"
    },
    "epower": {
      "type": "number",
      "description": "春~秋の消費電力量出力 (kW)"
    },
    "epower_winter": {
      "type": "number",
      "description": "冬の消費電力量出力 (kW)"
    },
    "epower_save": {
      "type": "number",
      "description": "春~秋の消費電力量出力 (kW) パワーセーブ時"
    },
    "epower_winter_save": {
      "type": "number",
      "description": "冬の消費電力量出力 (kW) パワーセーブ時"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

電気料金

電気事業者

電気事業者取得
GET/epcorps{?prefectures_cd,zip_cd,unlimited}

電気事業者の一覧を取得します。
(prefectures_cd と zip_cd は同時に指定できません。)

*都道府県コード
  北海道 01:北海道
  東北  02:青森県, 03:岩手県, 04:宮城県, 05:秋田県, 06:山形県, 07:福島県
  関東  08:茨城県, 09:栃木県, 10:群馬県, 11:埼玉県, 12:千葉県, 13:東京都, 14:神奈川県
  北陸  15:新潟県, 16:富山県, 17:石川県, 18:福井県
  中部  19:山梨県, 20:長野県, 21:岐阜県, 22:静岡県, 23:愛知県
  近畿  24:三重県, 25:滋賀県, 26:京都府, 27:大阪府, 28:兵庫県, 29:奈良県, 30:和歌山県
  中国  31:鳥取県, 32:島根県, 33:岡山県, 34:広島県, 35:山口県
  四国  36:徳島県, 37:香川県, 38:愛媛県, 39:高知県
  九州  40:福岡県, 41:佐賀県, 42:長崎県, 43:熊本県, 44:大分県, 45:宮崎県, 46:鹿児島県
  沖縄  47:沖縄県

Example URI

GET https://api.enegaeru.com/v4/epcorps?prefectures_cd=13&zip_cd=1000005&unlimited=1
URI Parameters
HideShow
prefectures_cd
string (optional) Example: 13

都道府県コード(01~47)

zip_cd
string (optional) Example: 1000005

郵便番号(ハイフンなし, 7桁)

unlimited
number (optional) Example: 1

無制限出力の指定(1:無制限)

Response  200
HideShow
Body
[
  {
    "id": "4",
    "epcorp_short_name": "東京電力エナジーパートナー",
    "surplus_selling": "24",
    "after_surplus_selling\"": "8.5",
    "oldepcorp_cd": "4",
    "occtoepcorp_cd": "K003",
    "metiepcorp_cd": "A0269",
    "occto_cd": "4203"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "電気事業者コード"
      },
      "epcorp_short_name": {
        "type": "string",
        "description": "電気事業者名"
      },
      "surplus_selling": {
        "type": "string",
        "description": "FIT期間内余剰売電単価"
      },
      "after_surplus_selling\"": {
        "type": "string",
        "description": "FIT期間後余剰売電単価"
      },
      "oldepcorp_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#"
}

電気料金プラン

電気料金プラン取得
GET/epplans{?epcorp_cd}

電気事業者コードより電気料金プランを取得します。
(電気事業者コードは /epcorps の戻り値のプロパティ:id と同じです。)

Example URI

GET https://api.enegaeru.com/v4/epplans?epcorp_cd=13
URI Parameters
HideShow
epcorp_cd
number (required) Example: 13

電気事業者コード

Response  200
HideShow
Body
[
  {
    "epcorp_cd": 4,
    "plan_cd": 10,
    "plan_type": 1,
    "plan_name": "朝得プラン(7~10kVA)",
    "base_type": 1,
    "requirement": "``",
    "ampare": 0,
    "volume_from": 6,
    "volume_to": 10,
    "ignore_volume_flg": 0,
    "contract_type": 1,
    "default_vol": 7
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "epcorp_cd": {
        "type": "number",
        "description": "電気事業者コード"
      },
      "plan_cd": {
        "type": "number",
        "description": "料金プランコード"
      },
      "plan_type": {
        "type": "number",
        "description": "料金タイプ (1:従量制, 2:選択型)"
      },
      "plan_name": {
        "type": "string",
        "description": "料金プラン名称"
      },
      "base_type": {
        "type": "number",
        "description": "基本料金計算方法 (1:固定方式, 2:契約容量方式, 3:契約容量超過方式, 4:最低料金方式, 5:ピーク電力容量方式, 6:ピーク電力容量超過方式, 7:ピーク電力固定方式, 8:契約容量方式(固定料金あり), 9:契約容量超過方式(固定料金あり))"
      },
      "requirement": {
        "type": "string",
        "description": "必須条件 (契約するための加入条件, JSON形式)"
      },
      "ampare": {
        "type": "number",
        "description": "電流契約の契約アンペア (単位:A) 電流契約以外の場合 0"
      },
      "volume_from": {
        "type": "number",
        "description": "契約容量下限値 (単位:kVA) から 1減じた値 (0の場合は0)"
      },
      "volume_to": {
        "type": "number",
        "description": "契約容量上限値 (単位:kVA) 容量制限なしの場合 0"
      },
      "ignore_volume_flg": {
        "type": "number",
        "description": "契約容量不要フラグ (0:必要, 1:不要)"
      },
      "contract_type": {
        "type": "number",
        "description": "契約種別 (1:電灯契約, 2:電力契約)"
      },
      "default_vol": {
        "type": "number",
        "description": "契約容量不明の場合のデフォルト値"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

対応する電気料金プラン取得

対応する電気料金プラン取得
POST/extractepplans/

指定した電気事業者の料金プランの内、契約アンペア数 または 契約容量に対応する料金プランを取得します。

  • contract_type, epcorps は必須。および ampare か capacity いずれかが必須。

Example URI

POST https://api.enegaeru.com/v4/extractepplans/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "contract_type": 1,
  "ampare": 50,
  "capacity": 5,
  "epcorps": [
    192
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "contract_type": {
      "type": "number",
      "description": "契約種別 (1:電灯契約, 2:電力契約)"
    },
    "ampare": {
      "type": "number",
      "description": "契約アンペア数"
    },
    "capacity": {
      "type": "number",
      "description": "契約容量"
    },
    "epcorps": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "対象とする電気事業者コード"
    }
  },
  "required": [
    "contract_type",
    "epcorps"
  ]
}
Response  200
HideShow
Body
[
  {
    "epcorp_cd": 1,
    "epcorp_shortname": "東京電力エナジーパートナー",
    "plans": [
      {
        "plan_cd": 1,
        "plan_name": "従量電灯B(50A)"
      }
    ]
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "epcorp_cd": {
        "type": "number",
        "description": "電気事業者コード"
      },
      "epcorp_shortname": {
        "type": "string",
        "description": "電気事業者名"
      },
      "plans": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "plan_cd": {
              "type": "number",
              "description": "料金プランコード"
            },
            "plan_name": {
              "type": "string",
              "description": "料金プラン名"
            }
          }
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

電気料金計算

電気料金計算
POST/epchargecalc/

料金プランと買電量により電気料金を計算します。

  • 料金プランの base_typeが 2,3,8,9 いずれかの場合は ampare か capacity いずれかが必須。

  • 月毎の燃料調整費、再エネ賦課金は basemonthに指定された月以前の同じ月のデータを適用して料金計算します。無指定の場合は燃料調整費を適用しません。

  • basemonth, weekday, holiday には 通常、電気使用量計算(/usepowercalc)等の シミュレーション系の API のレスポンスデータを使用します。

  • うるう年は考慮せず、2月は 28日固定として計算します。

Example URI

POST https://api.enegaeru.com/v4/epchargecalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "epcorp_cd": 64,
  "plan_cd": 56,
  "ampare": 50,
  "capacity": 5,
  "basemonth": "2018-01",
  "weekday": {
    "day_purchase": [
      [
        0.564516
      ]
    ]
  },
  "holiday": {
    "day_purchase": [
      [
        0.564516
      ]
    ]
  },
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "epcorp_cd": {
      "type": "number",
      "description": "電気事業者コード"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "ampare": {
      "type": "number",
      "description": "契約アンペア"
    },
    "capacity": {
      "type": "number",
      "description": "契約容量"
    },
    "basemonth": {
      "type": "string",
      "description": "基準月(YYYY-MM形式)(実行時前月までのものを指定してください。)"
    },
    "weekday": {
      "type": "object",
      "properties": {
        "day_purchase": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "各時間帯買電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12 (1月~12月))にしたもの"
        }
      },
      "required": [
        "day_purchase"
      ],
      "description": "平日データ"
    },
    "holiday": {
      "type": "object",
      "properties": {
        "day_purchase": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "各時間帯買電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12 (1月~12月))にしたもの"
        }
      },
      "required": [
        "day_purchase"
      ],
      "description": "休日データ"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "epcorp_cd",
    "plan_cd",
    "weekday"
  ]
}
Response  200
HideShow
Body
{
  "epcorp_cd": 4,
  "epcorp_shortname": "東京電力エナジーパートナー",
  "plan_cd": 6,
  "plan_name": "従量電灯B(50A)",
  "plan_info": "料金プランの概要",
  "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_shortname": {
      "type": "string",
      "description": "事業者名"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "plan_name": {
      "type": "string",
      "description": "料金プラン名"
    },
    "plan_info": {
      "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#"
}

電気料金診断

電気料金診断
POST/epdiagnosis/

複数の料金プランの電気料金を計算し、ランキングした結果を返します。

  • ampare か capacity いずれかが必須。

  • 月毎の燃料調整費、再エネ賦課金は basemonthに指定された月以前の同じ月のデータを適用して料金計算します。無指定の場合は燃料調整費を適用しません。

  • basemonth, weekday, holiday には 通常、電気使用量計算(/usepowercalc)等の シミュレーション系の API のレスポンスデータを使用します。

  • うるう年は考慮せず、2月は 28日固定として計算します。

  • 内部で呼び出している epchargecalcでのエラーは yearcharge=-1 として処理を継続します。

Example URI

POST https://api.enegaeru.com/v4/epdiagnosis/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "ampare": 50,
  "capacity": 5,
  "basemonth": "2018-01",
  "weekday": {
    "day_purchase": [
      [
        0.564516
      ]
    ]
  },
  "holiday": {
    "day_purchase": [
      [
        0.564516
      ]
    ]
  },
  "calcplans": [
    {
      "epcorp_cd": 4,
      "plans": [
        5
      ]
    }
  ],
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "ampare": {
      "type": "number",
      "description": "契約アンペア数"
    },
    "capacity": {
      "type": "number",
      "description": "契約容量"
    },
    "basemonth": {
      "type": "string",
      "description": "基準月(YYYY-MM形式)(実行時前月までのものを指定してください。)"
    },
    "weekday": {
      "type": "object",
      "properties": {
        "day_purchase": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "各時間帯買電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12 (1月~12月))にしたもの"
        }
      },
      "required": [
        "day_purchase"
      ],
      "description": "平日データ"
    },
    "holiday": {
      "type": "object",
      "properties": {
        "day_purchase": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "description": "各時間帯買電量の配列(長さ24(0:00~23:00))を 各月の配列(長さ12 (1月~12月))にしたもの"
        }
      },
      "required": [
        "day_purchase"
      ],
      "description": "休日データ"
    },
    "calcplans": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "epcorp_cd": {
            "type": "number",
            "description": "電気事業者コード"
          },
          "plans": {
            "type": "array",
            "description": "料金プランコード"
          }
        },
        "required": [
          "epcorp_cd",
          "plans"
        ]
      },
      "description": "計算対象の料金プラン"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "weekday",
    "holiday",
    "calcplans"
  ]
}
Response  200
HideShow
Body
[
  {
    "epcorp_cd": 4,
    "epcorp_shortname": "東京電力エナジーパートナー",
    "plan_cd": 5,
    "plan_name": "従量電灯B(50A)",
    "plan_info": "料金プランの概要",
    "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": "array",
  "items": {
    "type": "object",
    "properties": {
      "epcorp_cd": {
        "type": "number",
        "description": "電気事業者コード"
      },
      "epcorp_shortname": {
        "type": "string",
        "description": "事業者名"
      },
      "plan_cd": {
        "type": "number",
        "description": "料金コード"
      },
      "plan_name": {
        "type": "string",
        "description": "料金プラン名"
      },
      "plan_info": {
        "type": "string",
        "description": "料金プランの概要"
      },
      "yearcharge": {
        "type": "number",
        "description": "年間電気料金総額"
      },
      "monthlycharges": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "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#"
}

ガス料金

ガス事業者

ガス事業者取得
GET/gcorps/{?prefectures_cd}

都道府県コードより契約可能なガス事業者を取得します。

  • 都道府県コードについては 電気事業者取得(/epcorps) API を参照ください。

Example URI

GET https://api.enegaeru.com/v4/gcorps/?prefectures_cd=13
URI Parameters
HideShow
prefectures_cd
string (required) Example: 13

都道府県コード

Response  200
HideShow
Body
[
  {
    "id": "4",
    "gcorp_short_name": "東京ガス_東京地区"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "ガス事業者コード"
      },
      "gcorp_short_name": {
        "type": "string",
        "description": "ガス事業者名"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ガス料金プラン

ガス料金プラン取得
GET/gplans{?gcorp_cd}

ガス事業者コードよりガス料金プラン(一般契約のみ)を取得します。
(ガス事業者コードは /gcorps の戻り値のプロパティ:id と同じです。)

Example URI

GET https://api.enegaeru.com/v4/gplans?gcorp_cd=1
URI Parameters
HideShow
gcorp_cd
number (required) Example: 1

ガス事業者コード

Response  200
HideShow
Body
[
  {
    "gcorp_cd": "1",
    "plan_cd": "1",
    "plan_name": "一般契約"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "gcorp_cd": {
        "type": "string",
        "description": "ガス事業者コード"
      },
      "plan_cd": {
        "type": "string",
        "description": "料金プランコード"
      },
      "plan_name": {
        "type": "string",
        "description": "料金プラン名称"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

対応するガス料金プラン取得

対応するガス料金プラン取得
POST/extractgplans/

指定したガス事業者の料金プランの内、対応する料金プランを取得します。

Example URI

POST https://api.enegaeru.com/v4/extractgplans/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "gcorps": [
    3
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "gcorps": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "対象とするガス事業者コード"
    }
  },
  "required": [
    "gcorps"
  ]
}
Response  200
HideShow
Body
[
  {
    "gcorp_cd": 3,
    "gcorp_shortname: `東京ガス_東京地区`": "Hello, world!",
    "gplans": [
      {
        "plan_cd": 1,
        "plan_name": "一般契約"
      }
    ]
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "gcorp_cd": {
        "type": "number",
        "description": "ガス事業者コード"
      },
      "gcorp_shortname: `東京ガス_東京地区`": {
        "type": "string",
        "description": "ガス事業者名"
      },
      "gplans": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "plan_cd": {
              "type": "number",
              "description": "料金プランコード"
            },
            "plan_name": {
              "type": "string",
              "description": "料金プラン名"
            }
          }
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ガス料金計算

ガス料金計算
POST/gaschargecalc/

料金プランと使用量によりガス料金を計算します。

Example URI

POST https://api.enegaeru.com/v4/gaschargecalc/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "gcorp_cd": 3,
  "plan_cd": 1,
  "basemonth": "2018-01",
  "purchase": [
    35
  ],
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "gcorp_cd": {
      "type": "number",
      "description": "ガス事業者コード"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "basemonth": {
      "type": "string",
      "description": "基準月(YYYY-MM形式)(実行時前月までのものを指定してください。)"
    },
    "purchase": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量(㎥)の配列(長さ12 (1月~12月))"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "gcorp_cd",
    "plan_cd",
    "basemonth",
    "purchase"
  ]
}
Response  200
HideShow
Body
{
  "gcorp_cd": 3,
  "gcorp_shortname: `東京ガス_東京地区`": "Hello, world!",
  "plan_cd": 1,
  "plan_name": "一般契約",
  "yearcharge": 73171,
  "monthlycharges": [
    6098
  ],
  "detail": {
    "yearcharge": {
      "charge": 142000,
      "base": 20000,
      "usage": 110000,
      "adjust": 2000
    },
    "monthlycharges": [
      {
        "charge": 14200,
        "base": 2000,
        "usage": 11000,
        "adjust": 200
      }
    ]
  }
}
Schema
{
  "type": "object",
  "properties": {
    "gcorp_cd": {
      "type": "number",
      "description": "ガス事業者コード"
    },
    "gcorp_shortname: `東京ガス_東京地区`": {
      "type": "string",
      "description": "事業者名"
    },
    "plan_cd": {
      "type": "number",
      "description": "料金プランコード"
    },
    "plan_name": {
      "type": "string",
      "description": "料金プラン名"
    },
    "yearcharge": {
      "type": "number",
      "description": "年間ガス料金総額"
    },
    "monthlycharges": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
    },
    "detail": {
      "type": "object",
      "properties": {
        "yearcharge": {
          "type": "object",
          "properties": {
            "charge": {
              "type": "number",
              "description": "ガス料金"
            },
            "base": {
              "type": "number",
              "description": "基本料金"
            },
            "usage": {
              "type": "number",
              "description": "従量料金"
            },
            "adjust": {
              "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": "原料費調整"
              }
            }
          },
          "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
        }
      },
      "description": "detail=1 がセットされた場合に追加"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

ガス料金診断

ガス料金診断
POST/gasdiagnosis/

複数の料金プランのガス料金を計算し、ランキングした結果を返します。

Example URI

POST https://api.enegaeru.com/v4/gasdiagnosis/
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "basemonth": "2018-01",
  "purchase": [
    35
  ],
  "calcplans": [
    {
      "gcorp_cd": 3,
      "plans": [
        1
      ]
    }
  ],
  "detail": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "basemonth": {
      "type": "string",
      "description": "基準月(YYYY-MM形式)(実行時前月までのものを指定してください。)"
    },
    "purchase": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "各月のガス使用量の配列(長さ12 (1月~12月))"
    },
    "calcplans": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "gcorp_cd": {
            "type": "number",
            "description": "ガス事業者コード"
          },
          "plans": {
            "type": "array",
            "description": "料金プランコード"
          }
        },
        "required": [
          "gcorp_cd",
          "plans"
        ]
      },
      "description": "計算対象の料金プラン"
    },
    "detail": {
      "type": "number",
      "description": "料金の内訳が必要な場合に '1'をセット"
    }
  },
  "required": [
    "basemonth",
    "purchase",
    "calcplans"
  ]
}
Response  200
HideShow
Body
[
  {
    "gcorp_cd": 3,
    "gcorp_shortname: `東京ガス_東京地区`": "Hello, world!",
    "plan_cd": 1,
    "plan_name": "一般契約",
    "plan_info": "料金プランの概要",
    "yearcharge": 73171,
    "monthlycharges": [
      6098
    ],
    "detail": {
      "yearcharge": {
        "charge": 142000,
        "base": 20000,
        "usage": 110000,
        "adjust": 2000
      },
      "monthlycharges": [
        {
          "charge": 14200,
          "base": 2000,
          "usage": 11000,
          "adjust": 200
        }
      ]
    }
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "gcorp_cd": {
        "type": "number",
        "description": "ガス事業者コード"
      },
      "gcorp_shortname: `東京ガス_東京地区`": {
        "type": "string",
        "description": "事業者名"
      },
      "plan_cd": {
        "type": "number",
        "description": "料金プランコード"
      },
      "plan_name": {
        "type": "string",
        "description": "料金プラン名"
      },
      "plan_info": {
        "type": "string",
        "description": "料金プランの概要"
      },
      "yearcharge": {
        "type": "number",
        "description": "年間ガス料金総額"
      },
      "monthlycharges": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
      },
      "detail": {
        "type": "object",
        "properties": {
          "yearcharge": {
            "type": "object",
            "properties": {
              "charge": {
                "type": "number",
                "description": "ガス料金"
              },
              "base": {
                "type": "number",
                "description": "基本料金"
              },
              "usage": {
                "type": "number",
                "description": "従量料金"
              },
              "adjust": {
                "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": "原料費調整"
                }
              }
            },
            "description": "各月ガス料金 (長さ12の配列 (1月~12月))"
          }
        },
        "description": "detail=1 がセットされた場合に追加"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

その他

郵便番号情報

郵便番号情報取得
GET/zipcds/{zip_cd}

郵便番号の情報(都道府県コード)を取得します。 都道府県コードは 電気事業者API (/epcorps) を参照してください。

Example URI

GET https://api.enegaeru.com/v4/zipcds/1000005
URI Parameters
HideShow
zip_cd
string (required) Example: 1000005

郵便番号(数字 7桁)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "zip_cd": "1000005",
  "prefectures_cd": "13"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "zip_cd": {
      "type": "string",
      "description": "郵便番号"
    },
    "prefectures_cd": {
      "type": "string",
      "description": "都道府県コード"
    }
  }
}

Generated by aglio on 26 Feb 2024