Advanced Query DSL

By referencing most popular programming languages and technical frameworks, we have developed the Advanced Query DSL for advanced data querying. We describe the data filtering scheme using a multi-layer filter format.

The Advanced Query DSL requires the following query parameters:

  • filter: Conditions for data filtering.
  • offset: For pagination
  • limit: For pagination

Filter Format

The filter parameter is used to specify conditions for data filtering. It follows a nested structure where you first specify the field name, then the operation, and finally the value.

Filter Parameter Structure

filter[field_name][operation]=value

Where:

  • field_name: The name of the field you want to filter on. For nested fields, use dot notation (e.g., address.city).
  • operation: The filtering operation to perform (e.g., _eq, _gte, _contains).
  • value: The value to compare against.

Multiple Filter Conditions

You can specify multiple filter conditions by including multiple filter parameters in your request:

# Filter by both initial_total and correspondence_state
filter[initial_total][_gte]=100&filter[correspondence_state][_eq]=paid

Supported Value Types

  • String: Enclosed in quotes if it contains spaces or special characters
  • Number: Use numeric format (e.g., 100, 99.99)
  • Boolean: Use 0 for false, 1 for true
  • Date/Time: Use RFC3337 format with timezone (e.g., 2026-01-05T15:43:18+08:00)
  • Array: Use comma-separated values for operations like _in

Examples of Filter Usage

# Equality check
filter[status][_eq]=active

# Range check
filter[price][_gte]=100&filter[price][_lte]=500

# Text search
filter[name][_contains]=John

# Date range
filter[created_at][_gte]=2026-01-01T00:00:00+08:00&filter[created_at][_lte]=2026-01-01T00:00:00+08:00

# Boolean field
filter[is_active][_eq]=1

  • FieldName: For the fields in specific API objects, please refer to the definitions in the corresponding API documentation.
  • OP: For the types of data filtering conditions, please see the list below.
https://api-full-url-path?filter[$Field_Name][$OP]=value1&filter[$Field_Name][$OP]=value2
# All of paid order and initial_total >= 100
filter[initial_total][_gte]=100&filter[correspondence_state][_eq]=paid
info
  1. use 0 or 1 for boolean field.
  2. use 2026-01-05T15:43:18+08:00 time format for datetime field.

Filter OP List

Op NameComment
_eqequal to
_neqnot equal to
_gtgreater than
_gtegreater than or equal to
_ltless than
_lteless than or equal to
_containsLIKE
_not_containsNOT LIKE

Pagination

  • offset: The starting record offset
  • limit: The pagination size. how many records will be returned. up to 1000.

Supports API(s)