> ## 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 Inventory Logs

> Get inventory logs with cursor-based day pagination.

The cursor represents a point in time - logs BEFORE this time are fetched.
The `days` parameter controls how many days of data to fetch per request.

Date range parameters (start_date, end_date) act as absolute boundaries.



## OpenAPI

````yaml get /inventory/logs/{stock_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /inventory/logs/{stock_id}:
    get:
      tags:
        - provider
        - inventory
      summary: Get Inventory Logs
      operationId: get_inventory_logs_inventory_logs__stock_id__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: stock_id
          in: path
          required: true
          schema:
            type: string
            title: Stock Id
        - name: action_types
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/InventoryAction'
              - type: 'null'
            title: Action Types
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InventoryLog'
                title: Response Get Inventory Logs Inventory Logs  Stock Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InventoryAction:
      type: string
      enum:
        - STOCK_CREATED
        - STOCK_UPDATED
        - STOCK_ARCHIVED
        - DRAWDOWN
        - RESTORED
        - SHIPMENT_RECEIVED
        - SHIPMENT_UPDATED
        - SHIPMENT_ARCHIVED
        - ITEM_LINKED
        - ITEM_UNLINKED
      title: InventoryAction
    InventoryLog:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the inventory log
        itemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Itemid
          description: ID of the item
        stockId:
          type: string
          title: Stockid
          description: ID of the stock
        quantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantity
          description: Quantity of the stock
        chargeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Chargeid
          description: ID of the charge
        action:
          $ref: '#/components/schemas/InventoryAction'
          description: Action performed on the stock
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: Date and time the log was created
        creatorId:
          type: string
          title: Creatorid
          description: ID of the creator
        shipmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipmentid
          description: ID of the shipment
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
          description: Optional note about the inventory action
        stock:
          anyOf:
            - $ref: '#/components/schemas/StockTiny'
            - type: 'null'
          description: Stock
        item:
          anyOf:
            - $ref: '#/components/schemas/Item'
            - type: 'null'
          description: Item
        charge:
          anyOf:
            - $ref: '#/components/schemas/ChargeSummary-Output'
            - type: 'null'
          description: Charge
        shipment:
          anyOf:
            - $ref: '#/components/schemas/Shipment-Output'
            - type: 'null'
          description: Shipment
        creator:
          anyOf:
            - $ref: '#/components/schemas/UserTiny'
            - type: 'null'
          description: Creator
      type: object
      required:
        - stockId
        - action
        - creatorId
      title: InventoryLog
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StockTiny:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the stock
        name:
          type: string
          title: Name
          description: Name of the stock
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the stock
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Notes about the stock
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Category name (references category.name)
        unit:
          $ref: '#/components/schemas/Unit'
          description: Unit of measurement
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the stock is archived
          default: false
      type: object
      required:
        - name
        - unit
      title: StockTiny
    Item:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the item
        name:
          type: string
          title: Name
          description: Name of the item
        brandName:
          anyOf:
            - type: string
            - type: 'null'
          title: Brandname
          description: Optional brand name of the item
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the item
        price:
          type: integer
          title: Price
          description: Price of the item in cents
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Category name (references category.name)
        unit:
          anyOf:
            - $ref: '#/components/schemas/Unit'
            - type: 'null'
          description: Unit of measurement for the item
        isPhysical:
          type: boolean
          title: Isphysical
          description: Whether the item is physical
          default: true
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the item is archived
          default: false
        internalNotes:
          anyOf:
            - type: string
            - type: 'null'
          title: Internalnotes
          description: Optional internal notes for the item
        taxable:
          type: boolean
          title: Taxable
          description: Whether the item is subject to taxes
          default: false
        sortOrder:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sortorder
          description: Optional sort order for the item
        allowCustomPricing:
          type: boolean
          title: Allowcustompricing
          description: Whether custom pricing is allowed for this item
          default: false
        type:
          $ref: '#/components/schemas/ItemType'
          description: Type of item (PRODUCT, MEDICATION, etc.)
          default: PRODUCT
        stocks:
          anyOf:
            - items:
                $ref: '#/components/schemas/ItemStock'
              type: array
            - type: 'null'
          title: Stocks
          description: Optional linked stocks for the item
      type: object
      required:
        - name
        - price
      title: Item
    ChargeSummary-Output:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: A unique identifier for the charge. Auto-generated if not provided.
        patientId:
          type: string
          title: Patientid
          description: Identifier of the patient being charged.
        patient:
          anyOf:
            - $ref: '#/components/schemas/PatientSummary'
            - type: 'null'
          description: Summary details of the patient being charged.
        total:
          type: integer
          title: Total
          description: Total amount of the charge.
          default: 0
        totalOutstanding:
          type: integer
          title: Totaloutstanding
          description: Total outstanding amount that is yet to be paid.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the charge.
        status:
          $ref: '#/components/schemas/ChargeStatus'
          description: Current status of the charge.
          default: OUTSTANDING
        discountAmount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Discountamount
          description: Any discount applied to the total outstanding.
          default: 0
        discountPercentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Discountpercentage
          description: Percentage of discount applied to the charge.
          default: 0
        externalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalid
          description: External identifier for the charge, if applicable.
        externalCreatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Externalcreateddate
          description: >-
            The creation date of the charge in your external system, if
            applicable.
        ruleSetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Rulesetid
          description: Identifier for the `RuleSet` applied to this `Charge`, if any.
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: The date when the charge was created.
        creatorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorid
          description: >-
            Identifier of the `Provider` who created the charge (i.e. the
            Clinician, or relevant Biller).
        items:
          items:
            $ref: '#/components/schemas/ChargeItem'
          type: array
          title: Items
          description: List of `Items` in the `Charge`.
          default: []
        tips:
          items:
            $ref: '#/components/schemas/TipDetail'
          type: array
          title: Tips
          description: List of `Tips` in the `Charge`.
          default: []
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: Identifier of the `Location` where the charge was created.
        eventId:
          anyOf:
            - type: string
            - type: 'null'
          title: Eventid
          description: Identifier of the `Event` this charge is associated with, if any.
        memberId:
          anyOf:
            - type: string
            - type: 'null'
          title: Memberid
          description: Identifier of the `Member` this charge is associated with, if any.
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
          description: Any additional comments about the charge.
        meta:
          anyOf:
            - type: object
            - type: 'null'
          title: Meta
          description: Any additional metadata about the charge relevant to your system.
        merchantAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchantaccountid
          description: Identifier of the `MerchantAccount` this charge is associated with.
      type: object
      required:
        - patientId
        - totalOutstanding
      title: ChargeSummary
    Shipment-Output:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the shipment
        stockId:
          type: string
          title: Stockid
          description: ID of the stock
        supplierId:
          type: string
          title: Supplierid
          description: ID of the supplier
        locationId:
          type: string
          title: Locationid
          description: ID of the location where the shipment was delivered
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Lotnumber
          description: Optional lot number of the shipment
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
          description: Optional expiry date of the shipment
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
          description: Optional SKU (Stock Keeping Unit)
        quantity:
          type: number
          title: Quantity
          description: Total quantity
        remainingQuantity:
          type: number
          title: Remainingquantity
          description: Remaining quantity
        cost:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cost
          description: Cost of the shipment in cents
        supplier:
          anyOf:
            - $ref: '#/components/schemas/Supplier'
            - type: 'null'
          description: Optional supplier details
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: Date and time the shipment was created
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
          description: Optional note for inventory log when updating shipment
        locationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationname
          description: Get the location name from the related location object
          readOnly: true
      type: object
      required:
        - stockId
        - supplierId
        - locationId
        - quantity
        - remainingQuantity
        - locationName
      title: Shipment
    UserTiny:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier for the user.
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: The user's first name.
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: The user's last name.
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: The user's phone number.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: The user's email address.
        type:
          $ref: '#/components/schemas/UserType'
          description: The type of user.
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: The location of the user.
      type: object
      required:
        - id
        - type
      title: UserTiny
    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
    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
    ItemType:
      type: string
      enum:
        - ITEM
        - PRODUCT
        - MEDICATION
        - SERVICE
        - PACKAGE
        - MEMBERSHIP
      title: ItemType
    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
    PatientSummary:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier for the user.
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: The user's first name.
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: The user's last name.
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: The user's phone number.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: The user's email address.
        type:
          $ref: '#/components/schemas/UserType'
          description: The type of user.
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: The location of the user.
        externalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalid
          description: The user's external identifier if available.
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: The user's primary address.
        addressLineTwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Addresslinetwo
          description: Additional address information.
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: The city of the user's address.
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: The state of the user's address.
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: The postal code of the user's address.
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: The country of the user's address.
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: The date and time when the user was created.
        addressValid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Addressvalid
          description: Whether the user's address is valid.
        meta:
          anyOf:
            - type: object
            - type: 'null'
          title: Meta
          description: Any additional metadata about the user relevant to your system.
        isArchived:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isarchived
          description: Whether the user is archived.
        primaryLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarylocationid
          description: The primary location of the user.
        gender:
          anyOf:
            - type: string
            - type: 'null'
          title: Gender
          description: The gender of the patient.
        dateOfBirth:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dateofbirth
          description: The date of birth of the patient.
        patientMedications:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Patientmedications
          description: List of patient's self-reported medications.
        onSchedulingBlacklist:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Onschedulingblacklist
          description: Whether the patient is on the scheduling blacklist.
        surchargeDisabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Surchargedisabled
          description: Whether surcharges are disabled for this patient.
        tags:
          anyOf:
            - items:
                $ref: '#/components/schemas/PatientTagSummary'
              type: array
            - type: 'null'
          title: Tags
          description: List of patient tags
        creditBalance:
          anyOf:
            - type: integer
            - type: 'null'
          title: Creditbalance
          description: Patient's credit balance in cents.
        preferredProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Preferredproviderid
          description: The preferred provider ID for this patient.
      type: object
      required:
        - id
        - type
        - createdDate
      title: PatientSummary
    ChargeStatus:
      type: string
      enum:
        - OUTSTANDING
        - PAID
        - EXTERNAL_SETTLEMENT
        - VOID
        - WRITE_OFF
        - REFUNDED
        - CHARGEBACK
        - PAYMENT_PLAN
        - COLLECTIONS
      title: ChargeStatus
    ChargeItem:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the charge item
        itemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Itemid
          description: Optional unique identifier for the item
        chargeId:
          type: string
          title: Chargeid
          description: Identifier of the charge this item is associated with
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Name of the item (None for items with associated inventory item)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the item
        quantity:
          type: integer
          title: Quantity
          description: Quantity of the item being charged
        discountAmount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Discountamount
          description: Discount amount for the item
        discountPercentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Discountpercentage
          description: Discount percentage for the item
        discountReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Discountreason
          description: Reason for discount
        price:
          type: integer
          title: Price
          description: Price of the item in cents
        soldPackageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Soldpackageid
          description: Unique identifier for the sold package usage
        bankedQuantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Bankedquantity
          description: Quantity to bank for later use
        bankedItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankeditemid
          description: ID of banked item being used (for tracking usage)
        issuedDiscountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Issueddiscountid
          description: Unique identifier for the specific issued discount instance used
        soldByProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Soldbyproviderid
          description: Unique identifier for the provider who sold the item
        taxAmount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Taxamount
          description: Tax amount for the item in cents
        pricingId:
          anyOf:
            - type: string
            - type: 'null'
          title: Pricingid
          description: Unique identifier for the pricing for the item
        shipmentIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Shipmentids
          description: Optional list of shipment IDs to reduce the stock quantity of
      type: object
      required:
        - chargeId
        - quantity
        - price
      title: ChargeItem
    TipDetail:
      properties:
        chargeId:
          type: string
          title: Chargeid
          description: Charge ID this tip belongs to
        amount:
          type: integer
          title: Amount
          description: Tip amount in cents
        providerId:
          type: string
          title: Providerid
          description: Provider ID receiving the tip
        id:
          type: string
          title: Id
          description: Unique identifier for the tip
        provider:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
          description: Provider receiving the tip
      type: object
      required:
        - chargeId
        - amount
        - providerId
      title: TipDetail
    Supplier:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the supplier
        name:
          type: string
          title: Name
          description: Name of the supplier
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the supplier
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Optional website of the supplier
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Optional email of the supplier
        preferredContactMethod:
          anyOf:
            - type: string
            - type: 'null'
          title: Preferredcontactmethod
          description: Optional preferred contact method
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: Optional phone number of the supplier
        addressLineOne:
          anyOf:
            - type: string
            - type: 'null'
          title: Addresslineone
          description: Optional first line of address
        addressLineTwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Addresslinetwo
          description: Optional second line of address
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: Optional city
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: Optional state or province
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: Optional ZIP or postal code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Optional country
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the supplier is archived
          default: false
      type: object
      required:
        - name
      title: Supplier
    UserType:
      type: string
      enum:
        - PROVIDER
        - PATIENT
        - ASSISTANT
      title: UserType
    PatientTagSummary:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the patient tag
        name:
          type: string
          title: Name
          description: Name of the patient tag
        emoji:
          anyOf:
            - type: string
            - type: 'null'
          title: Emoji
          description: Emoji associated with the tag
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
          description: Color code for the tag (hex format)
        isActive:
          type: boolean
          title: Isactive
          description: Whether the tag is active
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: Date and time when the tag was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: Date and time when the tag was last updated
      type: object
      required:
        - id
        - name
        - isActive
        - createdDate
      title: PatientTagSummary
    ProviderTiny:
      properties:
        id:
          type: string
          title: Id
        firstName:
          type: string
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
      type: object
      required:
        - id
        - firstName
      title: ProviderTiny

````