# Sales Layer DAM REST API

The Sales Layer DAM REST API lets external systems work with image assets managed by Sales Layer.

Use this reference when you need to list and filter images, import new images from public URLs, update asset metadata, or remove assets that are no longer required by your catalog workflows.

DAM operations are designed for integrations that keep media libraries, product imagery, commerce platforms, supplier portals, and other business systems aligned with Sales Layer. For implementation guidance, review the authentication, pagination, rate limiting, and error handling guides before calling the endpoints below.


Version: 2.0.0

## Servers

Sales Layer DAM API
```
https://api2.saleslayer.com/dam
```

## Download OpenAPI description

[Sales Layer DAM REST API](https://docs.api.saleslayer.com/_bundle/apis/dam-v2.0.yaml)

## Image

### Filter Image entities using OData query parameters.

 - [GET /image](https://docs.api.saleslayer.com/apis/dam-v2.0/image/paths/~1image/get.md): ## Authentication
            
Requires a valid API key in the X-API-KEY header.
            
## OData Query Support
            
### $filter (Filtering)
            
Comparison Operators:
- eq - Equals: fileType eq 'jpg'
- ne - Not equals: fileType ne 'jpg'
- gt - Greater than: numLinks gt 5
- ge - Greater than or equal: numLinks ge 5
- lt - Less than: numLinks lt 10
- le - Less than or equal: numLinks le 10
            
Logical Operators:
- and - Logical AND: fileType eq 'jpg' and status eq 'Ok'
- or - Logical OR: fileType eq 'jpg' or fileType eq 'png'
- not - Logical NOT: not (fileType eq 'jpg')
            
String Functions:
- contains(property, 'value') - Contains substring: contains(reference, 'image')
- startswith(property, 'value') - Starts with: startswith(reference, 'img')
- endswith(property, 'value') - Ends with: endswith(reference, '.jpg')
            
Special Operators:
- in - Value in list: fileType in ('jpg', 'png', 'gif')
            
### $orderby (Sorting)
            
Supported fields for ordering:
- id - Image ID
- reference - Image reference/filename
- numLinks - Number of entities image is linked to
- status - Image status (see valid values below)
- modifiedOn - Last modification date
- fileType - File type/extension
- createdOn - Creation date
            
NOT supported for ordering: tags, width, height, url, sizeInBytes
            
### Status Field Values
            
The status field can have the following values:
- Vd - Void (image hasn't started processing yet)
- Up - Updating (image is being uploaded/updated)
- Ok - Processed correctly (image is ready to use)
- Re - Reprocessing (image is being reprocessed)
- Er - Error (image processing failed)
- Dv - (Not currently used)
            
Examples:
- Ascending: $orderby=fileType asc
- Descending: $orderby=createdOn desc
            
### $top and $skip (Pagination)
            
- $top: Maximum number of records to return
  - Default: 100
  - Maximum allowed: 100
  - Minimum: 1
- $skip: Number of records to skip
  - Default: 0
  - Minimum: 0
            
## Examples
            
Filter by file type:

GET /image$filter=fileType eq 'jpg'

            
Filter by status (only processed images):

GET /image$filter=status eq 'Ok'

            
Filter with AND operator:

GET /image$filter=fileType eq 'png' and status eq 'Ok'

            
Filter with OR operator:

GET /image$filter=fileType eq 'jpg' or fileType eq 'gif'

            
Filter using IN operator (multiple status values):

GET /image$filter=status in ('Ok', 'Re')

            
Filter using string functions:

GET /image$filter=contains(reference, 'product')

            
Sorting:

GET /image$orderby=createdOn desc

            
Pagination:

GET /image$skip=10&$top=20

            
Combined (filter + sort + pagination):

GET /image$filter=fileType ne 'gif'&$orderby=numLinks desc&$skip=0&$top=50

            
## Error Responses
            
- 400 Bad Request: Invalid filter syntax, unsupported field for ordering, invalid pagination parameters, or invalid API key
- 401 Unauthorized: Missing API key

### Delete an Image entity.

 - [DELETE /image/{id}](https://docs.api.saleslayer.com/apis/dam-v2.0/image/paths/~1image~1%7Bid%7D/delete.md): ## Notes
            
- If the image is currently being processed, returns 409 Conflict.

