Logged in is not the same as allowed
Eve, from another company, is a legitimate user. She opens her invoice at /invoices/1042, changes the number to 1043 — and sees an invoice belonging to Acme.
The API checked that she was logged in, never that this invoice was hers. This is broken object-level authorization — the most common API security flaw.
Watch out
Hiding a button in the UI is not authorization. Attackers call your API directly, with any id they like.