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

# Update an Item

> Update an item.

**The Items Data Model** is designed to simplify the management and retrieval of item-related information across various accounting platforms.

<Info>Only supported for Zoho Books, Quickbooks, Xero</Info>


## OpenAPI

````yaml PUT /accounting/items
openapi: 3.0.1
info:
  title: rootfi
  version: v3
servers:
  - url: https://api.rootfi.dev/v3
    description: global
  - url: https://api.sa.rootfi.dev/v3
    description: saudi
security: []
paths:
  /accounting/items:
    put:
      tags:
        - AccountingItems
      summary: Update an Item
      description: Update an item.
      operationId: accounting_items_update
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountingUpdateItemsRequest'
            examples:
              Example1:
                value:
                  company_id: 123
                  data:
                    - platform_id: a979d4e1-9795-ee11-be36-6045bdc629b7
                      name: Brian Vega
                      description: null
                      updated_at: '2023-12-08T00:00:00.000Z'
                      status: ACTIVE
                      bill_item:
                        tax_id: '123456'
                        account_id: '123456'
                        unit_price: 123.45
                        description: Test Item
                      code: '9837'
                      invoice_item:
                        tax_id: '123456'
                        account_id: '123456'
                        unit_price: 123.45
                        description: Test Item
                      is_bill_item: true
                      is_invoice_item: true
                      type: INVENTORY
                      quantity_on_hand: 10
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountingCreateItemsResponse'
              examples:
                Example1:
                  value:
                    data:
                      rootfi_id: 32302
                      rootfi_deleted_at: null
                      rootfi_created_at: '2024-01-24T11:12:00.315Z'
                      rootfi_updated_at: '2024-01-24T11:12:00.000Z'
                      rootfi_company_id: 1109
                      platform_id: '123456_1'
                      platform_unique_id: '123456'
                      name: Brian Vega
                      description: null
                      updated_at: '2023-12-08T00:00:00.000Z'
                      status: ACTIVE
                      bill_item:
                        tax_id: '123456'
                        account_id: '123456'
                        unit_price: 123.45
                        description: Test Item
                      code: '9837'
                      invoice_item:
                        tax_id: '123456'
                        account_id: '123456'
                        unit_price: 123.45
                        description: Test Item
                      is_bill_item: true
                      is_invoice_item: true
                      type: INVENTORY
                      quantity_on_hand: 10
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    accountingUpdateItemsRequest:
      title: accountingUpdateItemsRequest
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/accountingUpdateItemFields'
          description: The data of the items endpoint
      required:
        - data
      allOf:
        - $ref: '#/components/schemas/CompanyIDRequestField'
    accountingCreateItemsResponse:
      title: accountingCreateItemsResponse
      type: object
      properties:
        data:
          $ref: '#/components/schemas/accountingItemObject'
          nullable: true
          description: List of items
        sync_id:
          type: string
          nullable: true
          description: The sync id of the request
    RootFiAPIResponseType:
      title: RootFiAPIResponseType
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RootFiAPIResponseErrorType'
          description: The error message
      required:
        - error
    accountingUpdateItemFields:
      title: accountingUpdateItemFields
      type: object
      properties:
        platform_id:
          type: string
          description: The platform ID of the item
          example: a979d4e1-9795-ee11-be36-6045bdc629b7
      required:
        - platform_id
      allOf:
        - $ref: '#/components/schemas/accountingItemFields'
    CompanyIDRequestField:
      title: CompanyIDRequestField
      type: object
      properties:
        company_id:
          type: integer
          description: The ID of the company in the accounting platform
        run_async:
          type: boolean
          nullable: true
          description: Run the request asynchronously
      required:
        - company_id
    accountingItemObject:
      title: accountingItemObject
      type: object
      properties: {}
      allOf:
        - $ref: '#/components/schemas/AccountingRootFiBaseFields'
        - $ref: '#/components/schemas/accountingItemFields'
    RootFiAPIResponseErrorType:
      title: RootFiAPIResponseErrorType
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        field:
          type: string
          description: The status of the error
      required:
        - message
        - code
        - field
    accountingItemFields:
      title: accountingItemFields
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Name of the item
        description:
          type: string
          nullable: true
          description: Description of the item
        status:
          $ref: '#/components/schemas/BaseStatus'
          nullable: true
          description: Status of the item. Values are ACTIVE, ARCHIVED, UNKNOWN
        type:
          $ref: '#/components/schemas/ItemType'
          nullable: true
          description: >-
            Type of the item. Values are INVENTORY, NON_INVENTORY, SERVICE,
            UNKNOWN
        code:
          type: string
          nullable: true
          description: Reference code of the item
        quantity_on_hand:
          type: integer
          nullable: true
          description: Quantity on hand
        is_bill_item:
          type: boolean
          nullable: true
          description: >-
            Check if there are details (bill_item) of this item getting
            purchased
        bill_item:
          $ref: '#/components/schemas/accountingItemDetail'
          nullable: true
          description: Item details of this item getting purchased
        is_invoice_item:
          type: boolean
          nullable: true
          description: Check if there are details (invoice_item) of this item getting sold
        invoice_item:
          $ref: '#/components/schemas/accountingItemDetail'
          nullable: true
          description: Item details of this item getting sold
        updated_at:
          type: string
          nullable: true
          description: The date the item was last updated
    AccountingRootFiBaseFields:
      title: AccountingRootFiBaseFields
      type: object
      properties:
        rootfi_id:
          type: number
          format: double
          description: The unique ID we assign for that data's information
          example: 157
        rootfi_deleted_at:
          type: string
          format: date-time
          nullable: true
          description: The date at which the data was deleted in the accounting platform
        rootfi_created_at:
          type: string
          format: date-time
          description: The date at which RootFi first synced this data
          example: '2024-01-22T05:07:31.465Z'
        rootfi_updated_at:
          type: string
          format: date-time
          description: The latest date at which RootFi updated this data
          example: '2024-01-22T05:07:31.000Z'
        rootfi_company_id:
          type: number
          format: double
          description: The ID of the company in the accounting platform
          example: 1089
        platform_id:
          type: string
          description: An unique custom RootFi ID made from platform's unique_id.
          example: '123456'
        platform_unique_id:
          type: string
          nullable: true
          description: The ID of the data in the accounting platform.
        raw_data:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            A JSON containing fields that you can directly get from the
            accounting platform.
        data_hash:
          type: string
          nullable: true
          description: The hash of the data
      required:
        - rootfi_id
        - rootfi_created_at
        - rootfi_updated_at
        - rootfi_company_id
        - platform_id
    BaseStatus:
      title: BaseStatus
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
        - UNKNOWN
    ItemType:
      title: ItemType
      type: string
      enum:
        - INVENTORY
        - NON_INVENTORY
        - SERVICE
        - UNKNOWN
    accountingItemDetail:
      title: accountingItemDetail
      type: object
      properties:
        tax_id:
          type: string
          nullable: true
          description: Tax id of the item
        account_id:
          type: string
          nullable: true
        unit_price:
          type: number
          format: double
          nullable: true
          description: Unit price of the item
        description:
          type: string
          nullable: true
          description: Description of the item
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````