Skip to main content
PUT
Node.js

Authorizations

Authorization
string
header
required

A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...

Headers

Idempotency-Key
string

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

storeId
string
required

The store's ID. A key reaches the store it was made in: GET /key answers which.

expenseId
string
required

The expense.

Body

application/json
spentOn
string
required

The day it was paid, as YYYY-MM-DD. Not in the future: a bill still to come is a recurring expense.

Example:

"2026-10-01"

payee
string
required

Who was paid, up to 120 characters.

Example:

"Hetzner"

amount
number
required

How much, above zero, with at most 2 decimals.

Example:

12.5

currency
string

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.

Example:

"EUR"

method
enum<string>

How it was paid.

Available options:
card,
bank,
crypto,
paypal,
cash,
other
categoryId
string

The expense category it is filed in, by ID.

category
string

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.

Example:

"Hosting"

note
string

A note, up to 255 characters.

reference
string

An invoice number or the like, up to 160 characters.

productId
string

A product this expense is a cost of.

Response

It worked.

success
boolean
message
unknown
code
unknown
data
object