Learn how to return a subset of a collection’s items.
Introduction
Most collection API endpoints support filtering, which makes it possible to retrieve a subset of resources by applying conditions on their state. For example, you can only retrieve leave objects whose status is tentative.Filtering is commonly handled through query parameters: /lucca-api/leaves?status=tentative.Some query parameters support lists, in which case the server expects a comma-separated list of values: ?status=tentative,confirmed.As of now, only strict equality or inequality filters are supported outside of dates, date-times and date-time-offsets. Filters are most often named with the corresponding property. For inequality filters, the property name is prefixed with the ”-” character.
# Retrieve all leaves with status "tentative"GET /lucca-api/leaves?status=tentative HTTPS/2
# Retrieve all leaves with a status different from "tentative"GET /lucca-api/leaves?-status=tentative HTTPS/2
You can only filter on a subset of the object properties.Filtering is implemented on an opt-in basis: each endpoint only supports filtering on a preset of properties. If you feel like a filter is missing, please contact us.
Dates, Date-Times and Date-Time-Offsets
When filtering on date, date-time or date-time-offset properties, you may:
Apply a strict equality filter through a query parameter whose name exactly matches the name of the property.
Apply an “intersection” filter through a query parameter whose name is {propertyName}.between.
GET /lucca-api/leaves?startsOn=2024-01-01 HTTPS/2Host: example.ilucca.netApi-Version: {API_VERSION}Authorization: Bearer {ACCESS_TOKEN}Accept: application/jsonAccept-Encoding: gzip, br
GET /lucca-api/leaves?createdAt.between=2023-01-01T16:00:00Z--2023-01-01T20:00:00Z HTTPS/2Host: example.ilucca.netApi-Version: {API_VERSION}Authorization: Bearer {ACCESS_TOKEN}Accept: application/jsonAccept-Encoding: gzip, br
Please note that open-ended ranges are supported through the ”..” characters: ?createdAt=..--2023-01-01T20:00:00Z (all leaves created before Jan. 1st 2023 at 08:00 PM UTC).More examples:
2024-01-01--2024-12-31: from Jan. 1st 2024 until Dec. 31st 2024 (included).
..--2024-12-31: until Dec. 31st 2024.
2024-01-01--..: from Jan. 1st 2024.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Lucca API","colors":{"primary":"#C75000","light":"#FF7B3D","dark":"#E65A14"},"logo":{"light":"https://mintcdn.com/lucca/6CPlsApetP0UYjIR/assets/logo/light.svg?fit=max\u0026auto=format\u0026n=6CPlsApetP0UYjIR\u0026q=85\u0026s=af3853ae211129c5d4a0bbac9a42e3f4","dark":"https://mintcdn.com/lucca/6CPlsApetP0UYjIR/assets/logo/dark.svg?fit=max\u0026auto=format\u0026n=6CPlsApetP0UYjIR\u0026q=85\u0026s=be0b4c98dd48054847469d5a5302e530"},"favicon":"https://mintcdn.com/lucca/6CPlsApetP0UYjIR/assets/favicon.svg?fit=max\u0026auto=format\u0026n=6CPlsApetP0UYjIR\u0026q=85\u0026s=ab4de94a9c9570834b3dbbfc86764629","api":{"openapi":["openapi-specs/authentication.yaml","openapi-specs/webhook-client-api.json"],"playground":{"display":"interactive"}},"appearance":{"default":"dark"},"background":{"color":{"light":"#FFFFFF","dark":"#030A1A"}},"navbar":{"links":[],"primary":{"type":"button","label":"Sign in","href":"https://www.lucca.fr/login/"}},"footer":{"socials":{"x":"https://twitter.com/LuccaSoftware","github":"https://github.com/LuccaSA","linkedin":"https://www.linkedin.com/company/lucca"},"links":[{"header":"Resources","items":[{"label":"Lucca API","href":"https://developers.lucca.fr/documentation/get-started/introduction"},{"label":"Legacy API","href":"https://developers.lucca.fr/legacy/api-reference"}]},{"header":"Company","items":[{"label":"lucca.fr","href":"https://www.lucca.fr"},{"label":"Careers","href":"https://jobs.luccasoftware.com"},{"label":"Blog","href":"https://www.lucca.fr/actualites"}]}]},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"slack","href":"https://join.slack.com/t/luccaapicommunity/shared_invite/zt-32njiaefl-QjdcZ8JGfPEO_y6BdJh3lg"},{"anchor":"Status","icon":"signal-strong","href":"https://status.lucca.fr"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lucca","hasAudioNarration":false,"actualSubdomain":"lucca","customDomains":["developers.luccasoftware.com"],"gitSource":{"type":"github","owner":"luccasa","repo":"lucca.publicapi","deployBranch":"master","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b00062813ff8a81a62cbc9c","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API Reference","count":380},{"language":"default","tag":"Employee Records","count":60},{"language":"default","tag":"Invoices API","count":45},{"language":"default","tag":"Timesheet API","count":36},{"language":"default","tag":"Documentation","count":33},{"language":"default","tag":"Guides","count":29},{"language":"default","tag":"Organization","count":27},{"language":"default","tag":"Absences API","count":23},{"language":"default","tag":"Organization Structure API","count":22},{"language":"default","tag":"Compensation API","count":21}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"assets/styles.css","content":".hero-block-illustration{flex:1 1 15%;position:relative;overflow:visible}.hero-block-illustration span{position:initial}.hero-block-illustration img{position:absolute;max-width:1000px;height:auto;width:auto;top:-10rem;cursor:pointer;pointer-events:none}.hero-block-illustration img:is(.dark *){opacity:0.5}.hero-block-illustration.left img{right:0}.hero-block-illustration.right img{left:0}.hero-block-content{flex:0 1 50%;display:flex;flex-direction:column;align-items:center;justify-items:center}@media (max-width: 1024px){#lucca-home-container{padding-top:8rem}.hero-block-illustration{display:none}.hero-block-content{flex:1 1 100%}}.changelog-item .main-illustration img{margin:0}ul.oauth-scopes,ul.oauth-scopes ul{margin:0!important}ul.oauth-scopes strong{display:block}ul.oauth-scopes.single-li{padding-left:0.5rem}ul.oauth-scopes.single-li,ul.oauth-scopes.single-li ul,ul.oauth-scopes.single-li li{display:inline}ul.oauth-scopes.single-li>li{padding:0!important}ul.oauth-scopes.single-li>li::before{display:none}ul.oauth-scopes li{margin:0!important}ul.oauth-scopes ul{display:inline-block}ul.oauth-scopes ul li::before{display:none}ul.oauth-scopes>li{display:block}ul.oauth-scopes>li:not(:last-child)::after{display:block;content:\"or\";padding:0 0.5rem;margin:0.5rem 0}ul.oauth-scopes ul li{display:inline-block;padding:0!important}ul.oauth-scopes ul li:not(:last-child)::after{display:inline-block;content:\"and\";padding:0 0.5rem}"}]}
{"page":{"pagePath":"documentation/using-api/filtering","slug":"/documentation/using-api/filtering","pageMetadata":{"title":"Filtering","description":"Learn how to return a subset of a collection's items.","icon":"filter","href":"/documentation/using-api/filtering"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to return a subset of a collection’s items.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`introduction`,children:`Introduction`}),`\n`,_jsxs(_components.p,{children:[`Most collection API endpoints support filtering, which makes it possible to retrieve a subset of resources by applying conditions on their state. For example, you can only retrieve leave objects whose status is `,_jsx(_components.code,{children:`tentative`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Filtering is commonly handled through query parameters: `,_jsx(_components.code,{children:`/lucca-api/leaves?status=tentative`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Some query parameters support lists, in which case the server expects a comma-separated list of values: `,_jsx(_components.code,{children:`?status=tentative,confirmed`}),`.`]}),`\n`,_jsx(_components.p,{children:`As of now, only strict equality or inequality filters are supported outside of dates, date-times and date-time-offsets. Filters are most often named with the corresponding property. For inequality filters, the property name is prefixed with the ”-” character.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Equality`,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Retrieve all leaves with status \"tentative\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /lucca-api/leaves?status=tentative HTTPS/2`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Inequality (\"-\" prefix)`,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Retrieve all leaves with a status different from \"tentative\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /lucca-api/leaves?-status=tentative HTTPS/2`})]}),`\n`]})})})]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:`You can only filter on a subset of the object properties.`}),_jsx(_components.p,{children:`Filtering is implemented on an opt-in basis: each endpoint only supports filtering on a preset of properties. If you feel like a filter is missing, please contact us.`})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`dates-date-times-and-date-time-offsets`,children:`Dates, Date-Times and Date-Time-Offsets`}),`\n`,_jsx(_components.p,{children:`When filtering on date, date-time or date-time-offset properties, you may:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Apply a strict equality filter through a query parameter whose name exactly matches the name of the property.`}),`\n`,_jsxs(_components.li,{children:[`Apply an “intersection” filter through a query parameter whose name is `,_jsx(_components.code,{children:`{propertyName}.between`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`In this second case, the query parameter value `,_jsx(_components.a,{href:`/documentation/using-api/data-types#date-ranges`,children:`must conform to a date-range, a date-time-local-range or a date-time-offset-range`}),`,\ndepending on the type of the attribute.`]}),`\n`,_jsxs(_components.p,{children:[`For example, retrieving all leave resources which were created between 04:00 PM and 08:00 PM (UTC) on Jan. 1`,_jsx(`sup`,{children:`st`}),` 2023:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Strict Equality`,numberOfLines:`6`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /lucca-api/leaves?startsOn=2024-01-01 HTTPS/2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` example.ilucca.net`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Api-Version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {API_VERSION}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {ACCESS_TOKEN}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Accept`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Accept-Encoding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` gzip, br`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Between two dates`,numberOfLines:`6`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /lucca-api/leaves?createdAt.between=2023-01-01T16:00:00Z--2023-01-01T20:00:00Z HTTPS/2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` example.ilucca.net`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Api-Version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {API_VERSION}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {ACCESS_TOKEN}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Accept`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Accept-Encoding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` gzip, br`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Please note that open-ended ranges are supported through the ”..” characters: `,_jsx(_components.code,{children:`?createdAt=..--2023-01-01T20:00:00Z`}),` (all leaves created before Jan. 1`,_jsx(`sup`,{children:`st`}),` 2023 at 08:00 PM UTC).`]}),`\n`,_jsx(_components.p,{children:`More examples:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`2024-01-01--2024-12-31`}),`: from Jan. 1st 2024 until Dec. 31st 2024 (included).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`..--2024-12-31`}),`: until Dec. 31st 2024.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`2024-01-01--..`}),`: from Jan. 1st 2024.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Filtering","description":"Learn how to return a subset of a collection's items.","icon":"filter","href":"/documentation/using-api/filtering"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Introduction","slug":"introduction","depth":2,"children":[]},{"title":"Dates, Date-Times and Date-Time-Offsets","slug":"dates-date-times-and-date-time-offsets","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"lucca","siteName":"Lucca API","title":"Filtering - Lucca API","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{"V5 (latest)":{"href":"/documentation/using-api/filtering","matchLevel":0},"V3 \u0026 V4 (legacy)":{"href":"/home","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T15:38:19.842Z","originalFileLocation":"documentation/using-api/filtering.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to return a subset of a collection\u0026#x27;s items.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lucca API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Filtering - Lucca API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to return a subset of a collection\u0026#x27;s items.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lucca API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.luccasoftware.com/documentation/using-api/filtering\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lucca.mintlify.site/_mintlify/api/og/v2?division=Using+Lucca+API\u0026amp;title=Filtering\u0026amp;description=Learn+how+to+return+a+subset+of+a+collection%27s+items.\u0026amp;theme=78529ce9555b182511a1fe1d\u0026amp;signature=8a7a3eeef76d56e2e5fa7bd6211eb4207d81fb225a7036234d9bd5d2282dd1ae\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Filtering - Lucca API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to return a subset of a collection\u0026#x27;s items.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lucca.mintlify.site/_mintlify/api/og/v2?division=Using+Lucca+API\u0026amp;title=Filtering\u0026amp;description=Learn+how+to+return+a+subset+of+a+collection%27s+items.\u0026amp;theme=78529ce9555b182511a1fe1d\u0026amp;signature=8a7a3eeef76d56e2e5fa7bd6211eb4207d81fb225a7036234d9bd5d2282dd1ae\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lucca/WGD-jBwMyT2ahweA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lucca API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#C75000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.luccasoftware.com/documentation/using-api/filtering\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/documentation/using-api/filtering.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.luccasoftware.com/#organization\",\"name\":\"Lucca API\",\"url\":\"https://developers.luccasoftware.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lucca/6CPlsApetP0UYjIR/assets/logo/light.svg?fit=max\u0026auto=format\u0026n=6CPlsApetP0UYjIR\u0026q=85\u0026s=af3853ae211129c5d4a0bbac9a42e3f4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.luccasoftware.com#website\",\"name\":\"Lucca API\",\"url\":\"https://developers.luccasoftware.com\",\"publisher\":{\"@id\":\"https://developers.luccasoftware.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.luccasoftware.com/documentation/using-api/filtering#webpage\",\"url\":\"https://developers.luccasoftware.com/documentation/using-api/filtering\",\"name\":\"Filtering\",\"description\":\"Learn how to return a subset of a collection's items.\",\"dateModified\":\"2026-10-01T15:38:19.842Z\",\"isPartOf\":{\"@id\":\"https://developers.luccasoftware.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.luccasoftware.com/documentation/using-api/filtering#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.luccasoftware.com/documentation/using-api/filtering#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Using Lucca API\",\"item\":\"https://developers.luccasoftware.com/documentation/using-api/authentication\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Filtering\",\"item\":\"https://developers.luccasoftware.com/documentation/using-api/filtering\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.luccasoftware.com/documentation/using-api/filtering#article\",\"headline\":\"Filtering\",\"name\":\"Filtering\",\"description\":\"Learn how to return a subset of a collection's items.\",\"url\":\"https://developers.luccasoftware.com/documentation/using-api/filtering\",\"mainEntityOfPage\":{\"@id\":\"https://developers.luccasoftware.com/documentation/using-api/filtering#webpage\"},\"dateModified\":\"2026-10-01T15:38:19.842Z\",\"publisher\":{\"@id\":\"https://developers.luccasoftware.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.luccasoftware.com#website\"}}]}\u003c/script>","agentPointerHref":"/documentation/using-api/filtering.md","siteName":"Lucca API","nav":{"global":{"anchors":[{"anchor":"Community","icon":"slack","href":"https://join.slack.com/t/luccaapicommunity/shared_invite/zt-32njiaefl-QjdcZ8JGfPEO_y6BdJh3lg"},{"anchor":"Status","icon":"signal-strong","href":"https://status.lucca.fr"}]},"versions":[{"version":"V5 (latest)","tag":"2024-11-01","tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/home"}]},{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"The Lucca API","sidebarTitle":"Introduction","mode":"wide","icon":"house","href":"/documentation/get-started/introduction"},{"title":"Quick Start","icon":"rocket","mode":"wide","href":"/documentation/get-started/quickstart"},{"title":"URL \u0026 Environments","icon":"cloud","href":"/documentation/get-started/environments"}]},{"group":"Using Lucca API","pages":[{"group":"Authentication","icon":"key","pages":[{"title":"Get Started With Authentication","sidebarTitle":"Get Started","mode":"wide","href":"/documentation/using-api/authentication"},{"openapi":"authentication POST /connect/token","title":"Create Access-Token","href":"/documentation/using-api/authentication-spec"}]},{"title":"Versioning","description":"Learn how to target a specific version","mode":"wide","icon":"code-branch","href":"/documentation/using-api/versioning"},{"title":"Filtering","icon":"filter","href":"/documentation/using-api/filtering"},{"title":"Pagination","description":"Learn how to iterate through a collection's pages.","icon":"forward","href":"/documentation/using-api/paging"},{"title":"Sorting","icon":"bars-sort","href":"/documentation/using-api/sorting"},{"title":"Includes","icon":"expand","href":"/documentation/using-api/includes"},{"title":"Error Handling","icon":"circle-exclamation","href":"/documentation/using-api/errors"},{"title":"HTTP Cache","sidebarTitle":"Cache","mode":"wide","icon":"feather","href":"/documentation/using-api/cache"},{"title":"Data Types \u0026 Formatting","sidebarTitle":"Data Types","icon":"shapes","href":"/documentation/using-api/data-types"},{"title":"Translations (t9n) \u0026 Localization (l10n)","sidebarTitle":"Translations (t9n)","icon":"language","href":"/documentation/using-api/t9n"}]},{"group":"Webhooks","pages":[{"title":"Get Started With Webhooks \u0026 Events","sidebarTitle":"Get Started","icon":"rocket","href":"/documentation/webhooks/get-started"},{"group":"Catching events","icon":"hand","pages":[{"title":"Get Started","href":"/documentation/webhooks/catching/get-started"},{"title":"Receive events","sidebarTitle":"Receive events","openapi":"webhook-client-api POST /{webhook-endpoint}","href":"/documentation/webhooks/catching/spec-receive"},{"title":"Respond to Activation","sidebarTitle":"Respond to Activation","openapi":"webhook-client-api GET /{webhook-endpoint}","href":"/documentation/webhooks/catching/spec-activate"},{"title":"Validating events","icon":"code-simple","href":"/documentation/webhooks/catching/validate"},{"title":"Declare Your Webhook-Endpoint","href":"/documentation/webhooks/catching/declare"}]},{"title":"Troubleshooting","icon":"fire-extinguisher","href":"/documentation/webhooks/troubleshooting"}]},{"group":"MCP","tag":"beta","pages":[{"title":"Connect an AI Assistant to Lucca","sidebarTitle":"Setup","icon":"plug","href":"/documentation/mcp/setup"},{"title":"MCP Tools","sidebarTitle":"Tools","icon":"wrench","mode":"wide","href":"/documentation/mcp/tools"}]},{"group":"Resources","pages":[{"title":"Sandbox","icon":"cube","href":"/documentation/sandbox"},{"title":"Limits","icon":"monitor-waveform","href":"/documentation/limits"},{"title":"Breaking Changes","icon":"bomb","href":"/documentation/breaking-changes"},{"title":"Playground","icon":"futbol","href":"/documentation/playground"},{"title":"Security Best Practices","icon":"shield-halved","href":"/documentation/security"},{"title":"Support","icon":"life-ring","href":"/documentation/support"},{"title":"API Guidelines","icon":"gavel","href":"/documentation/guidelines"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/latest/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/overview"}]}]},{"version":"V3 \u0026 V4 (legacy)","tag":"legacy","pages":[{"title":"V3 \u0026 V4 (legacy)","href":"/home"}]}]},"basePath":"","title":"Filtering - Lucca API","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}