灵动创新 Unimarketing 邮件营销 EDM

/contact/delete

目录

/contact/delete

  • 批量删除联系人

URL

  • {HOST}/services /contact/delete

支持格式

  • XML(Atom)

HTTP 请求方式

  • POST

认证方式

请求数限制

  • true

请求参数

字段名称 是否必选 字段类型 说明
auth String BASIC/APIKEY/ OAUTH 三种认证方式信息中的一种
alt String 通过该参数,你可以改变返回值的格式,目前支持的返回值格式包括:atom(默认) ,暂不支持json
id Number 需要删除的联系人ID。

请求字符串

<?xml version="1.0" encoding="GBK"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <entry>
    <id>http://services.unimarketing.com.cn/contact/5724980</id>
  </entry>
  <entry>
    <id>http://services.unimarketing.com.cn/contact/5724981</id>
  </entry>
  <entry>
    <id>http://services.unimarketing.com.cn/contact/5724982</id>
  </entry>
</feed>
							

返回结果

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <entry xmlns:um="http://www.unimarketing.com.cn/xmlns/">
    <id>http://services.unimarketing.com.cn/contact/5724980</id>
    <title type="text">联系人不存在 5724980</title>
    <um:deleted>false</um:deleted>
  </entry>
  <entry xmlns:um="http://www.unimarketing.com.cn/xmlns/">
    <id>http://services.unimarketing.com.cn/contact/5724981</id>
    <title type="text">联系人不存在 5724981</title>
    <um:deleted>false</um:deleted>
  </entry>
  <entry xmlns:um="http://www.unimarketing.com.cn/xmlns/">
    <id>http://services.unimarketing.com.cn/contact/5724982</id>
    <title type="text">联系人不存在 5724982</title>
    <um:deleted>false</um:deleted>
  </entry>
</feed>                      
                           

字段说明

字段名称 意义 数据类型 备注
id 联系人ID Number
um:deleted 删除是否成功 String true|false
title 删除说明 String

调用示例(Java 示例)

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

import org.apache.abdera.Abdera;
import org.apache.abdera.model.Entry;
import org.apache.abdera.model.Feed;
import org.apache.abdera.util.Constants;

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

/**
 * @description 删除多笔联系人
 * @author DJ
 * @test 【true】
 */
public class DeleteContacts {
 
	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();
		
		Feed feed = abdera.newFeed();
		Entry entry1 = abdera.newEntry();
		entry1.addSimpleExtension(Constants.ID, "http://services.unimarketing.com.cn/contact/5724980");
		feed.addEntry(entry1);
		Entry entry2 = abdera.newEntry();
		entry2.addSimpleExtension(Constants.ID, "http://services.unimarketing.com.cn/contact/5724981");
		feed.addEntry(entry2);
		
		Entry entry3 = abdera.newEntry();
		entry3.addSimpleExtension(Constants.ID, "http://services.unimarketing.com.cn/contact/5724982");
		feed.addEntry(entry3);
		
		XmlUtil.displayEncodeXml(feed);
		String res = apiClient.deleteContacts(feed);
         System.out.println(res);
         
	}

}

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