【发布时间】:2016-08-19 08:01:51
【问题描述】:
除了 POST /customers/:customer_id/addresses 之外,大多数 Magento rest api 方法对我来说都可以正常工作。
我收到以下错误:
<error>
<data_item>
<code>400</code>
<message>"Street Address" is a required value.</message>
</data_item>
<data_item>
<code>400</code>
<message>Resource data pre-validation error.</message>
</data_item>
</error>
错误很明显,地址行丢失,但我在我的 json 请求中没有发现任何错误。我刚刚将示例 XML 请求数据从他们的文档转换为 json 并在请求正文中提交。
这是我的 json 请求数据:
{
"firstname": "Johny",
"lastname": "Doe",
"city": "PA",
"region": "Palau",
"postcode": "19103",
"country_id": "US",
"telephone": "611-634-1181",
"street": {
"data_item": [
"2354 Jody Road Philadelphia",
"844 Jefferson Street; 4510 Willis Avenue"
]
}
}
如果上述请求有任何问题,请告知。
谢谢。
【问题讨论】:
标签: json xml rest magento magento-1.9