# Images

## Filter Images

 - [GET /images](https://docs.api.saleslayer.com/apis/dam-v2.0/images/paths/~1images/get.md): Returns a paginated collection of the tenant's images, filtered and sorted using OData query options ($filter, $orderby, $top, $skip).
            
## Authentication
            
Requires a valid API key in the X-API-KEY header.
            
## Status field values
            
- Vd - Void (not yet started processing)
- Up - Updating (being uploaded/updated)
- Ok - Processed correctly (ready to use)
- Re - Reprocessing
- Er - Error (processing failed)
            
## Examples
            

GET /images?$filter=fileType eq 'jpg'
GET /images?$filter=status eq 'Ok'
GET /images?$filter=fileType eq 'png' and status eq 'Ok'
GET /images?$filter=status in ('Ok', 'Re')
GET /images?$filter=contains(reference, 'product')
GET /images?$orderby=createdOn desc
GET /images?$filter=fileType ne 'gif'&$orderby=numLinks desc&$skip=0&$top=50

            
## Error Responses
            
- 400 Bad Request: Invalid filter syntax, unsupported orderby field, invalid pagination parameters, or invalid API key
- 401 Unauthorized: Missing API key

## Get Image

 - [GET /images({reference})](https://docs.api.saleslayer.com/apis/dam-v2.0/images/paths/~1images(%7Breference%7D)/get.md): In DAM, images are identified by their filename (reference), which is unique per tenant.
Use this endpoint to retrieve a specific image when you already know its filename.
            
## Authentication
            
Requires a valid API key in the X-API-KEY header.
            
## Example
            

GET /images(product-main-front.jpg)
X-API-KEY: your-api-key-here

            
## Response (200 OK)
            
json
{
  "id": 42,
  "reference": "product-main-front.jpg",
  "numLinks": 3,
  "status": "Ok",
  "modifiedOn": "2024-04-05T08:44:33",
  "fileType": "png",
  "createdOn": "2024-04-05T08:44:33",
  "tags": ["animales", "mascotas"],
  "originalUrl": "https://cdn.example.com/product-main-front.jpg",
  "thumbnailUrl": "https://cdn.example.com/perrito-simpatico_TH.png",
  "thumbnailMediumUrl": "https://cdn.example.com/perrito-simpatico_THM.png",
  "thumbnailPreviewUrl": "https://cdn.example.com/perrito-simpatico_THP.png",
  "width": 800,
  "height": 600,
  "sizeInBytes": 102400
}

            
## Error Responses
            
- 400 Bad Request: Invalid API key
- 401 Unauthorized: Missing API key
- 404 Not Found: No image with the given reference exists for this tenant

## Delete Image

 - [DELETE /images({reference})](https://docs.api.saleslayer.com/apis/dam-v2.0/images/paths/~1images(%7Breference%7D)/delete.md): Deletes an image by its filename (reference), which is unique per tenant.
            
## Authentication
            
Requires a valid API key in the X-API-KEY header.
            
## Example
            

DELETE /images(product-main-front.jpg)
X-API-KEY: your-api-key-here

            
## Error Responses
            
- 400 Bad Request: Invalid API key
- 401 Unauthorized: Missing API key
- 404 Not Found: No image with the given reference exists for this tenant
- 409 Conflict: Image is currently being processed and cannot be deleted

