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

# Convert Product To Medication

> Convert a product to a medication.

This changes the item's polymorphic type from PRODUCT to MEDICATION by:
1. Verifying the item exists and is a product
2. Removing the product subclass row
3. Creating a medication subclass row
4. Updating the type on the base item table



## OpenAPI

````yaml post /inventory/items/{item_id}/convert-to-medication
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /inventory/items/{item_id}/convert-to-medication:
    post:
      tags:
        - Items
      summary: Convert Product To Medication
      description: |-
        Convert a product to a medication.

        This changes the item's polymorphic type from PRODUCT to MEDICATION by:
        1. Verifying the item exists and is a product
        2. Removing the product subclass row
        3. Creating a medication subclass row
        4. Updating the type on the base item table
      operationId: >-
        convert_product_to_medication_inventory_items__item_id__convert_to_medication_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: item_id
          in: path
          required: true
          schema:
            type: string
            title: Item Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: >-
                  Response Convert Product To Medication Inventory Items  Item
                  Id  Convert To Medication Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````