{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Guides","api_domain":"Cross API"},"seo":{"title":"Headers","description":"HTTP headers used by Sales Layer REST APIs, including API key authentication, localization, content negotiation, and JSON request bodies.","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":"headers","__idx":0},"children":["Headers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sales Layer REST APIs use HTTP headers to authenticate requests and, in some cases, control how request and response content is interpreted."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At minimum, every API request must include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]}," header."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"header-summary","__idx":1},"children":["Header summary"]},{"$$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":"Header"},"children":["Header"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Used for"},"children":["Used for"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates the request with the API key assigned to the Sales Layer account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept-Language"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requests localized content for supported Catalog API fields."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required when sending a body"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tells the API the format of the request body. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}," for JSON requests."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Indicates the preferred response format. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}," when you want JSON responses explicitly."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"x-api-key","__idx":2},"children":["X-API-KEY"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]}," is mandatory for all Sales Layer REST API requests."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"X-API-KEY: YOUR_API_KEY\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUR_API_KEY"]}," with the key provided for your Sales Layer account."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do not expose API keys in frontend code, public repositories, screenshots, or logs. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/authentication"},"children":["Authentication"]}," for API key access and security recommendations."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"accept-language","__idx":3},"children":["Accept-Language"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept-Language"]}," can be used to request localized content when an API supports localized fields."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Accept-Language: en-us\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If omitted, the API may return content using the default language configured for the Sales Layer account."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This header is especially relevant for Catalog API resources that include multilanguage fields. For example, a catalog integration may use it to request product, variant, category, or custom entity values in a specific language."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Examples:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Accept-Language: en\nAccept-Language: en-us\nAccept-Language: es\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the exact language or locale values supported by the account and the API operation."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Q-factor weighting (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en-US;q=0.9"]},") and the wildcard (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*"]},") are not supported. Use exact language or locale codes only."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"content-type","__idx":4},"children":["Content-Type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}," when sending a request body."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For JSON request bodies:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Content-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is relevant for operations such as creating or updating DAM images, products, variants, categories, or custom entity items."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Requests without the expected ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}," may be rejected or parsed incorrectly."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"accept","__idx":5},"children":["Accept"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept"]}," when the client wants to explicitly request a response format."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For JSON responses:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Accept: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Most API clients can omit this header when JSON is the default response format, but including it can make integrations easier to inspect and debug."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-get-request","__idx":6},"children":["Example GET request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET 'https://api2.saleslayer.com/catalog/rest/Catalog/Products?$top=10' \\\n  -H 'X-API-KEY: YOUR_API_KEY' \\\n  -H 'Accept-Language: en-us' \\\n  -H 'Accept: application/json'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-mistakes","__idx":7},"children":["Common mistakes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Avoid these common header issues:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sending the API key in a query parameter instead of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]}," header."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Misspelling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sending an empty API key value."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Forgetting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type: application/json"]}," when sending a JSON body."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Assuming ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept-Language"]}," changes all fields; it only affects localized content supported by the API operation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Logging full request headers in production without masking the API key."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"support","__idx":8},"children":["Support"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For technical support, API questions, or help getting access to an API key, contact Sales Layer support or your account representative."]}]},"headings":[{"value":"Headers","id":"headers","depth":1},{"value":"Header summary","id":"header-summary","depth":2},{"value":"X-API-KEY","id":"x-api-key","depth":2},{"value":"Accept-Language","id":"accept-language","depth":2},{"value":"Content-Type","id":"content-type","depth":2},{"value":"Accept","id":"accept","depth":2},{"value":"Example GET request","id":"example-get-request","depth":2},{"value":"Common mistakes","id":"common-mistakes","depth":2},{"value":"Support","id":"support","depth":2}],"frontmatter":{"seo":{"title":"Headers","description":"HTTP headers used by Sales Layer REST APIs, including API key authentication, localization, content negotiation, and JSON request bodies."},"keywords":{"includes":["headers","X-API-KEY","Accept-Language","Content-Type","API authentication"]},"metadata":{"redocly_category":"Guides","api_domain":"Cross API"}},"lastModified":"2026-06-04T20:25:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/headers","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}