---
title: "Generate Discharge Curve"
method: POST
path: "/v1/batteries/generate/discharge-curve"
tags: ["batteries"]
---

# Generate Discharge Curve

`POST /v1/batteries/generate/discharge-curve`

## Request

- Base URL: `https://api.shapemaker.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.shapemaker.io/v1/batteries/generate/discharge-curve`
- Auth: OAuth 2
  - Password
  - Token URL: `/v1/auth`

This calculates a list of fitted discharge points based on actual discharge pints.
Is used in frontend to display the fitted curve.

## Request body

- GenerateDischargeCurveInput
  - `capacityAh` number, required
  - `socVoltagePoints` SoCVoltagePointInput[], required
    - `voltage` number, required
    - `socPercent` number, required
  - `socCutoff` number, required

## Response `201`

Successful Response

- BatteryDischargePointView[]
  - `powerConsumptionKW` number, required
  - `backupTimeH` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/shapemaker/apis/shapemaker-api.md) - [All operations](https://skmtc.dev/shapemaker/apis/shapemaker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shapemaker/apis/shapemaker-api/revisions/b8461cf1236c?raw)
