Relaunch Sku
POST/api/skus/relaunch/:id
Tier: Public — stable, supported for third-party integration.
Admin-only: re-launches a Discontinued SKU back to Draft. This is the
only path that reaches Discontinued → Draft
(every other code path calls SkuMaster.TryTransition(...) with isAdmin: false,
which this transition always fails under).
The authorize attribute here uses the (DataAccessMode, params LocafiModule[])
overload with a single module — [LocafiCrudAuthorize(DataAccessMode.Update, LocafiModule.Administration)]
requires only LocafiModule.Administration Update, not
LocafiModule.Sku Update. Administration Update is this API's general
admin-permission marker.
Request
Responses
- 200
- 400
- 401
- 403
Returns the updated Skus.SkuDetailDto with LifecycleState now Draft.
The SKU is in a state other than Discontinued (the state machine only allows Discontinued → Draft, with an InvalidOperation error), or {id} does not match an existing SKU (NotFound).
The caller is not authenticated.
The caller lacks Administration Update permission.