{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Guides","api_domain":"Cross API"},"seo":{"title":"Logical operators","description":"Use OData logical operators in Sales Layer API filters to combine conditions for PIM Catalog, DAM, ecommerce, and sync integration queries.","siteUrl":"https://docs.api.saleslayer.com/","image":"/assets/sales-layer-horizontal-dark-green.224c048d0bb386d3c2683ba504140512b6233d3c6cbf706ca81e2e3f2f02dbd0.9c1bb791.svg","keywords":["Sales Layer","REST API","OpenAPI","PIM API","Product Information Management API","DAM API","Catalog API","product catalog API","product data synchronization","ecommerce integration API","ERP integration","marketplace integration","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":"Technical REST API docs for Sales Layer PIM, Catalog, DAM, ecommerce, ERP, and marketplace integrations."},{"name":"og:image","content":"/assets/sales-layer-horizontal-dark-green.224c048d0bb386d3c2683ba504140512b6233d3c6cbf706ca81e2e3f2f02dbd0.9c1bb791.svg"},{"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":"Technical REST API docs for Sales Layer PIM, Catalog, DAM, ecommerce, ERP, and marketplace integrations."},{"name":"twitter:image","content":"/assets/sales-layer-horizontal-dark-green.224c048d0bb386d3c2683ba504140512b6233d3c6cbf706ca81e2e3f2f02dbd0.9c1bb791.svg"}],"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":[]},"jsonLd":{"@context":"https://schema.org","@type":"WebSite","name":"Sales Layer REST API Documentation","url":"https://docs.api.saleslayer.com/","publisher":{"@type":"Organization","name":"Sales Layer","url":"https://www.saleslayer.com/"}}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"logical-operators","__idx":0},"children":["Logical operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Logical and comparison operators are used inside ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$filter"]}," expressions."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"operators","__idx":1},"children":["Operators"]},{"$$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":"Operator"},"children":["Operator"]},{"$$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":["eq"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat_ref eq 'ABC'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ne"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat_ref ne 'ABC'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Greater than"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdOn gt '2025-01-01'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Less than"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdOn lt '2025-01-01'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ge"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Greater than or equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdOn ge '2025-01-01'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["le"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Less than or equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdOn le '2025-01-01'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["and"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Both conditions must match"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat_ref eq 'A' and cat_title eq 'Products'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["or"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Either condition may match"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat_ref eq 'A' or cat_ref eq 'B'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Value is in a list"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat_ref in ('A','B')"]}]}]}]}]}]},{"$$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":"$filter=PROPERTY_NAME operator 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/Categories?$filter=cat_title eq 'Products' or cat_ref eq 'LPG'\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/dam/images?$filter=status eq 'Ok'\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"notes","__idx":4},"children":["Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use operators with fields whose data type supports the comparison."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use metadata and the OpenAPI reference to confirm available fields."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Parentheses can make complex expressions easier to read and safer to maintain."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-pages","__idx":5},"children":["Related pages"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/filter"},"children":["Filter"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/string-functions"},"children":["String functions"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/pagination-and-filtering"},"children":["Pagination and filtering"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/catalog"},"children":["Catalog REST API overview"]}]}]}]},"headings":[{"value":"Logical operators","id":"logical-operators","depth":1},{"value":"Operators","id":"operators","depth":2},{"value":"Syntax","id":"syntax","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Notes","id":"notes","depth":2},{"value":"Related pages","id":"related-pages","depth":2}],"frontmatter":{"seo":{"title":"Logical operators","description":"Use OData logical operators in Sales Layer API filters to combine conditions for PIM Catalog, DAM, ecommerce, and sync integration queries."},"keywords":{"includes":["logical operators","comparison operators","$filter","PIM API"]},"metadata":{"redocly_category":"Guides","api_domain":"Cross API"}},"lastModified":"2026-07-01T11:33:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/logical-operators","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}