我正在尝试实施shopify checkout api以获取更新结帐数据。 在这里从https://help.shopify.com/api/tutorials/sell-through-the-checkout-api#updating-a-checkout获取参考代码。还增加了“在线商店”销售渠道,以支持结账api。
我正在向我的开发商店发送POST请求。 https://chocolakapp.myshopify.com/admin/checkouts/06c0799cd31754a75e503a4a7b50166f.json
POST https://chocolakapp.myshopify.com/admin/checkouts/06c0799cd31754a75e503a4a7b50166f.json
X-Shopify-Access-Token: my private app token
Accept: application/json
Accept-encoding: charset=utf-8
Content-Type: application/json
{
"checkout":{
"shipping_address": {
"first_name": "John",
"last_name": "Smith",
"address1": "126 York St.",
"city": "Ottawa",
"province_code": "ON",
"country_code": "CA",
"phone": "1234567890",
"zip": "K1N 5T5"
}
}
}
但它给了我回复:
406不可接受
我也尝试过Put请求:
PUT https://chocolakapp.myshopify.com/admin/checkouts/06c0799cd31754a75e503a4a7b50166f.json
X-Shopify-Access-Token: My private app token
Accept: application/json
Accept-encoding: charset=utf-8
Content-Type: application/json
{
"checkout":{
"shipping_address": {
"first_name": "John",
"last_name": "Smith",
"address1": "126 York St.",
"city": "Ottawa",
"province_code": "ON",
"country_code": "CA",
"phone": "1234567890",
"zip": "K1N 5T5"
}
}
}
回应是:
404 Not Found
任何人都可以帮助我。
谢谢,