有没有办法解决节点中的Mailchimp API错误? [英] Is there a way to fix this Mailchimp API error in node?
本文介绍了有没有办法解决节点中的Mailchimp API错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法解决Node.js中的MailChimp API错误?
Is there a way to fix this MailChimp API error in Node.js?
{
type: 'http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/',
title: 'Invalid Resource',
status: 400,
detail: "The resource submitted could not be validated. For field-specific details, see the 'errors' array.",
instance: '95a2824e-4f30-4ce4-8c5e-322859d933e4',
errors: [
{
field: 'members.item:0.status',
message: 'Data presented is not one of the accepted values: subscribed, unsubscribed, cleaned, pending.'
}
]
}
推荐答案
Node应用程序试图执行的API调用是什么?看起来它试图将成员添加到列表,因此假设您正在发出此请求 POST/lists/{list_id}/members
What is the API call the Node app is trying to do? Looks like its trying to add a member to a list, so assuming you are making this request POST /lists/{list_id}/members
正文中的必填字段必须为:
The required fields in the body needs to be:
{
"email_address": "",
"status": ""
}
基于错误消息,您没有在POST请求中传递状态.可能的值如下:已订阅",未订阅",已清理",待处理"或交易".
Based on the error message, you are not passing in a status in the POST request. Possible values are the following: "subscribed", "unsubscribed", "cleaned", "pending", or "transactional".
这篇关于有没有办法解决节点中的Mailchimp API错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文