Skip to content

Latest commit

 

History

History
154 lines (120 loc) · 5.11 KB

ZhimaMerchantZmgoTemplateApi.md

File metadata and controls

154 lines (120 loc) · 5.11 KB

ZhimaMerchantZmgoTemplateApi

All URIs are relative to https://openapi.alipay.com

Method HTTP request Description
create POST /v3/zhima/merchant/zmgo/template/create 商户创建芝麻GO模板接口
query GET /v3/zhima/merchant/zmgo/template/query 芝麻GO模板查询

create

ZhimaMerchantZmgoTemplateCreateResponseModel create(zhimaMerchantZmgoTemplateCreateModel)

商户创建芝麻GO模板接口

外部商家接入芝麻GO场景下,为商户提供自助创建芝麻GO模板的能力。

Example

// 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.ZhimaMerchantZmgoTemplateApi;

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);

    ZhimaMerchantZmgoTemplateApi apiInstance = new ZhimaMerchantZmgoTemplateApi(defaultClient);
    ZhimaMerchantZmgoTemplateCreateModel zhimaMerchantZmgoTemplateCreateModel = new ZhimaMerchantZmgoTemplateCreateModel(); // ZhimaMerchantZmgoTemplateCreateModel | 
    try {
      ZhimaMerchantZmgoTemplateCreateResponseModel result = apiInstance.create(zhimaMerchantZmgoTemplateCreateModel);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ZhimaMerchantZmgoTemplateApi#create");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
zhimaMerchantZmgoTemplateCreateModel ZhimaMerchantZmgoTemplateCreateModel [optional]

Return type

ZhimaMerchantZmgoTemplateCreateResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

query

ZhimaMerchantZmgoTemplateQueryResponseModel query(templateNo, partnerId)

芝麻GO模板查询

芝麻GO模板查询

Example

// 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.ZhimaMerchantZmgoTemplateApi;

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);

    ZhimaMerchantZmgoTemplateApi apiInstance = new ZhimaMerchantZmgoTemplateApi(defaultClient);
    String templateNo = "ZMGO_TPL2021061601004538"; // String | 模板ID,由创建模板接口返回结果提供
    String partnerId = "208830****697946"; // String | 商户ID
    try {
      ZhimaMerchantZmgoTemplateQueryResponseModel result = apiInstance.query(templateNo, partnerId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ZhimaMerchantZmgoTemplateApi#query");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
templateNo String 模板ID,由创建模板接口返回结果提供 [optional]
partnerId String 商户ID [optional]

Return type

ZhimaMerchantZmgoTemplateQueryResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -