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

# Create a new item (product or service).



## OpenAPI

````yaml api-reference/openapi.json post /api/items
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/items:
    post:
      tags:
        - Items
      summary: Create a new item (product or service).
      operationId: ItemsController_createItem
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateItemDto'
      responses:
        '200':
          description: The item has been successfully created.
        '400':
          description: >-
            Validation error. Possible error types: ITEM_NAME_EXISTS,
            ITEM_CATEOGRY_NOT_FOUND, COST_ACCOUNT_NOT_COGS,
            SELL_ACCOUNT_NOT_INCOME, INVENTORY_ACCOUNT_NOT_INVENTORY,
            INCOME_ACCOUNT_REQUIRED_WITH_SELLABLE_ITEM,
            COST_ACCOUNT_REQUIRED_WITH_PURCHASABLE_ITEM, etc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemApiErrorResponseDto'
components:
  schemas:
    CreateItemDto:
      type: object
      properties:
        name:
          type: string
          description: Item name
          example: Ergonomic Office Chair Model X-2000
        type:
          type: string
          description: Item type
          enum:
            - service
            - non-inventory
            - inventory
          example: inventory
        code:
          type: string
          description: Item code/SKU
          example: CHAIR-X2000
        purchasable:
          type: boolean
          description: Whether the item can be purchased
          example: true
        costPrice:
          type: number
          description: Cost price of the item
          minimum: 0
          example: 299.99
        costAccountId:
          type: number
          description: ID of the cost account
          minimum: 0
          example: 1001
        sellable:
          type: boolean
          description: Whether the item can be sold
          example: true
        sellPrice:
          type: number
          description: Selling price of the item
          minimum: 0
          example: 399.99
        sellAccountId:
          type: number
          description: ID of the sell account
          minimum: 0
          example: 2001
        inventoryAccountId:
          type: number
          description: ID of the inventory account (required for inventory items)
          minimum: 0
          example: 3001
        sellDescription:
          type: string
          description: Description shown on sales documents
          example: >-
            Premium ergonomic office chair with adjustable height, lumbar
            support, and breathable mesh back
        purchaseDescription:
          type: string
          description: Description shown on purchase documents
          example: Ergonomic office chair - Model X-2000 with standard features
        sellTaxRateId:
          type: number
          description: ID of the tax rate applied to sales
          example: 1
        purchaseTaxRateId:
          type: number
          description: ID of the tax rate applied to purchases
          example: 1
        categoryId:
          type: number
          description: ID of the item category
          minimum: 0
          example: 5
        note:
          type: string
          description: Additional notes about the item
          example: Available in black, gray, and navy colors. 5-year warranty included.
        active:
          type: boolean
          description: Whether the item is active
          default: true
          example: true
        mediaIds:
          description: IDs of media files associated with the item
          example:
            - 1
            - 2
            - 3
          type: array
          items:
            type: number
      required:
        - name
        - type
    ItemApiErrorResponseDto:
      type: object
      properties:
        errors:
          description: Array of error details
          type: array
          items:
            $ref: '#/components/schemas/ItemErrorResponseDto'
      required:
        - errors
    ItemErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        type:
          type: string
          description: Error type identifier
          enum:
            - ITEM_NAME_EXISTS
            - ITEM_CATEOGRY_NOT_FOUND
            - COST_ACCOUNT_NOT_COGS
            - COST_ACCOUNT_NOT_FOUMD
            - SELL_ACCOUNT_NOT_FOUND
            - SELL_ACCOUNT_NOT_INCOME
            - INVENTORY_ACCOUNT_NOT_FOUND
            - INVENTORY_ACCOUNT_NOT_INVENTORY
            - ITEMS_HAVE_ASSOCIATED_TRANSACTIONS
            - ITEM_HAS_ASSOCIATED_TRANSACTINS
            - ITEM_HAS_ASSOCIATED_INVENTORY_ADJUSTMENT
            - ITEM_CANNOT_CHANGE_INVENTORY_TYPE
            - TYPE_CANNOT_CHANGE_WITH_ITEM_HAS_TRANSACTIONS
            - INVENTORY_ACCOUNT_CANNOT_MODIFIED
            - PURCHASE_TAX_RATE_NOT_FOUND
            - SELL_TAX_RATE_NOT_FOUND
            - INCOME_ACCOUNT_REQUIRED_WITH_SELLABLE_ITEM
            - COST_ACCOUNT_REQUIRED_WITH_PURCHASABLE_ITEM
            - NOT_FOUND
            - ITEMS_NOT_FOUND
          example: ITEM_NAME_EXISTS
        message:
          type: string
          description: Human-readable error message
          example: The item name is already exist.
          nullable: true
        payload:
          type: object
          description: Additional error payload data
          nullable: true
      required:
        - statusCode
        - type

````