All URIs are relative to https://openapi.alipay.com
Method | HTTP request | Description |
---|---|---|
apply | POST /v3/alipay/open/app/service/apply | 服务提报申请 |
delete | DELETE /v3/alipay/open/app/service/delete | 服务失效接口 |
query | GET /v3/alipay/open/app/service/query | 服务查询 |
AlipayOpenAppServiceApplyResponseModel apply(alipayOpenAppServiceApplyModel)
服务提报申请
服务提报申请
// 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.AlipayOpenAppServiceApi;
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);
AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
AlipayOpenAppServiceApplyModel alipayOpenAppServiceApplyModel = new AlipayOpenAppServiceApplyModel(); // AlipayOpenAppServiceApplyModel |
try {
AlipayOpenAppServiceApplyResponseModel result = apiInstance.apply(alipayOpenAppServiceApplyModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenAppServiceApi#apply");
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 |
---|---|---|---|
alipayOpenAppServiceApplyModel | AlipayOpenAppServiceApplyModel | [optional] |
AlipayOpenAppServiceApplyResponseModel
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
Object delete(serviceCode)
服务失效接口
服务失效
// 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.AlipayOpenAppServiceApi;
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);
AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
String serviceCode = "12522641"; // String | 服务id
try {
Object result = apiInstance.delete(serviceCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenAppServiceApi#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 |
---|---|---|---|
serviceCode | String | 服务id | [optional] |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
AlipayOpenAppServiceQueryResponseModel query(serviceCode)
服务查询
服务查询
// 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.AlipayOpenAppServiceApi;
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);
AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
String serviceCode = "s1111"; // String | 服务id
try {
AlipayOpenAppServiceQueryResponseModel result = apiInstance.query(serviceCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlipayOpenAppServiceApi#query");
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 |
---|---|---|---|
serviceCode | String | 服务id | [optional] |
AlipayOpenAppServiceQueryResponseModel
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |