> ## 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 Available Lots

> Get the lots and quantities the administering provider may use.

Unallocated shipments retain legacy behavior. On an allocated shipment, the
provider may use their own remaining allocation plus the unassigned remainder,
but another provider's reservation is never exposed.

By default only lots with stock remaining are returned (for dispensing). Pass
include_depleted=True to also return fully-consumed lots, e.g. to look up the
NDC/expiry of the exact lot an already-administered dose drew from.



## OpenAPI

````yaml get /medications/{medication_id}/available-lots
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /medications/{medication_id}/available-lots:
    get:
      tags:
        - Medications
      summary: Get Available Lots
      description: >-
        Get the lots and quantities the administering provider may use.


        Unallocated shipments retain legacy behavior. On an allocated shipment,
        the

        provider may use their own remaining allocation plus the unassigned
        remainder,

        but another provider's reservation is never exposed.


        By default only lots with stock remaining are returned (for dispensing).
        Pass

        include_depleted=True to also return fully-consumed lots, e.g. to look
        up the

        NDC/expiry of the exact lot an already-administered dose drew from.
      operationId: get_available_lots_medications__medication_id__available_lots_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: medication_id
          in: path
          required: true
          schema:
            type: string
            title: Medication Id
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: provider_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Provider Id
        - name: dose_component_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Dose Component Id
        - name: include_depleted
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Depleted
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShipmentLot'
                title: >-
                  Response Get Available Lots Medications  Medication Id 
                  Available Lots Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ShipmentLot:
      properties:
        id:
          type: string
          title: Id
        stockId:
          type: string
          title: Stockid
        locationId:
          type: string
          title: Locationid
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Lotnumber
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
        ndc:
          anyOf:
            - type: string
            - type: 'null'
          title: Ndc
        remainingQuantity:
          type: number
          title: Remainingquantity
        quantity:
          type: number
          title: Quantity
        cost:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cost
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
        allocatedRemainingQuantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Allocatedremainingquantity
          description: >-
            The administering provider's own remaining allocation of this lot.
            Zero when this shipment is allocated only to other providers; None
            when the shipment is unmanaged.
        unallocatedRemainingQuantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Unallocatedremainingquantity
          description: >-
            Unassigned physical quantity available to any provider; None when
            the shipment is unmanaged.
        providerAvailableQuantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Provideravailablequantity
          description: >-
            Total quantity available to the administering provider (their
            allocation plus unassigned quantity); None when the shipment is
            unmanaged.
      type: object
      required:
        - id
        - stockId
        - locationId
        - remainingQuantity
        - quantity
      title: ShipmentLot
      description: Lightweight shipment schema for lot picker (no related objects).
    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

````