Product Images — Reorder
Reorders the existing images of a product.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/products/{productId}/images/reorder | PUT |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
order | array of { id, position } | yes | Each id must belong to {productId}. |
Response
200 OK — returns the full updated list of images, ordered by position.
| Field | Type | Notes |
|---|---|---|
success | bool | |
message | string | |
images | array | One row per image — id, productId, path, position, url. |
Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid admin Bearer token. |
403 Forbidden | Admin role lacks catalog.products.edit. |
422 Unprocessable Entity | Image ID doesn't belong to the product, or order is malformed. |

