On this page6 sections
POST/api/invoices/get-random-productInvoicesPermission: invoice.create
Get Random Product for Quick Entry
Picks one random active product (with valid stock in tracked scenarios) within the authorized outlet for rapid POS invoice entry.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Outlet Scope Enforcement: Results and mutations are automatically scoped to the actor's accessible outlets when the
invoicemodule restriction applies.
Request
Provide the following fields in the request payload.
categorystringoptional
Optional category name filter when picking a random item.
outletIdstring (uuid)required
Outlet UUID for scoped inventory and product selection.
Responses
Select a status code to inspect schema.
OK — Random product returned (or null if none eligible).application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/invoices/get-random-product
curl -X POST "https://api.invoger.com/api/invoices/get-random-product" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "outletId": "o1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c", "category": "Beverages" }'Interactive playground
Response
application/json
{
"success": true,
"message": "Success",
"data": {
"product": null
}
}