Update an expense
Changes an expense. A field left out stays as it is. Refused with business_details_required until the store has its business details.
Needs the expenses.write permission (Change Expenses).
Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The expense.
Body
The day it was paid, as YYYY-MM-DD. Not in the future: a bill still to come is a recurring expense.
"2026-10-01"
Who was paid, up to 120 characters.
"Hetzner"
How much, above zero, with at most 2 decimals.
12.5
The currency amount is in, when it is not the store's own. It is converted at today's rate and kept in the store's currency.
"EUR"
How it was paid.
card, bank, crypto, paypal, cash, other The expense category it is filed in, by ID.
The same, by the category's name, for a script that has no reason to know an ID. With neither, the store's rules file it.
"Hosting"
A note, up to 255 characters.
An invoice number or the like, up to 160 characters.
A product this expense is a cost of.

