send_invoices
PostgREST stored procedure — POST /rest/v1/rpc/send_invoices.
These are SECURITY DEFINER functions granted only to the service role (execute is revoked from anon/authenticated). They bypass table RLS and enforce their own company_id and status checks internally, so call them server-side with the service-role key:
const { data, error } = await supabase.rpc('send_invoices', { p_acknowledge_unapproved, p_actor, p_company_id, p_invoice_ids });
Arguments
| Argument | Type | Required |
|---|---|---|
p_acknowledge_unapproved | boolean | no |
p_actor | uuid | yes |
p_company_id | uuid | yes |
p_invoice_ids | uuid[] | yes |
Generated from
specs/supabase.json. The function's behaviour is defined by its SQL migration; this page documents its call signature only.