Upload images to an entity. This playground calls the live API and will modify your data.
Upload one or more images to an entity.
Images are sent as multipart/form-data. Each file is resized to a maximum of 1600×1600, re-encoded as JPEG (quality 90), uploaded to cloud storage and appended to the entity's pictures. The response returns the URLs of the newly uploaded files. Use the reorder endpoint to change order or remove pictures.
POST https://api.commerceclarity.com/api/2026-05/entities/{entity_id}/media| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | Required | The _id of the target entity. |
| Parameter | Type | Required | Description |
|---|---|---|---|
norm_name | string | Required | Media field. Currently only pictures is supported. |
files[] | file[] | Required | Image blobs (jpeg, png, gif, webp). Max 20 files × 20 MB. |
curl -X POST "https://api.commerceclarity.com/api/2026-05/entities/507f1f77bcf86cd799439011/media" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "norm_name=pictures" \
-F "files[]=@/path/to/image1.jpg" \
-F "files[]=@/path/to/image2.png"
{
"status": "success",
"pictures": [
"https://media.commerceclarity.com/media/.../a1b2c3.jpg",
"https://media.commerceclarity.com/media/.../d4e5f6.jpg"
]
}{
"status": "error",
"message": "The files.0 must be a file of type: jpeg, jpg, png, gif, webp."
}