灵动创新 Unimarketing 邮件营销 EDM

/folder

目录

/folder

  • 创建邮件分类

URL

  • {HOST}/services /folder

支持格式

  • XML(Atom)

HTTP 请求方式

  • POST

认证方式

请求数限制

  • true

请求参数

字段名称 是否必选 字段类型 说明
auth String BASIC/APIKEY/ OAUTH 三种认证方式信息中的一种
alt String 通过该参数,你可以改变返回值的格式,目前支持的返回值格式包括:atom(默认) ,暂不支持json
title String 邮件件夹名称
link String <link href="http://services.unimarketing.com.cn/folder/广告" rel="related"> </link>
folder 为根邮件夹
广告 为 DJ测试分类 邮件夹的父邮件夹

请求字符串

<?xml version="1.0" encoding="GBK"?>
<entry xmlns="http://www.w3.org/2005/Atom">
  <title>DJ测试分类</title>
  <link href="http://services.unimarketing.com.cn/folder/广告" rel="related"></link>
</entry>
							

返回结果

 <?xml version="1.0" encoding="GBK"?>
<entry xmlns="http://www.w3.org/2005/Atom">
  <id>http://services.unimarketing.com.cn/folder/4228</id>
  <link href="http://services.unimarketing.com.cn/folder/广告/DJ测试分类" rel="related"></link>
</entry>
  

字段说明

字段名称 意义 数据类型 备注
id 邮件夹ID Number
link 该邮件夹与其父邮件夹关系 String

调用示例(Java 示例)

package cn.unisoftware.api.client.example.mail;

import org.apache.abdera.Abdera;
import org.apache.abdera.model.Entry;

import cn.unisoftware.api.client.ApiClient;
import cn.unisoftware.api.client.utils.AtomConstants;
import cn.unisoftware.api.client.utils.XmlUtil;

public class CreateMailClassify {

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		ApiClient apiClient = ApiClient.getApiClient(false,ApiClient.AuthMode.APIKEY, new String[]{AtomConstants.apikey,AtomConstants.apisecret});

		Abdera abdera = Abdera.getInstance();
		Entry entry = abdera.newEntry();

		/**
		 * 表示在 广告 分类下建立 子分类 DJ测试分类
		 */
		entry.addSimpleExtension(AtomConstants.TITLE, "DJ测试分类");
		entry.addLink("http://services.unimarketing.com.cn/folder/广告")
				.setAttributeValue("rel", "related");
		XmlUtil.displayEncodeXml(entry);
		
		Entry res = apiClient.createMailClassify(entry);
		
		XmlUtil.displayEncodeXml(res);
		

	}

}
 
平台介绍
关于我们 | 联系我们 | 行业应用 | 专业术语 | 资源中心 | 隐私声明
© 2022 灵动创新(北京)科技有限公司 - 京ICP备16028763号-1