{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Guides","api_domain":"Cross API"},"seo":{"title":"String functions","description":"String functions supported in Sales Layer API filter expressions.","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":"string-functions","__idx":0},"children":["String functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["String functions filter resources based on text values in supported fields."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use them inside ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$filter"]}," expressions."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-functions","__idx":1},"children":["Supported functions"]},{"$$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":"Function"},"children":["Function"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contains"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches values that contain a substring."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contains(prod_title,'EC')"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startswith"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches values that start with a prefix."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startswith(cat_ref,'C')"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endswith"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches values that end with a suffix."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endswith(prod_ref,'-EN')"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"syntax","__idx":2},"children":["Syntax"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"FUNCTION_NAME(PROPERTY_NAME,'VALUE')\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":3},"children":["Examples"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/catalog/rest/Catalog/Products?$select=prod_ref,prod_title&$filter=contains(prod_title,'EC')\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/catalog/rest/Catalog/Categories?$filter=startswith(cat_ref,'C')\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/dam/image?$filter=contains(reference,'product')\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"combining-with-logical-operators","__idx":4},"children":["Combining with logical operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["String functions can be combined with logical operators:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"startswith(cat_ref,'C') and contains(cat_title,'Shoes')\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"notes","__idx":5},"children":["Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use string functions only with fields that support text filtering."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use metadata endpoints to confirm field names and data types."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["URL encode query values when necessary."]}]}]},"headings":[{"value":"String functions","id":"string-functions","depth":1},{"value":"Supported functions","id":"supported-functions","depth":2},{"value":"Syntax","id":"syntax","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Combining with logical operators","id":"combining-with-logical-operators","depth":2},{"value":"Notes","id":"notes","depth":2}],"frontmatter":{"seo":{"title":"String functions","description":"String functions supported in Sales Layer API filter expressions."},"keywords":{"includes":["string functions","contains","startswith","endswith","$filter"]},"metadata":{"redocly_category":"Guides","api_domain":"Cross API"}},"lastModified":"2026-06-04T20:25:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/string-functions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}