Skip to main content
GET
/
inventory
/
logs
/
{stock_id}
Get Inventory Logs
curl --request GET \
  --url https://api.decodahealth.com/inventory/logs/{stock_id} \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
[
  {
    "stockId": "<string>",
    "action": "STOCK_CREATED",
    "creatorId": "<string>",
    "id": "<string>",
    "itemId": "<string>",
    "quantity": 123,
    "chargeId": "<string>",
    "createdDate": "2023-11-07T05:31:56Z",
    "shipmentId": "<string>",
    "note": "<string>",
    "stock": {
      "name": "<string>",
      "unit": "AMPOULES",
      "id": "<string>",
      "description": "<string>",
      "notes": "<string>",
      "category": "<string>",
      "isArchived": false
    },
    "item": {
      "name": "<string>",
      "price": 123,
      "id": "<string>",
      "brandName": "<string>",
      "description": "<string>",
      "category": "<string>",
      "unit": "AMPOULES",
      "isPhysical": true,
      "isArchived": false,
      "internalNotes": "<string>",
      "taxable": false,
      "sortOrder": 123,
      "allowCustomPricing": false,
      "type": "PRODUCT",
      "stocks": [
        {
          "itemId": "<string>",
          "stockId": "<string>",
          "quantityUsed": 123
        }
      ]
    },
    "charge": {
      "patientId": "<string>",
      "totalOutstanding": 123,
      "id": "<string>",
      "patient": {
        "id": "<string>",
        "type": "PROVIDER",
        "createdDate": "2023-11-07T05:31:56Z",
        "firstName": "<string>",
        "lastName": "<string>",
        "phoneNumber": "<string>",
        "email": "<string>",
        "locationId": "<string>",
        "externalId": "<string>",
        "address": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>",
        "country": "<string>",
        "addressValid": true,
        "meta": {},
        "isArchived": true,
        "primaryLocationId": "<string>",
        "gender": "<string>",
        "dateOfBirth": "2023-12-25",
        "patientMedications": [
          "<string>"
        ],
        "onSchedulingBlacklist": true,
        "surchargeDisabled": true,
        "tags": [
          {
            "id": "<string>",
            "name": "<string>",
            "isActive": true,
            "createdDate": "2023-11-07T05:31:56Z",
            "emoji": "<string>",
            "color": "<string>",
            "updatedDate": "2023-11-07T05:31:56Z"
          }
        ],
        "creditBalance": 123,
        "preferredProviderId": "<string>"
      },
      "total": 0,
      "description": "<string>",
      "status": "OUTSTANDING",
      "discountAmount": 0,
      "discountPercentage": 0,
      "externalId": "<string>",
      "externalCreatedDate": "2023-11-07T05:31:56Z",
      "ruleSetId": "<string>",
      "createdDate": "2023-11-07T05:31:56Z",
      "creatorId": "<string>",
      "items": [],
      "tips": [],
      "locationId": "<string>",
      "eventId": "<string>",
      "memberId": "<string>",
      "comment": "<string>",
      "meta": {},
      "merchantAccountId": "<string>"
    },
    "shipment": {
      "stockId": "<string>",
      "supplierId": "<string>",
      "locationId": "<string>",
      "quantity": 123,
      "remainingQuantity": 123,
      "locationName": "<string>",
      "id": "<string>",
      "lotNumber": "<string>",
      "expiryDate": "2023-11-07T05:31:56Z",
      "sku": "<string>",
      "cost": 123,
      "supplier": {
        "name": "<string>",
        "id": "<string>",
        "description": "<string>",
        "website": "<string>",
        "email": "<string>",
        "preferredContactMethod": "<string>",
        "phoneNumber": "<string>",
        "addressLineOne": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>",
        "country": "<string>",
        "isArchived": false
      },
      "createdDate": "2023-11-07T05:31:56Z",
      "note": "<string>"
    },
    "creator": {
      "id": "<string>",
      "type": "PROVIDER",
      "firstName": "<string>",
      "lastName": "<string>",
      "phoneNumber": "<string>",
      "email": "<string>",
      "locationId": "<string>"
    }
  }
]

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

stock_id
string
required

Query Parameters

action_types
enum<string>[] | null
Available options:
STOCK_CREATED,
STOCK_UPDATED,
STOCK_ARCHIVED,
DRAWDOWN,
RESTORED,
SHIPMENT_RECEIVED,
SHIPMENT_UPDATED,
SHIPMENT_ARCHIVED,
ITEM_LINKED,
ITEM_UNLINKED

Response

Successful Response

stockId
string
required

ID of the stock

action
enum<string>
required

Action performed on the stock

Available options:
STOCK_CREATED,
STOCK_UPDATED,
STOCK_ARCHIVED,
DRAWDOWN,
RESTORED,
SHIPMENT_RECEIVED,
SHIPMENT_UPDATED,
SHIPMENT_ARCHIVED,
ITEM_LINKED,
ITEM_UNLINKED
creatorId
string
required

ID of the creator

id
string

Unique identifier for the inventory log

itemId
string | null

ID of the item

quantity
number | null

Quantity of the stock

chargeId
string | null

ID of the charge

createdDate
string<date-time> | null

Date and time the log was created

shipmentId
string | null

ID of the shipment

note
string | null

Optional note about the inventory action

stock
StockTiny · object

Stock

item
Item · object

Item

charge
ChargeSummary · object

Charge

shipment
Shipment · object

Shipment

creator
UserTiny · object

Creator