Lewati ke konten

List products with nested variants & units (tree view)

GET
/api/dash/{orgId}/products
curl --request GET \
--url 'https://api.medivy.id/api/dash/example/products?page=1&size=20&isActive=true&isConsignment=true&hasConsignmentStock=true&ingredientsReview=true&sort=createdAt&order=asc' \
--header 'x-api-key: <x-api-key>'
orgId
required
string

Your organization ID. The API key must belong to this organization.

page
number | null
default: 1
size
number | null
default: 20
search
string
category
string
isActive
string
Allowed values: true false
isConsignment

Deprecated alias of hasConsignmentStock (MP-111)

string
Allowed values: true false

Deprecated alias of hasConsignmentStock (MP-111)

hasConsignmentStock

MP-111 — has a live consignment batch (within the caller’s outlets)

string
Allowed values: true false

MP-111 — has a live consignment batch (within the caller’s outlets)

drugClass

Comma-separated drug classifications; “none” = not set

string

Comma-separated drug classifications; “none” = not set

ingredientsReview

MP-112 — has an active-ingredient row flagged needsReview

string
Allowed values: true false

MP-112 — has an active-ingredient row flagged needsReview

createdFrom
string
/^\d{4}-\d{2}-\d{2}$/
createdTo
string
/^\d{4}-\d{2}-\d{2}$/
updatedFrom
string
/^\d{4}-\d{2}-\d{2}$/
updatedTo
string
/^\d{4}-\d{2}-\d{2}$/
sort
string
Allowed values: createdAt name
order
string
Allowed values: asc desc

OK

Media typeapplication/json

Example generated

example

Missing, 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
}