Query customer list (QueryCustomerManagementList)
Queries the customer list in pages. Supports fuzzy search by list name and returns results in descending order of creation time.
Prerequisites
-
The SDK is installed.
-
An AccessKey is obtained and configured. For more information, see Obtain an AccessKey and configure it as an environment variable.
Request parameters
|
Name |
Type |
Required |
Description |
Example |
|
Action |
String |
Yes |
The operation to perform. Set the value to QueryCustomerManagementList. |
QueryCustomerManagementList |
|
Version |
String |
Yes |
The API version number. Format: YYYY-MM-DD. Set the value to 2025-11-27. |
Fixed to 2025-11-27 |
|
CustomerListName |
String |
No |
The name of the customer list. Fuzzy search is supported. |
VIP customers |
|
Current |
Number |
No |
The current page number. Default: 1. |
1 |
|
Size |
Number |
No |
The number of entries per page. Default: 10. |
10 |
Response parameters
|
Name |
Type |
Description |
Example |
|
RequestId |
String |
The request ID. |
xxxx-xxxx-xxxx |
|
Success |
Boolean |
Indicates whether the request was successful. |
True |
|
Code |
String |
The error code. The value is SUCCESS when the request is successful. |
SUCCESS |
|
Message |
String |
The error message or success message. |
The operation was successful. |
|
Total |
Long |
The total number of records. |
2 |
|
Current |
Long |
The current page number. |
1 |
|
Size |
Long |
The number of entries per page. |
10 |
|
Records |
Array |
The returned data, which includes fields such as Id, CustomerListName, CustomerListCount, IsUsed, GmtCreate, and GmtModified. For more information, see the response parameter description below. |
Examples
Python
import json
import os
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_tea_openapi.client import Client as OpenApiClient
from alibabacloud_tea_util import models as util_models
from alibabacloud_openapi_util.client import Client as OpenApiUtilClient
def main():
config = open_api_models.Config(
access_key_id=os.getenv("ACCESS_KEY_ID"),
access_key_secret=os.getenv("ACCESS_KEY_SECRET"),
)
config.endpoint = "thirdswaicall.aliyuncs.com"
config.protocol = "HTTPS"
client = OpenApiClient(config)
params = open_api_models.Params(
style="RPC",
version="2025-11-27",
action="QueryCustomerManagementList",
method="POST",
pathname="/",
protocol="HTTPS",
auth_type="AK",
req_body_type="json",
body_type="json",
)
body = {'Current': 1, 'Size': 10}
# body['CustomerListName'] = 'VIP customers' # Optional
request = open_api_models.OpenApiRequest(query=OpenApiUtilClient.query(body))
runtime = util_models.RuntimeOptions(autoretry=True, max_attempts=3)
try:
resp = client.call_api(params, request, runtime)
print(json.dumps(resp.get("body", {}), ensure_ascii=False, indent=2))
except Exception as e:
print(f"Call failed: {e}")
if __name__ == "__main__":
main()
Java
import com.aliyun.teaopenapi.Client;
import com.aliyun.teaopenapi.models.Config;
import com.aliyun.teaopenapi.models.OpenApiRequest;
import com.aliyun.teaopenapi.models.Params;
import com.aliyun.teautil.models.RuntimeOptions;
import com.google.gson.Gson;
import java.util.HashMap;
import java.util.Map;
public class Demo {
public static void main(String[] args) throws Exception {
// Initialize configuration
Config config = new Config()
.setAccessKeyId(System.getenv("ACCESS_KEY_ID"))
.setAccessKeySecret(System.getenv("ACCESS_KEY_SECRET"))
.setEndpoint("thirdswaicall.aliyuncs.com")
.setProtocol("HTTPS");
Client client = new Client(config);
// Set API parameters
Params params = new Params()
.setStyle("RPC")
.setVersion("2025-11-27")
.setAction("QueryCustomerManagementList")
.setMethod("POST")
.setPathname("/")
.setProtocol("HTTPS")
.setAuthType("AK")
.setReqBodyType("json")
.setBodyType("json");
// Build request parameters
Map<String, Object> body = new HashMap<>();
body.put("Current", 1);
body.put("Size", 10);
// body.put("CustomerListName", "VIP customers"); // Optional
OpenApiRequest request = new OpenApiRequest()
.setQuery(com.aliyun.openapiutil.Client.query(body));
// Set runtime options (auto-retry)
RuntimeOptions runtime = new RuntimeOptions()
.setAutoretry(true)
.setMaxAttempts(3);
try {
// Call the API
Map<String, ?> response = client.callApi(params, request, runtime);
Gson gson = new Gson();
System.out.println(gson.toJson(response.get("body")));
} catch (Exception e) {
System.err.println("Call failed: " + e.getMessage());
}
}
}
Response example
{
"Success": true,
"Code": "SUCCESS",
"Message": "The operation was successful.",
"RequestId": "xxxx-xxxx-xxxx",
"Total": 2,
"Current": 1,
"Size": 10,
"Records": [
{
"Id": 1001,
"CustomerListName": "VIP customer list",
"CustomerListCount": 500,
"IsUsed": "1",
"GmtCreate": "2025-12-01 10:00:00",
"GmtModified": "2025-12-01 10:05:00"
},
{
"Id": 1002,
"CustomerListName": "Spring Festival promotion list",
"CustomerListCount": 1200,
"IsUsed": "0",
"GmtCreate": "2025-12-15 14:30:00",
"GmtModified": "2025-12-15 14:30:00"
}
]
}
The specific results are in the Records node. The following section describes the parameters in the Records node.
|
Name |
Type |
Description |
Example |
|
Id |
Number |
The customer list ID. |
1001 |
|
CustomerListName |
String |
The name of the customer list. |
VIP customer list |
|
CustomerListCount |
Number |
The number of phone numbers in the list. |
500 |
|
IsUsed |
String |
Indicates whether the list is used by an outbound task. Valid values: 0 (not used) and 1 (used). |
1 |
|
GmtCreate |
String |
The creation time. |
2025-12-01 10:00:00 |
|
GmtModified |
String |
The last modification time. |
2025-12-15 14:30:00 |
Error codes
If an error occurs, see Error codes for troubleshooting.