> ## Documentation Index
> Fetch the complete documentation index at: https://developer.energy-hub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh a single tariff

> Refresh a single tariff and stream out an update message.



## OpenAPI

````yaml put /v1.0.0/tariffs/{tariffId}/refresh
openapi: 3.0.1
info:
  description: A service used for smart energy players
  title: smart-energy-service
  version: 1.0.0
servers:
  - description: Generated server url
    url: https://api.energy-hub.io
security: []
paths:
  /v1.0.0/tariffs/{tariffId}/refresh:
    put:
      tags:
        - Tariff Controller
      summary: Refresh a single tariff
      description: Refresh a single tariff and stream out an update message.
      operationId: refreshTariff
      parameters:
        - description: Tariff ID
          in: path
          name: tariffId
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessageDto'
          description: Successful operation
        '400':
          content:
            application/json:
              examples:
                BAD_REQUEST:
                  $ref: '#/components/examples/BAD_REQUEST'
              schema:
                $ref: '#/components/schemas/ValidationErrorMessageDto'
          description: Bad request
        '401':
          content:
            application/json:
              examples:
                UNAUTHORIZED:
                  $ref: '#/components/examples/UNAUTHORIZED'
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
          description: Unauthorized
        '404':
          content:
            application/json:
              examples:
                TARIFF_NOT_FOUND:
                  $ref: '#/components/examples/TARIFF_NOT_FOUND'
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
          description: Not found
        '429':
          content:
            application/json:
              examples:
                TOO_MANY_REQUESTS:
                  $ref: '#/components/examples/TOO_MANY_REQUESTS'
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
          description: Request quota exceeded on vendor side
        '503':
          content:
            application/json:
              examples:
                DEVICE_IS_DISCONNECTED:
                  $ref: '#/components/examples/DEVICE_IS_DISCONNECTED'
                VENDOR_ACCOUNT_IS_DISCONNECTED:
                  $ref: '#/components/examples/VENDOR_ACCOUNT_IS_DISCONNECTED'
                VENDOR_AUTHENTICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_AUTHENTICATION_ERROR'
                VENDOR_COMMUNICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_COMMUNICATION_ERROR'
                VENDOR_CONNECTION_ERROR:
                  $ref: '#/components/examples/VENDOR_CONNECTION_ERROR'
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
          description: Service Unavailable
      security:
        - API_Key: []
components:
  schemas:
    SuccessMessageDto:
      properties:
        success:
          type: boolean
      type: object
    ValidationErrorMessageDto:
      allOf:
        - $ref: '#/components/schemas/ErrorMessageDto'
        - properties:
            errorCode:
              description: The error code
              example: EXAMPLE_ERROR_CODE
              type: string
            id:
              description: The error identifier
              example: 7958818d-64d2-4ede-b12b-4786dd2f348b
              format: uuid
              type: string
            message:
              description: The error message
              example: Example error message
              type: string
            validationErrors:
              description: List of validation errors
              items:
                $ref: '#/components/schemas/ValidationError'
              type: array
          type: object
      required:
        - errorCode
        - id
        - message
      type: object
    ErrorMessageDto:
      properties:
        errorCode:
          description: The error code
          example: EXAMPLE_ERROR_CODE
          type: string
        id:
          description: The error identifier
          example: 7958818d-64d2-4ede-b12b-4786dd2f348b
          format: uuid
          type: string
        message:
          description: The error message
          example: Example error message
          type: string
      required:
        - errorCode
        - id
        - message
      type: object
    ValidationError:
      properties:
        field:
          description: Affected field
          type: string
        message:
          description: Validation message
          type: string
      type: object
  examples:
    BAD_REQUEST:
      value:
        errorCode: BAD_REQUEST
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: Bad request
        validationErrors:
          - field: Affected field
            message: Validation message
    UNAUTHORIZED:
      value:
        errorCode: UNAUTHORIZED
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: Unauthorized
    TARIFF_NOT_FOUND:
      value:
        errorCode: TARIFF_NOT_FOUND
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[TARIFF] Tariff not found.'
    TOO_MANY_REQUESTS:
      value:
        errorCode: TOO_MANY_REQUESTS
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[VENDOR API] Request quota exceeded on Vendor API'
    DEVICE_IS_DISCONNECTED:
      value:
        errorCode: DEVICE_IS_DISCONNECTED
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: Device disconnected
    VENDOR_ACCOUNT_IS_DISCONNECTED:
      value:
        errorCode: VENDOR_ACCOUNT_IS_DISCONNECTED
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[VENDOR_ACCOUNT] Vendor account is disconnected'
    VENDOR_AUTHENTICATION_ERROR:
      value:
        errorCode: VENDOR_AUTHENTICATION_ERROR
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[VENDOR API] Authentication error with Vendor API'
    VENDOR_COMMUNICATION_ERROR:
      value:
        errorCode: VENDOR_COMMUNICATION_ERROR
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[VENDOR API] Communication error with Vendor API'
    VENDOR_CONNECTION_ERROR:
      value:
        errorCode: VENDOR_CONNECTION_ERROR
        id: a6cd16b8-7074-4b9d-bdb9-3f96dc911bce
        message: '[VENDOR API] Connection cannot be established with Vendor API'
  securitySchemes:
    API_Key:
      description: API key used for authorization and authentication.
      in: header
      name: X-API-KEY
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.