Han*_*sen 6 mailchimp mailchimp-api-v3.0
我正在使用"游乐场"来测试创建一个片段,但我一直在验证错误
我的请求:
{
"name": "MyTest",
"options": {
"match": "any",
"conditions": [
{
"field": "EMAIL",
"op": "is",
"value": "p001@mymaildomain.xxx"
},
{
"field": "EMAIL",
"op": "is",
"value": "p002@mymaildomain.xxx"
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
回应是:
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.
Run Code Online (Sandbox Code Playgroud)
实际上JSON的格式应该如下:
{
"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"
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3111 次 |
| 最近记录: |