这是我输入的json
{
"id": "11378",
"customer": {
"id": "112",
"email_address": "freddie@freddiesjokes.com",
"opt_in_status": true,
"company": "SKU projects",
"first_name": "firstname",
"last_name": "lastname",
"orders_count": 0,
"total_spent": 0,
"address": {
"address1": "675 Ponce de Leon Ave NE",
"address2": "Suite 5000",
"city": "Atlanta",
"province": "GA",
"province_code": "30033",
"country_code": ""
}
},
"campaign_id": "7d613b7b31",
"checkout_url": "skuprojectsstg.prod.acquia-sites.com\/cart\/?checkout=11378",
"currency_code": "USD",
"order_total": 260,
"tax_total": 0,
"lines": [{
"id": "45196",
"product_id": "FWAX015",
"product_title": "Waxed Canvas Bucket Bag",
"product_variant_id": "FWAX015",
"product_variant_title": "Waxed Canvas Bucket Bag",
"quantity": 1,
"price": 0
}]
}
以下JSON是在运行执行curl curl_setopt的PHP代码时($ ch,CURLOPT_URL,' https://us15.api.mailchimp.com/3.0/ecommerce/stores/SKU/carts');
{"输入":" http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","标题":"错误请求"," status":400," detail":"此列表的帐户中不存在具有提供的ID的产品。"," instance": ""}
请帮忙!!怎么解决这个?需要添加什么?
答案 0 :(得分:0)
错误消息显示"具有提供的ID的产品不存在"。
在尝试提出此请求之前,您是否已在单独的通话中创建此产品?如果您对具有该ID的产品执行简单的GET请求会发生什么?
我正在使用API v3.0将电子商务添加到我们的购物车中,并且在发送购物车/订单数据之前我创建了所有产品 - 当您制作购物车时,它不会自动为您创建它们。