Query Customer Object List by Criteria
# Description
Query the customer object list by criteria
# Request Specification
Request Method : POST + application/json
Request Path : https://${Cloud Domain}/cgi/crm/v2/data/query?thirdTraceId=${Random String}
Request Headers : Refer to Common Parameters
# Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data map |
| dataObjectApiName | String | Yes | Object api_name, fixed value: AccountObj |
| find_explicit_total_num | Boolean | No | Whether to return total count (true -> return total, false -> do not return total. Default is true. Setting to false can speed up the API response) |
| search_query_info | Map | Yes | Query condition description |
| limit | Int | Yes | Page size (max 100) |
| offset | Int | Yes | Offset (starts from 0 and must be a multiple of limit) |
| filters | List | Yes | Filter condition list |
| field_name | String | Yes | Field name |
| field_values | List[String] | Yes | Field values |
| operator | String | Yes | Operator, see [operator parameter description] below for details |
| orders | List | Yes | Query conditions |
| fieldName | String | Yes | Field name |
| isAsc | Boolean | Yes | Ascending order (true for ascending, false for descending) |
| fieldProjection | List[String] | Yes | Returned field list, values are apiName of object fields |
# operator Parameter Description
You can use the query conditions from the object list page directly. See How to obtain query conditions from the list
| Parameter | Meaning | Description | Parameter | Meaning | Description |
|---|---|---|---|---|---|
| EQ | Equal | N | Not equal | Can query empty values | |
| GT | Greater than | GTE | Greater than or equal | ||
| LT | Less than | LTE | Less than or equal | ||
| LIKE | Contains | NLIKE | Does not contain | ||
| IS | Is empty | ISN | Is not empty | ||
| IN | In | NIN | Not in | ||
| BETWEEN | Between | NBETWEEN | Not between | ||
| STARTWITH | Starts with | ENDWITH | Ends with | ||
| HASANYOF | Has overlapping elements | NHASANYOF | No overlap |
# Request Example
{
"data": {
"find_explicit_total_num": true,
"search_query_info": {
"offset": 0,
"limit": 1,
"orders": [
{
"fieldName": "create_time",
"isAsc": true
}
],
"fieldProjection": [
"name"
],
"filters": [
{
"operator": "EQ",
"field_name": "name",
"field_values": [
"603dabc14ae65400011aec90"
]
}
]
},
"dataObjectApiName": "AccountObj"
}
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| data | Map | For parameter details, call the Query Object Description API |
| errorMessage | string | Error message |
| errorCode | Int | View Error Codes |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"data": {
"created_by__r": {},
"lock_status": "0",
"is_deleted": false,
"create_time": 1612247399397,
"name": "xxxxxx",
"_id": "69046aexxxxxxx"
},
"errorMessage": "OK",
"errorCode": 0
}
# Notes
- Do not use the response message field for logic checks; errorMessage may change.
- If a field value is empty, the field will not be returned.