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

# Update baseline item

> Any row (custom or snapshot) of an `in_progress` package. Only the given fields change; `remove_image: true` clears the image. A row used by purchase order items keeps its section (`baseline_item_section_has_purchase_order_items`). Each change is logged (see `history`). Also accepts JSON.



## OpenAPI

````yaml /openapi.yaml patch /projects/{project_id}/packages/{package_id}/baseline_items/{id}
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /projects/{project_id}/packages/{package_id}/baseline_items/{id}:
    patch:
      tags:
        - BaselineItem
      summary: Update baseline item
      description: >-
        Any row (custom or snapshot) of an `in_progress` package. Only the given
        fields change; `remove_image: true` clears the image. A row used by
        purchase order items keeps its section
        (`baseline_item_section_has_purchase_order_items`). Each change is
        logged (see `history`). Also accepts JSON.
      operationId: baseline_items#update
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
        - name: package_id
          in: path
          required: true
          schema:
            type: integer
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                name:
                  type: string
                category_id:
                  type: integer
                package_section_id:
                  type: integer
                description:
                  type: string
                unit_type:
                  type: string
                supplier_id:
                  type: integer
                quantity:
                  type: number
                unit_cost_price:
                  type: number
                cost_price:
                  type: number
                client_price:
                  type: number
                project_currency:
                  type: string
                  description: >-
                    ISO 4217 code of Cost Price and Client Price; blank = no
                    currency. Locked once the row is ordered
                    (`baseline_item_currency_locked`); editable when the role
                    may edit any price field.
                supplier_currency:
                  type: string
                  description: >-
                    ISO 4217 code of Unit Cost Price; blank = no currency.
                    Without it, a supplier change resets it to the new
                    supplier's currency, else the project currency. Locked and
                    gated like `project_currency`.
                image:
                  type: string
                  format: binary
                remove_image:
                  type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/package_baseline_item'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    package_baseline_item:
      type: object
      description: >-
        One flat, frozen row of a package's baseline. `origin` `package` rows
        are written once when the package is started and never change; `custom`
        rows are managed by users. Category and supplier are stored twice, as
        the id they were picked from (`category_id`, `supplier_id`) and as
        frozen text (category is the full path joined with ` / `). A rename
        never changes the text; `current_category` /
        `current_supplier_company_name` give the live names. Within one package
        an id always has the same text. The section is a reference to the
        package's section; sections are frozen once the package leaves `draft`.
        Fields hidden from the viewer's role (`field_access.baseline_fields`)
        are left out of the object: name, description, unit_type, the supplier
        fields, image, the quantity fields and the price fields.
      properties:
        id:
          type: integer
        package:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
          required:
            - id
            - name
        project_id:
          type: integer
        project_item_id:
          type: integer
          nullable: true
          description: >-
            Source project item for `package` rows, null for `custom` rows.
            Informational only.
        origin:
          type: string
          enum:
            - package
            - custom
        identifier:
          type: string
        name:
          type: string
          nullable: true
        position:
          type: integer
        category_id:
          type: integer
          description: The category the row was committed with. May no longer exist.
        category:
          type: string
          example: Furniture / Seating
          description: >-
            The category path frozen when the row was committed (at Start the
            path at that time; for a custom row the name the package already
            held for the id, else the path at that time).
        current_category:
          type: string
          nullable: true
          example: Furniture / Chairs
          description: >-
            The category's live path; differs from `category` after a rename.
            Null when the category was deleted.
        package_section:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
          required:
            - id
            - name
        description:
          type: string
          nullable: true
        unit_type:
          type: string
          nullable: true
        project_currency:
          type: string
          nullable: true
          example: USD
          description: >-
            ISO 4217 code Cost Price and Client Price are in; null = no
            currency. Starts as its project's currency when the row is committed
            (built or added as a custom row); changing the project's currency
            later doesn't relabel it. Editable until the row is ordered.
            Visible/editable when any price field is (field access).
        supplier_currency:
          type: string
          nullable: true
          example: EUR
          description: >-
            ISO 4217 code Unit Cost Price is in; null = no currency. Set to the
            supplier company's currency, else the project currency, when the row
            is committed and whenever its supplier changes (unless the request
            sends one). Purchase orders created from the baseline default to it.
            Editable until the row is ordered; field access like
            `project_currency`. Amounts are never converted between the two.
        supplier_id:
          type: integer
          nullable: true
          description: >-
            The supplier company the row was committed with; null when it has no
            supplier. May no longer exist.
        supplier_company_name:
          type: string
          nullable: true
          description: >-
            Company on the source item's `supplier` contact, frozen like
            `category`.
        current_supplier_company_name:
          type: string
          nullable: true
          description: >-
            The company's live name; null without a supplier or when the company
            was deleted.
        supplier_contact_name:
          type: string
          nullable: true
          description: >-
            The company's primary person (first by position when none is
            primary), first and last name.
        supplier_contact_email:
          type: string
          nullable: true
        supplier_contact_phone:
          type: string
          nullable: true
        supplier_address:
          type: string
          nullable: true
          description: >-
            The contact's address — street, city, state, postal code and country
            joined with `, `.
        quantity:
          type: string
          nullable: true
          example: '24.00'
          description: >-
            Effective quantity — the pack count when the source item is sold in
            packs, otherwise the plain quantity.
        procured_quantity:
          type: string
          example: '10.00'
          description: >-
            Σ quantity of the purchase order items linked to this row on draft,
            open and closed purchase orders (cancelled and voided ones don't
            count). The ordered quantity, whatever was delivered.
        remaining_quantity:
          type: string
          nullable: true
          description: >-
            quantity − procured_quantity, never below 0 (an order item's
            quantity can be raised past the baseline). Null when the row has no
            quantity. New purchase order items from this row get this quantity.
        unit_cost_price:
          type: string
          nullable: true
        cost_price:
          type: string
          nullable: true
          description: Item total.
        client_price:
          type: string
          nullable: true
          description: Item total.
        image:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            url:
              type: string
            name:
              type: string
              description: >-
                The name the image was uploaded with (the stored name for images
                from before names were kept).
          required:
            - id
            - url
            - name
        created_by_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - package
        - project_id
        - origin
        - identifier
        - position
        - category_id
        - category
        - current_category
        - package_section
        - created_at
        - updated_at
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

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