无法使用MailChimp API v3创建细分 [英] Cannot create segment using MailChimp API v3
本文介绍了无法使用MailChimp API v3创建细分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用操场"来测试创建细分,但是我一直收到验证错误
I'm using the "playground" to test creating a segment but I keep getting validations errros
我的要求
{
"name": "MyTest",
"options": {
"match": "any",
"conditions": [
{
"field": "EMAIL",
"op": "is",
"value": "p001@mymaildomain.xxx"
},
{
"field": "EMAIL",
"op": "is",
"value": "p002@mymaildomain.xxx"
}
]
}
}
响应为:
type: http://kb.mailchimp.com/api/error-docs/400-invalid-resource
title: Invalid Resource
status: 400
detail: The resource submitted could not be validated. For field-specific details, see the 'errors' array.
instance:
errors:
0:
field: options.conditions.item:0
message: Data did not match any of the schemas described in anyOf.
1:
field: options.conditions.item:1
message: Data did not match any of the schemas described in anyOf.
推荐答案
实际上JSON的格式应如下:
Actually the format of the JSON should be as following:
{
"name":"email based",
"options":{
"match": "any",
"conditions":[
{
"condition_type":"EmailAddress",
"field":"merge0",
"op":"is",
"value":"p001@mymaildomain.xxx"
},
{
"condition_type":"EmailAddress",
"field":"merge0",
"op":"is",
"value":"p002@mymaildomain.xxx"
}
]
}
这篇关于无法使用MailChimp API v3创建细分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文