Skip to navigation

Reorder product photos

Requires products:update. Include every current photo ID exactly once in the desired order. Missing, duplicate, or foreign photo IDs return 422 and leave the collection unchanged. The server assigns contiguous positions starting at zero, updates the parent product updatedAt, and returns the reordered array.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
productIdstringRequiredformat: "uuid"
photoIdslist of stringsRequired
Every current photo ID for this product, exactly once, in the desired order.

Response

Product photos in the requested order.
idstringOptionalformat: "uuid"
productIdstringOptionalformat: "uuid"
ID of the product that owns the image.
fileUrlstring or nullOptionalformat: "uri"
positionintegerOptional
createdAtdatetimeOptional
updatedAtdatetimeOptional
descriptionstring or nullOptional

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error