orderWeight of one or more media within a gallery. Only media that should change their order need to be included — all other media retain their existing order weight. The gallery must belong to a spot the authenticated user is authorized to edit.
| Name | Required | Type | Info |
|---|---|---|---|
data[][id] |
true | INTEGER | The id of the medium to update. |
data[][attributes][orderWeight] |
true | FLOAT | The new order weight for the medium. Lower values appear first. Values do not have to be contiguous — e.g. 1, 2, 3 or 0.5, 1.5 are both valid. |
curl -X POST "https://www.spotteron.com/api/v2.4/galleries/7/media/order" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"data": [
{ "id": 12, "attributes": { "orderWeight": 1 } },
{ "id": 15, "attributes": { "orderWeight": 2 } },
{ "id": 13, "attributes": { "orderWeight": 3 } }
]
}'
Returns an empty success response.