{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Guides","api_domain":"Cross API"},"seo":{"title":"Error responses","description":"Error response formats and status codes used by Sales Layer REST APIs.","keywords":["Sales Layer","REST API","OpenAPI","DAM API","Catalog API","product catalog API","image management API","API integration"],"lang":"en-US","meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Sales Layer REST API Documentation"},{"name":"og:title","content":"Sales Layer REST API Documentation"},{"name":"og:description","content":"Complete REST API documentation for Sales Layer's DAM and Catalog APIs. Learn authentication, pagination, filtering, and integration patterns."},{"name":"twitter:card","content":"summary_large_image"},{"name":"twitter:site","content":"@saleslayer"},{"name":"twitter:title","content":"Sales Layer REST API Documentation"},{"name":"twitter:description","content":"Complete REST API documentation for Sales Layer's DAM and Catalog APIs. Learn authentication, pagination, filtering, and integration patterns."}],"llmstxt":{"hide":false,"title":"Sales Layer REST API Documentation","description":"Technical guides and OpenAPI references for Sales Layer DAM and Catalog REST APIs.","sections":[{"title":"Guides","description":"Static API guides for authentication, headers, query parameters, responses, rate limiting, and best practices.","includeFiles":["guides/**/*.md","changelog.md"],"excludeFiles":[]},{"title":"API Reference","description":"OpenAPI-based references and API overview pages for Sales Layer REST APIs.","includeFiles":["apis/**/*.md","apis/**/*.yaml"],"excludeFiles":[]},{"title":"Postman collections","description":"Importable Postman collection and environment instructions for testing Sales Layer REST APIs.","includeFiles":["postman/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"error-responses","__idx":0},"children":["Error responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sales Layer REST APIs use standard HTTP status codes to indicate failed operations."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The current OpenAPI specifications document these error status codes:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status code"},"children":["Status code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 Bad Request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The request is malformed or contains invalid values."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401 Unauthorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The API key is missing, empty, or invalid."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 Forbidden"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The request is authenticated but not authorized for the requested operation. Documented in Catalog API operations."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404 Not Found"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The requested resource does not exist or is not available for the current account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 Conflict"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The operation conflicts with the current resource state. Documented in DAM operations."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500 Internal Server Error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The API could not process the request because of an unexpected server-side error."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"400-bad-request","__idx":1},"children":["400 Bad Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," errors to identify request issues such as invalid query syntax, invalid body fields, unsupported values, or missing required data."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example validation shape:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"validationFailures\": {\n    \"field\": [\n      \"Validation message\"\n    ]\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"401-unauthorized","__idx":2},"children":["401 Unauthorized"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," indicates an authentication problem."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]}," header is present and contains the correct value."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"https://api2.saleslayer.com/errors/unauthorized\",\n  \"title\": \"Unauthorized\",\n  \"status\": 401,\n  \"detail\": \"A valid API key is required.\",\n  \"instance\": \"/rest/Catalog/Products\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"403-forbidden","__idx":3},"children":["403 Forbidden"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," indicates that the API understood the request but the authenticated client is not allowed to perform it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This status is defined in Catalog API operations only. DAM API endpoints do not return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"404-not-found","__idx":4},"children":["404 Not Found"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," indicates that the requested resource could not be found."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This can happen when an identifier is wrong, the resource was deleted, or the resource is not available in the current account context."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"409-conflict","__idx":5},"children":["409 Conflict"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409"]}," indicates that the operation cannot be completed because of the current resource state."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This status is documented in DAM operations, for example when an image cannot be modified or deleted while it is being processed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"500-internal-server-error","__idx":6},"children":["500 Internal Server Error"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," indicates an unexpected server-side error."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clients should not retry indefinitely. Use bounded retries with backoff for temporary failures and surface persistent errors to the integration owner."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementation-notes","__idx":7},"children":["Implementation notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," as errors that usually require request or configuration changes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409"]}," as a state conflict; retry only when the conflict is expected to be temporary."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," as potentially temporary, but use bounded retries."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log status code, endpoint, operation, and correlation identifiers when available."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-pages","__idx":8},"children":["Related pages"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/errors"},"children":["DAM error details"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/rate-limiting"},"children":["Rate limiting"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/feedback-privacy"},"children":["Feedback and privacy"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis"},"children":["API reference overview"]}]}]}]},"headings":[{"value":"Error responses","id":"error-responses","depth":1},{"value":"400 Bad Request","id":"400-bad-request","depth":2},{"value":"401 Unauthorized","id":"401-unauthorized","depth":2},{"value":"403 Forbidden","id":"403-forbidden","depth":2},{"value":"404 Not Found","id":"404-not-found","depth":2},{"value":"409 Conflict","id":"409-conflict","depth":2},{"value":"500 Internal Server Error","id":"500-internal-server-error","depth":2},{"value":"Implementation notes","id":"implementation-notes","depth":2},{"value":"Related pages","id":"related-pages","depth":2}],"frontmatter":{"seo":{"title":"Error responses","description":"Error response formats and status codes used by Sales Layer REST APIs."},"keywords":{"includes":["error responses","status codes",400,401,403,404,409,500]},"metadata":{"redocly_category":"Guides","api_domain":"Cross API"}},"lastModified":"2026-06-04T20:25:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/error-responses","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}