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

# Update a Fermentable

> Partial update — send only the fields you are changing.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/fermentables/{id}
openapi: 3.1.0
info:
  title: Brewgravity API
  version: 1.0.0
  description: >-
    Read and write your recipes, brew sessions, fermentation logs, and
    ingredient inventory.


    Every request is scoped to the account its credential belongs to — there is
    no `user_id` parameter anywhere, and an id belonging to someone else returns
    `404`.


    All units are metric: kilograms, grams, litres, degrees Celsius, minutes.
  contact:
    name: Brewgravity support
    email: support@brewgravity.com
servers:
  - url: https://brewgravity.com
    description: Production
  - url: http://localhost:8787
    description: Local development
security:
  - apiKey: []
tags:
  - name: Identity
    description: Who the credential belongs to.
  - name: Recipes
    description: Recipes and their computed stats.
  - name: Fermentables
    description: Grain, sugar, and extract on a recipe.
  - name: Hops
    description: Hop additions on a recipe.
  - name: Yeasts
    description: Yeast on a recipe.
  - name: Other ingredients
    description: Finings, salts, spices, and flavourings.
  - name: Mash steps
    description: A recipe's mash schedule.
  - name: Brew sessions
    description: Individual brew days made from a recipe.
  - name: Brew day steps
    description: The checklist attached to a brew session.
  - name: Fermentation logs
    description: Timestamped readings against a brew session.
  - name: Inventory
    description: Ingredients you physically have on hand.
  - name: AI
    description: Recipe analysis and usage metering.
  - name: Chats
    description: >-
      AI chat threads. The streaming turn endpoint is not part of the REST
      surface.
paths:
  /v1/fermentables/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Fermentable id
    patch:
      tags:
        - Fermentables
      summary: Update a Fermentable
      description: Partial update — send only the fields you are changing.
      operationId: updateFermentable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFermentable'
      responses:
        '200':
          description: The updated Fermentable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Fermentable'
        '401':
          description: Missing, invalid, or revoked credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such resource, or it does not belong to you
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The body failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
components:
  schemas:
    UpdateFermentable:
      type: object
      properties:
        name:
          type: string
          description: Fermentable name, e.g. "Maris Otter"
          minLength: 1
        type:
          type: string
          enum:
            - grain
            - sugar
            - extract
            - dry_extract
            - adjunct
          description: Fermentable category
          default: grain
        amount_kg:
          type: number
          description: Weight in kilograms
          minimum: 0
        color_srm:
          description: Colour in SRM
          type:
            - number
            - 'null'
        yield_percent:
          description: Extract yield percentage
          type:
            - number
            - 'null'
        sort_order:
          type: integer
          description: Display order
          minimum: 0
    Fermentable:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
          format: uuid
          readOnly: true
        recipe_id:
          type: string
          description: Parent recipe
          format: uuid
          readOnly: true
        name:
          type: string
          description: Fermentable name
        type:
          type: string
          enum:
            - grain
            - sugar
            - extract
            - dry_extract
            - adjunct
          description: Fermentable category
        amount_kg:
          type: number
          description: Weight in kilograms
        color_srm:
          description: Colour in SRM
          type:
            - number
            - 'null'
        yield_percent:
          description: Extract yield percentage
          type:
            - number
            - 'null'
        sort_order:
          type: integer
          description: Display order
        created_at:
          type: string
          description: ISO 8601 timestamp
          format: date-time
          readOnly: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable description of what went wrong
      required:
        - error
    ValidationError:
      type: object
      properties:
        error:
          type: string
          description: Always `Validation failed`
        details:
          type: array
          description: One entry per field that failed validation
          items:
            type: object
            properties:
              code:
                type: string
                description: Validation rule that failed
              path:
                type: array
                items:
                  type: string
                description: Path to the offending field
              message:
                type: string
                description: What is wrong with it
      required:
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: An API key created from a signed-in session. See Authentication.

````