灵动创新 Unimarketing 邮件营销 EDM

/schedule

目录

/schedule

  • 查询交易邮件报表

URL

  • {HOST}/services /report/details/{taskId}?q=domains[126.com,163.com] &start-index=1&max-results=10

支持格式

  • XML(Atom)

HTTP 请求方式

  • POST

认证方式

请求数限制

  • true

请求参数

字段名称 是否必选 字段类型 说明
auth String BASIC/APIKEY/ OAUTH 三种认证方式信息中的一种
alt String 通过该参数,你可以改变返回值的格式,目前支持的返回值格式包括:atom(默认) ,暂不支持json
q String 查询条件 例如:q=domains[]
start-index int 查询开始值
max-results int 返回最大记录数
link Number 邮件ID(emailId)

请求字符串

 <?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
  <link href="http://services.unimarketing.com.cn/envelope/8899" rel="related"></link>
</entry>
							

返回结果

 
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
  <openSearch:itemsPerPage>10</openSearch:itemsPerPage>
  <openSearch:totalResults>4</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  
  <link xmlns:um="http://www.unimarketing.com.cn/xmlns/"
   href="http://services.unimarketing.com.cn/envelope/16948442"
    rel="related" um:recipient="unimail2011@163.com" 
    um:deliveryStatus="queued" um:queueTime="1310620676000"></link>
  <link xmlns:um="http://www.unimarketing.com.cn/xmlns/"
   href="http://services.unimarketing.com.cn/envelope/16948443" 
   rel="related" um:recipient="unimail2012@163.com" 
   um:deliveryStatus="queued" um:queueTime="1310620677000"></link>
  
</entry>                                 
                           

字段说明

字段名称 意义 数据类型 备注
link 邮件发送信息 String href ="http://services.unimarketing.com.cn/envelope/16948442" 为 邮件ID
um:recipient =联系人Email地址
um:deliveryStatus = 投递状态
um:queueTime = 在队列时间

调用示例(Java 示例)

  package cn.unisoftware.api.client.example1.transaction;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.unisoftware.api.client.ApiClient;
import cn.unisoftware.api.client.UnimailClient;
import cn.unisoftware.api.client.model.TransactionReport;
import cn.unisoftware.api.client.utils.AtomConstants;

/**
 * @description 查询交易邮件报表
 * @author DJ
 * @date 2001-07-12
 */
public class QueryTransactionMailReport {
	
	public static void main(String[] args) throws Exception {
		 UnimailClient unimailClient = UnimailClient.getClient(false,ApiClient.AuthMode.BASIC, new String[]{AtomConstants.userName,AtomConstants.userPwd});
//		 UnimailClient unimailClient = UnimailClient.getClient(false,ApiClient.AuthMode.APIKEY, new String[]{AtomConstants.apikey,AtomConstants.apisecret});
//		 UnimailClient unimailClient = UnimailClient.getClient(UnimailClient.AuthMode.APIKEY, new String[]{AtomConstants.apikey,AtomConstants.apisecret});
		 
		 Long taskId = 9117l; //【必填】任务ID
		 String [] domains = new String[]{}; //【选填】按ISP 查询,如:163.com,qq.com
		 List listmailIds = new ArrayList(); //【选填】按邮件ID 查询
		 listmailIds.add(Long.valueOf(8899));
		 TransactionReport tr = unimailClient.queryTransactionReport(taskId, domains, listmailIds, 1, 10);
		 System.out.println(ToStringBuilder.reflectionToString(tr,ToStringStyle.MULTI_LINE_STYLE));
		 
	}
}
  
         
 
平台介绍
关于我们 | 联系我们 | 行业应用 | 专业术语 | 资源中心 | 隐私声明
© 2022 灵动创新(北京)科技有限公司 - 京ICP备16028763号-1