- Search
Advanced querying
OrderCloud's list endpoints can return thousands or hundreds of thousands of items. The platform provides comprehensive querying tools to help you locate and extract specific data efficiently. These tools enable precise data retrieval for both system operations and user interactions.
Filtering capabilities
Filtering provides precise value matching for specific fields. This method offers improved performance over text searching when exact matches are needed.
Extended property filtering
For filtering on extended property (XP) fields, use dot notation to access nested values. Example XP structure:
To filter users by team name:
Pattern matching
The system supports pattern matching using the * wildcard character:
This returns matches like "John Smith" and "Johnny McSmooth".
Logical operators
OR operations
Use the | character for OR conditions:
This returns matches like:
- "John Smith"
- "Johnny Jones"
- "John Johnson"
AND and NOT operations
- Use
!to negate conditions - Multiple parameters create AND conditions
Example excluding specific last names:
Numeric and date comparisons
Use > and < for value comparisons:
For inclusive ranges, combine operators:
This returns IDs from 0 to 9 inclusive.
Null value handling
To find records with undefined or null values:
For empty string values:
Performance optimization
The system maintains indexes for efficient data retrieval, including XP fields. Consider these performance factors:
-
Query complexity impact:
- Multiple OR conditions
- Leading wildcard patterns
- Large data sets
-
Optimization strategies:
- Use appropriate data grouping
- Leverage User Groups
- Implement Categories effectively
Sort operations
Control result ordering using the sortBy parameter:
Ascending order:
Descending order:
Query combinations
Search, filter, and sort operations can be combined for precise data retrieval and presentation.
Pagination implementation
List responses contain metadata and results:
Pagination features:
- Default page size: 20 items
- Maximum page size: 100 items
- Zero-based ItemRange values
- Page numbering starts at 1
LastID pagination method
For efficient pagination of large datasets (>30 pages), implement this pattern:
-
Initial request:
http -
Subsequent requests:
http -
Implementation notes:
- Track the last item's ID
- Continue until receiving empty results
- Maintain consistent ID formats for proper sorting
Note: For premium search resources, ensure consistent ID number types to prevent comparison issues.
Related reading
- Leveraging extended properties in the development of custom eCommerce apps
- Configuring user and application data access
- Ad-hoc products