Skip to main content
GET
/
inventory
/
stocks
/
{id}
/
stats
Get Stock Stats
curl --request GET \
  --url https://api.decodahealth.com/inventory/stocks/{id}/stats \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
{
  "stockId": "<string>",
  "remainingQuantity": 123,
  "totalValue": 123,
  "dailyUsage": [
    123
  ],
  "dailyReceived": [
    123
  ]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

id
string
required

Query Parameters

start_date
string<date-time> | null

Start date for daily stats (ISO format with timezone offset)

end_date
string<date-time> | null

End date for daily stats (ISO format with timezone offset)

Response

Successful Response

stockId
string
required

ID of the stock

remainingQuantity
number
required

Current remaining quantity of stock

totalValue
integer
required

Total value of current remaining stock in cents

dailyUsage
number[]

Daily usage (oldest first)

dailyReceived
number[]

Daily received (oldest first)