Schedule a sale window for a catalogue item
POST/item-prices/:catalogItemId/sales
ScheduleSale. A sale price is always below the list price and windows of one item never overlap; a window ends after it starts, ends in the future, and an item holds at most 50 live windows (else 422 validation-failed). PublishEffectivePriceOnWindowBoundary emits ItemPriceChanged when the sale starts or ends.
Request
Responses
- 201
- 400
- 404
- 409
- 422
The scheduled sale window.
Response Headers
"true" when this response is the stored answer of an earlier request carrying the same Idempotency-Key (the handler did not run again). Absent on the first execution.
idempotency-key-required (header missing), idempotency-key-invalid (not 1-128 printable ASCII characters) or malformed-request (bad JSON, an unknown field, a wrong type, an empty body, trailing data, a body over 64 KiB or a NUL character in the body or query string).
not-found (the resource does not exist, or an unknown sale) or resource-not-found (a path identifier that is empty, over 128 characters or carries a NUL).
overlapping-sale-window (ErrOverlappingSaleWindow), illegal-transition (price WITHDRAWN), concurrent-update or idempotency-key-reused.
validation-failed, negative-amount (ErrNegativeAmount), currency-mismatch (ErrCurrencyMismatch), sale-not-below-list (ErrSaleNotBelowList) or unknown-catalog-item (ErrUnknownCatalogItem).