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

# Link Stock To Item



## OpenAPI

````yaml post /inventory/stocks/link-stock
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /inventory/stocks/link-stock:
    post:
      tags:
        - provider
        - inventory
      summary: Link Stock To Item
      operationId: link_stock_to_item_inventory_stocks_link_stock_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
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/ItemStock'
              type: array
              title: Stock Links
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ItemStock'
                type: array
                title: Response Link Stock To Item Inventory Stocks Link Stock Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ItemStock:
      properties:
        itemId:
          type: string
          title: Itemid
          description: ID of the item
        stockId:
          type: string
          title: Stockid
          description: ID of the stock
        quantityUsed:
          type: number
          title: Quantityused
          description: Quantity of the item
      type: object
      required:
        - itemId
        - stockId
        - quantityUsed
      title: ItemStock
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````