API Playground

Reorder or prune an entity's pictures. This playground calls the live API and will modify your data.

Authentication Required

You need to Login to test the API playground

Reorder media

Reorder — and optionally prune — the pictures of an entity.

Provide the full, ordered list of picture URLs. The list defines both the new order and the desired set: any current picture whose URL is not in the list is removed. Rich-object metadata (storage key, dimensions, …) is preserved for every matched entry. URLs that do not belong to the entity are ignored.

Endpoint URL
PATCH https://api.commerceclarity.com/api/2026-05/entities/{entity_id}/media/reorder

Path Parameters

ParameterTypeRequiredDescription
entity_idstringRequiredThe _id of the target entity.

Body parameters

ParameterTypeRequiredDescription
norm_namestringRequiredMedia field. Currently only pictures.
urlsarrayRequiredFull ordered list of picture URLs to keep. Omitted URLs are removed.

Request Examples

curl -X PATCH "https://api.commerceclarity.com/api/2026-05/entities/507f1f77bcf86cd799439011/media/reorder" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "norm_name": "pictures",
    "urls": [
      "https://media.commerceclarity.com/.../b.jpg",
      "https://media.commerceclarity.com/.../a.jpg"
    ]
  }'

Response Example

Success Response
{
  "status": "success",
  "pictures": [
    "https://media.commerceclarity.com/.../b.jpg",
    "https://media.commerceclarity.com/.../a.jpg"
  ]
}