> ## 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.

# Batch update area quantities for a project item



## OpenAPI

````yaml /openapi.yaml patch /projects/{project_id}/project_items/{project_item_id}/area_quantities
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}/project_items/{project_item_id}/area_quantities:
    patch:
      tags:
        - AreaQuantity
      summary: Batch update area quantities for a project item
      operationId: area_quantities#update
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
        - name: project_item_id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyAreaQuantityUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project_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:
    requestBodyAreaQuantityUpdate:
      type: object
      required:
        - area_quantities
      properties:
        area_quantities:
          type: array
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: integer
              quantity:
                type: string
              quantity_override:
                type: string
                nullable: true
              placeholder:
                type: string
                nullable: true
    project_item:
      type: object
      properties:
        id:
          type: integer
        identifier:
          type: string
        position:
          type: integer
          nullable: true
        product_item_id:
          type: integer
        package_id:
          type: integer
        package_section_id:
          type: integer
        category:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
            code:
              type: string
              nullable: true
            item_field_ids:
              type: array
              items:
                type: integer
        project:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
            code:
              type: string
              nullable: true
            currency:
              type: string
              nullable: true
              description: The project's currency (labels currency-format columns).
        package:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
            status:
              type: string
              enum:
                - draft
                - baselining
                - in_progress
                - finished
        package_section:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
        data:
          type: object
        resolved_formulas:
          type: object
          additionalProperties:
            type: object
            properties:
              formula_id:
                type: integer
                nullable: true
              level:
                type: string
                enum:
                  - project_item
                  - category
                  - project
              excluded:
                type: boolean
        area_quantities:
          type: array
          items:
            $ref: '#/components/schemas/area_quantity'
        quantity:
          type: string
          nullable: true
          description: >-
            Required units, including extra quantity and excluding automatic
            packaging surplus. Manual purchase overrides are converted to units.
        pack_quantity:
          type: string
          nullable: true
          description: Purchase package count when packaging is configured.
        quantity_settings:
          type: object
          properties:
            unit_type_column:
              type: string
              nullable: true
              readOnly: true
              description: >-
                Design-unit column slug from this item's project standard-field
                mapping. Display metadata only.
            design_unit:
              type: string
              nullable: true
              readOnly: true
              description: >-
                Resolved design-unit label, including list option labels, before
                packing. Display metadata only; raw item data remains unchanged.
            base_quantity:
              type: string
              nullable: true
            parent_quantity:
              type: string
              description: >-
                Sum of parent required units multiplied by quantity per parent.
                Available even when this item has a manual purchase override.
            quantity_override:
              type: string
              nullable: true
              description: >-
                Purchase quantity set by hand. When set, base quantity, area
                quantities and extra quantity are ignored. Counted in packs when
                quantity_per_pack is set (quantity = quantity_override *
                quantity_per_pack), otherwise in units.
            quantity_per_pack:
              type: string
              nullable: true
            extra_quantity_percentage:
              type: string
              nullable: true
            extra_quantity_override:
              type: string
              nullable: true
            extra_quantity_decimal_places:
              type: integer
        components_count:
          type: integer
        parents_count:
          type: integer
        messages:
          type: array
          items:
            type: string
    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
    area_quantity:
      type: object
      properties:
        id:
          type: integer
        area_id:
          type: integer
        quantity:
          type: string
        quantity_override:
          type: string
          nullable: true
        placeholder:
          type: string
          nullable: true
  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.