All URIs are relative to https://openapi.alipay.com
Method | HTTP request | Description |
---|---|---|
batchquery | POST /v3/alipay/open/public/group/batchquery | 查询用户分组列表 |
create | POST /v3/alipay/open/public/group/create | 用户分组创建接口 |
delete | DELETE /v3/alipay/open/public/group/delete | 用户分组删除接口 |
modify | POST /v3/alipay/open/public/group/modify | 用户分组修改接口 |
AlipayOpenPublicGroupBatchqueryResponseModel batchquery()
查询用户分组列表
使用该接口查询分组列表,并配合其它分组管理接口使用,最多显示200条
// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenPublicGroupApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.alipay.com");
// 设置alipayConfig参数(全局设置一次)
AlipayConfig config = new AlipayConfig();
config.setAppId("app_id");
config.setPrivateKey("private_key");
config.setAlipayPublicKey("alipay_public_key");
config.setEncryptKey("encrypt_key");
defaultClient.setAlipayConfig(config);
AlipayOpenPublicGroupApi apiInstance = new AlipayOpenPublicGroupApi(defaultClient);
try {
AlipayOpenPublicGroupBatchqueryResponseModel result = apiInstance.batchquery();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenPublicGroupApi#batchquery");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
AlipayOpenPublicGroupBatchqueryResponseModel
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
AlipayOpenPublicGroupCreateResponseModel create(alipayOpenPublicGroupCreateModel)
用户分组创建接口
开发者可使用此接口根据指定条件从关注用户中圈定人群生成分组,分组可用于组发消息等场景,分组圈定的人群必须大于50人。
// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenPublicGroupApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.alipay.com");
// 设置alipayConfig参数(全局设置一次)
AlipayConfig config = new AlipayConfig();
config.setAppId("app_id");
config.setPrivateKey("private_key");
config.setAlipayPublicKey("alipay_public_key");
config.setEncryptKey("encrypt_key");
defaultClient.setAlipayConfig(config);
AlipayOpenPublicGroupApi apiInstance = new AlipayOpenPublicGroupApi(defaultClient);
AlipayOpenPublicGroupCreateModel alipayOpenPublicGroupCreateModel = new AlipayOpenPublicGroupCreateModel(); // AlipayOpenPublicGroupCreateModel |
try {
AlipayOpenPublicGroupCreateResponseModel result = apiInstance.create(alipayOpenPublicGroupCreateModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenPublicGroupApi#create");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
alipayOpenPublicGroupCreateModel | AlipayOpenPublicGroupCreateModel | [optional] |
AlipayOpenPublicGroupCreateResponseModel
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
Object delete(groupId)
用户分组删除接口
调用接口删除用户分组
// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenPublicGroupApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.alipay.com");
// 设置alipayConfig参数(全局设置一次)
AlipayConfig config = new AlipayConfig();
config.setAppId("app_id");
config.setPrivateKey("private_key");
config.setAlipayPublicKey("alipay_public_key");
config.setEncryptKey("encrypt_key");
defaultClient.setAlipayConfig(config);
AlipayOpenPublicGroupApi apiInstance = new AlipayOpenPublicGroupApi(defaultClient);
String groupId = "100"; // String | 分组ID,通过<a href=\"https://opendocs.alipay.com/apis/api_6/alipay.open.public.group.create\">alipay.open.public.group.create</a>(用户分组创建接口) 创建用户分组获取。
try {
Object result = apiInstance.delete(groupId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenPublicGroupApi#delete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
groupId | String | 分组ID,通过<a href="https://opendocs.alipay.com/apis/api_6/alipay.open.public.group.create\">alipay.open.public.group.create</a>(用户分组创建接口) 创建用户分组获取。 | [optional] |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
Object modify(alipayOpenPublicGroupModifyModel)
用户分组修改接口
调用改接口修改用户分组,仅支持修改分组名称。
// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenPublicGroupApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.alipay.com");
// 设置alipayConfig参数(全局设置一次)
AlipayConfig config = new AlipayConfig();
config.setAppId("app_id");
config.setPrivateKey("private_key");
config.setAlipayPublicKey("alipay_public_key");
config.setEncryptKey("encrypt_key");
defaultClient.setAlipayConfig(config);
AlipayOpenPublicGroupApi apiInstance = new AlipayOpenPublicGroupApi(defaultClient);
AlipayOpenPublicGroupModifyModel alipayOpenPublicGroupModifyModel = new AlipayOpenPublicGroupModifyModel(); // AlipayOpenPublicGroupModifyModel |
try {
Object result = apiInstance.modify(alipayOpenPublicGroupModifyModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenPublicGroupApi#modify");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
alipayOpenPublicGroupModifyModel | AlipayOpenPublicGroupModifyModel | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |