Reorder playlist items
reorder_playlist_itemsReorder a playlist's items in one call by providing the full list of item IDs in the desired final sequence. Use for promoting, demoting, or applying a computed order.
Instructions
Set the playback order of a playlist's items in one call.
When to use:
The user wants to promote/demote a few items, or apply a freshly-computed order.
When NOT to use:
You only want to move one item by one position — same call still works, but reading + emitting the full list is the cost.
What to know:
item_ids MUST contain every current item of the playlist, in the desired final order.
A missing or extra id returns 422 with reorder_mismatch.
Server uses a two-phase update (negative offset then final) to avoid UNIQUE(parent_id, sort_order) conflicts mid-flight.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_ids | Yes | All current item ids of the playlist, in the desired final order | |
| playlist_id | Yes |