> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datanumia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post sites budgetheating

> Returns budget vector.



## OpenAPI

````yaml /api-reference/part-budget-api.yaml post /sites/{site-id}/budget/heating
openapi: 3.0.1
info:
  title: part-budget-api
  description: Heating control by budget
  termsOfService: TODO
  contact:
    email: api@datanumia.com
  version: 1.0.0
servers:
  - url: https://api.home.datanumia.com/api/v1
security: []
paths:
  /sites/{site-id}/budget/heating:
    post:
      description: Returns budget vector.
      operationId: estimateHeatingBudget
      parameters:
        - name: site-id
          in: path
          description: site-id
          required: true
          schema:
            type: string
      requestBody:
        description: zone-instruction-schedule
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZoneInstructionSchedule'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetVector'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Unkown resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ZoneInstructionSchedule:
      type: object
      required:
        - deviceId
        - instructionSchedule
      properties:
        deviceId:
          type: string
        instructionSchedule:
          $ref: '#/components/schemas/InstructionSchedule'
    BudgetVector:
      type: object
      required:
        - type
        - temperatures
        - budget
      properties:
        type:
          type: string
          enum:
            - TOTAL
            - HEATING
        temperatures:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Temperature'
        budget:
          type: number
    ApiError:
      description: ''
      properties:
        errorCode:
          description: Code d'erreur
          type: string
        errorDescription:
          description: Message d'erreur
          type: string
      required:
        - errorCode
    InstructionSchedule:
      type: object
      required:
        - step
        - temperatures
        - scheduleDays
      properties:
        step:
          $ref: '#/components/schemas/Step'
        temperatures:
          $ref: '#/components/schemas/TemperatureMap'
        scheduleDays:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleDay'
    Temperature:
      type: object
      properties:
        unit:
          type: string
          enum:
            - CELSIUS
        value:
          type: number
    Step:
      type: object
      required:
        - value
        - unit
      properties:
        value:
          type: integer
          enum:
            - 10
            - 15
        unit:
          type: string
          enum:
            - MINUTE
    TemperatureMap:
      description: A simple Map<string, Temperature>
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Temperature'
    ScheduleDay:
      type: object
      required:
        - day
        - schedulePeriods
      properties:
        day:
          type: string
          enum:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
            - SUNDAY
            - WEEKEND
            - WORKWEEK
            - DEFAULT
        schedulePeriods:
          description: >-
            to be valid, all the periods of this array must cover the schedule
            of 24 hours
          type: array
          items:
            $ref: '#/components/schemas/SchedulePeriod'
    SchedulePeriod:
      type: object
      required:
        - period
        - temperature
      properties:
        period:
          $ref: '#/components/schemas/Period'
        temperature:
          type: string
          description: >-
            Temperature label witch value is one of keys of TemperatureMap.
            (example T1, T2 ...)
    Period:
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: string
          description: Local time. format HH-MM-SS  (example 00:00:00)
        to:
          type: string
          description: Local time. format HH-MM-SS  (example 00:00:00)

````