Filtering and Sorting
LCE query operations commonly accept a JSON query model. Combine common query fields with domain-specific filters to reduce response size and make result ordering predictable.
Build a query model
Search and status
searchKey supports keyword-oriented searches where implemented. status accepts the entity states defined by the domain schema.
Narrow by resource
Domain query models can expose arrays such as productIds, codes, cultures or orderIds.
Expand selectively
includes requests supported relationships or navigation data. Include only what the workflow needs.
Set explicit sorting
sorting is a string field. The shared schema documents a pattern such as FieldName DESC.
Example query
{
"tenantId": 1,
"codes": ["en", "tr"],
"isDefault": true,
"searchKey": "eng",
"pageIndex": 0,
"pageSize": 20,
"sorting": "name ASC"
}
This example uses fields available in the language query model. Other resources expose different filters; copy field names and value types from the selected endpoint schema.
Sorting format
| Example | Intent | Guidance |
|---|---|---|
name ASC | Sort by name in ascending order. | Use only if name is supported by the operation. |
created DESC | Return the most recently created records first. | Useful for incremental review, but not a substitute for a documented synchronization cursor. |
resourceId ASC | Provide deterministic ID ordering. | Replace resourceId with the real schema field, such as languageId. |
Query practices
- Start with the smallest set of filters required by the use case.
- Use exact ID or code filters when they are known.
- Add
searchKeyonly for endpoints that support keyword search. - Request relationships through
includesonly when needed. - Keep filters and sorting unchanged while paging through a result set.
- Do not assume whether multiple filters are combined with AND or OR; verify the operation behavior.
- Treat unsupported field names and malformed sorting expressions as client errors.