Method
PATCH /v1/products/:id/media/order
Path Parameters
Product ID.
Body Parameters
Item shape
Headers
Bearer token (requires
products:write).application/jsoncurl -X PATCH "https://api.voyantcloud.com/v1/products/prod_123/media/order" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"items": [
{ "mediaId": "media_01J0E6V4ZBAVQ9PQJRT2P27QX0", "sort": 0 },
{ "mediaId": "media_01J0E6V4ZBAVQ9PQJRTR6K9HQC", "sort": 1 }
]
}'
{
"data": {
"updated": 2,
"attempted": 2,
"details": [
{
"mediaId": "media_01J0E6V4ZBAVQ9PQJRTR6K9HQC",
"previousSort": 1,
"newSort": 0
}
]
}
}
Bulk reorder product media items.
PATCH /v1/products/:id/media/order
products:write).application/jsoncurl -X PATCH "https://api.voyantcloud.com/v1/products/prod_123/media/order" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"items": [
{ "mediaId": "media_01J0E6V4ZBAVQ9PQJRT2P27QX0", "sort": 0 },
{ "mediaId": "media_01J0E6V4ZBAVQ9PQJRTR6K9HQC", "sort": 1 }
]
}'
{
"data": {
"updated": 2,
"attempted": 2,
"details": [
{
"mediaId": "media_01J0E6V4ZBAVQ9PQJRTR6K9HQC",
"previousSort": 1,
"newSort": 0
}
]
}
}
mediaOrderUpdateSchema requires at least one item; mixed mediaId and assetId entries are allowed to support pre-save ordering flows.