application/json

Body Required

Production data

  • date string Required
  • generatorId string Required
  • productionMw number Required

    Minimum value is 0.

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • createdAt string
    • date string Required
    • generatorCapacity number
    • generatorId string
    • id string
    • isRenewable boolean
    • productionMw number Required

      Minimum value is 0.

    • typeName string
    • updatedAt string
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer
    • error string
    • message string
  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer
    • error string
    • message string
POST /productions
curl \
 --request POST 'https://localhost/api/v1/productions' \
 --header "Content-Type: application/json" \
 --data '{"date":"2025-09-03","generatorId":"550e8400-e29b-41d4-a716-446655440001","productionMw":85.3}'
Request examples
{
  "date": "2025-09-03",
  "generatorId": "550e8400-e29b-41d4-a716-446655440001",
  "productionMw": 85.3
}
Response examples (201)
{
  "createdAt": "string",
  "date": "2025-09-03",
  "generatorCapacity": 100.5,
  "generatorId": "550e8400-e29b-41d4-a716-446655440001",
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "isRenewable": true,
  "productionMw": 85.3,
  "typeName": "Solar",
  "updatedAt": "string"
}
Response examples (400)
{
  "code": 400,
  "error": "Invalid input",
  "message": "The provided data is invalid"
}
Response examples (500)
{
  "code": 400,
  "error": "Invalid input",
  "message": "The provided data is invalid"
}