List stock batches (lots)
GET
/api/dash/{orgId}/outlets/{outletId}/stock/batches
const url = 'https://api.medivy.id/api/dash/example/outlets/example/stock/batches?page=1&size=20&expiry=expired&groupBy=product&sort=expiryDate&order=asc';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.medivy.id/api/dash/example/outlets/example/stock/batches?page=1&size=20&expiry=expired&groupBy=product&sort=expiryDate&order=asc' \ --header 'x-api-key: <x-api-key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”orgId
required
string
Your organization ID. The API key must belong to this organization.
outletId
required
string
Outlet ID. The key’s user must be assigned to this outlet.
Query Parameters
Section titled “Query Parameters”page
number | null
size
number | null
search
string
variantId
string
outletId
string
status
string
expiringWithinDays
number | null
expiry
string
groupBy
string
sort
string
order
string
Responses
Section titled “Responses”OK
Media typeapplication/json
Example generated
exampleMissing, invalid, disabled or expired API key.
Media typeapplication/json
object
ok
message
string
Example
{ "ok": false}The key belongs to another organization, the request came from an IP outside the key’s allowlist, or the key’s user lacks the permission.
Media typeapplication/json
object
ok
message
string
Example
{ "ok": false}Too many requests from this organization.
Media typeapplication/json
object
ok
message
string
Example
{ "ok": false}