Skip to content

Recipes

Use these recipes as starting points for common Sales Layer REST API workflows.

Read only the catalog fields you need

Use $select to reduce payload size for catalog exports and synchronization jobs.

curl -X GET 'https://api2.saleslayer.com/catalog/Products?$select=prod_ref,prod_title' \
  -H 'X-API-KEY: YOUR_API_KEY'

Select only the fields required by the downstream system. This makes integrations faster and easier to troubleshoot.

Related pages:

Filter before processing

Use $filter to narrow results before they reach your integration.

curl -X GET 'https://api2.saleslayer.com/catalog/Products?$filter=contains(prod_title,%27shoe%27)' \
  -H 'X-API-KEY: YOUR_API_KEY'

Filtering at the API level is usually more efficient than retrieving a broad dataset and filtering it client-side.

Related pages:

Synchronize large datasets

For list operations, process results in pages and store progress between runs.

Use token-based pagination with $skipToken when a Catalog endpoint supports it and returns continuation links. Use $top and $skip for DAM and offset-style endpoints.

curl -X GET 'https://api2.saleslayer.com/dam/images?$top=100&$skip=0' \
  -H 'X-API-KEY: YOUR_API_KEY'

Keep the page state, retry count, endpoint, status code, and request timing in integration logs.

Related pages:

Read recently modified DAM assets

Filter images or files using a UTC timestamp with a Z suffix:

curl --get 'https://api2.saleslayer.com/dam/images' \
  --data-urlencode '$filter=modifiedOn gt 2026-10-01T08:00:00Z' \
  --data-urlencode '$orderby=modifiedOn asc' \
  --data-urlencode '$top=100' \
  -H 'X-API-KEY: YOUR_API_KEY'

Use /dam/files for non-image assets. Paginate the filtered result and retain UTC checkpoints. Review the DAM overview for the Beta contract and filename limits when creating assets.

Detect catalog changes

Use Catalog changelog endpoints when an integration needs to identify changes since a previous synchronization.

Recommended pattern:

  • Read the relevant changelog endpoint.
  • Store the last processed checkpoint in your integration.
  • Fetch changed resources by identifier when the integration needs full records.
  • Apply bounded retries for temporary failures.

Catalog date and date-time values, date filters, and date sorting use UTC instants. Changelog author_type values include api, agent, and unknown; records with no recorded author use unknown.

Related pages:

Handle failures consistently

Use status codes to decide whether to fix the request, retry later, or escalate the issue.

400, 401, 403, 404: review request, credentials, permissions, or identifiers.
409: retry only when the conflict is expected to be temporary.
500: use bounded retries with backoff.