> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-docs-cloudflare-tunnel-self-hosting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a valuation

> Update balance and/or notes. When updating the balance, both amount and date must be provided together.



## OpenAPI

````yaml /openapi.yaml patch /api/v1/valuations/{id}
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation for the Sure API.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/valuations/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Valuation entry ID
        schema:
          type: string
    patch:
      tags:
        - Valuations
      summary: Update a valuation
      description: >-
        Update balance and/or notes. When updating the balance, both amount and
        date must be provided together.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                valuation:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: Balance amount (required with date)
                    date:
                      type: string
                      format: date
                      description: Valuation date (required with amount)
                    notes:
                      type: string
              required:
                - valuation
        required: true
      responses:
        '200':
          description: valuation updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Valuation'
        '404':
          description: valuation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    Valuation:
      type: object
      required:
        - id
        - date
        - amount
        - currency
        - kind
        - account
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: The entry ID for this valuation
        date:
          type: string
          format: date
        amount:
          type: string
          description: Formatted balance amount
        currency:
          type: string
        notes:
          type: string
          nullable: true
        kind:
          type: string
          description: The type of valuation (e.g. reconciliation)
        account:
          $ref: '#/components/schemas/Account'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          nullable: true
        details:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
          nullable: true
    Account:
      type: object
      required:
        - id
        - name
        - account_type
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        account_type:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````