Update a sale
Saves the sale whole: send every field as it should be, not only what changed.
Needs the sales.write permission (Change Sales).
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 sale.
Query Parameters
The time zone startsAt and endsAt are read in when they name none, as an IANA name. Left out, UTC.
"Europe/Berlin"
Body
What the sale is called, up to 60 characters. Buyers see it on the storefront's countdown.
"Autumn sale"
How much comes off: above 0 and up to 100 for percent, an amount with at most 2 decimals for fixed.
20
When it starts, as a date and time.
"2026-11-27T00:00:00Z"
When it ends, as a date and time. After startsAt, and not already past.
"2026-11-30T23:59:00Z"
A share of each price, or an amount in the store's currency.
percent, fixed Every product, or only the ones in targets.
all, some The products on sale when appliesTo is some. Each names a product, and optionally one variant of it.
What coupons do while the sale runs. rest: a coupon counts only the items in the cart that are not on sale. all: coupons work on sale items too. none: no coupon works anywhere in the store.
rest, all, none Up to 100 coupons or coupon categories that couponRule is turned around for.
Whether the sale runs when its time comes.
Whether the storefront shows the sale's countdown bar.
Response
It worked.
Whether the request did what was asked.
Words for a person. Empty when it worked.
Why it was refused, as a word that does not change. Empty when it worked.
The thing asked for: an object, or for a list its rows.
For a paged list: how many pages there are.
For a paged list: how many rows there are in all.
Anything else the route answers beside the thing itself.

