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

# Get Stock Groups



## OpenAPI

````yaml get /inventory/stocks/groups
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/groups:
    get:
      tags:
        - provider
        - inventory
      summary: Get Stock Groups
      operationId: get_stock_groups_inventory_stocks_groups_get
      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: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Per Page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - asc
                  - desc
              - type: 'null'
            title: Sort Direction
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional name of the stock
            title: Name
          description: Optional name of the stock
        - name: ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Optional IDs of the stock
            title: Ids
          description: Optional IDs of the stock
        - name: item_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional ID of the item
            title: Item Id
          description: Optional ID of the item
        - name: supplier_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional ID of the supplier to filter by
            title: Supplier Id
          description: Optional ID of the supplier to filter by
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional category name to filter by (references category.name)
            title: Category
          description: Optional category name to filter by (references category.name)
        - name: remaining_quantity
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: number
              - type: 'null'
            description: Optional remaining quantity of the stock
            title: Remaining Quantity
          description: Optional remaining quantity of the stock
        - name: location_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Optional list of location IDs to filter shipments by
            title: Location Ids
          description: Optional list of location IDs to filter shipments by
        - name: unit
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/Unit'
              - type: 'null'
            description: Optional unit of measurement
            title: Unit
          description: Optional unit of measurement
        - name: is_archived
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Optional filter for archived status
            title: Is Archived
          description: Optional filter for archived status
        - name: group_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - category
                  - supplier
                type: string
              - type: 'null'
            description: Optional group by field
            title: Group By
          description: Optional group by field
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StockGroupItem'
                title: Response Get Stock Groups Inventory Stocks Groups Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Unit:
      type: string
      enum:
        - AMPOULES
        - APPLICATORS
        - BOTTLES
        - BOXES
        - CAPSULES
        - CUPS
        - DOSES
        - G_PER_ML
        - GRAMS
        - IU
        - IU_PER_ML
        - OUNCES
        - FLUID_OUNCES
        - KG
        - KITS
        - LITERS
        - MCG
        - MG
        - MG_PER_ML
        - ML
        - MMOL
        - MICROGRAM_PER_ML
        - PACKS
        - PAIRS
        - PATCHES
        - PERCENTAGE
        - PIECES
        - POUCHES
        - ROLLS
        - SACHETS
        - SHEETS
        - SPRAYS
        - STRIPS
        - SYRINGES
        - TABLETS
        - TABLETS_PER_DAY
        - TESTS
        - TUBES
        - UNITS
        - VIALS
        - TREATMENTS
        - SESSIONS
        - PULSES
        - JOULES
        - CENTIMETERS
        - THREAD_COUNT
        - INJECTIONS
        - WRINKLE_UNITS
        - POUNDS
        - FEET
        - INCHES
      title: Unit
    StockGroupItem:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        total:
          type: integer
          title: Total
      type: object
      required:
        - key
        - label
        - total
      title: StockGroupItem
    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

````