致电shopify api创建结帐响应VariantID无效 [英] call shopify api Creating a checkout response variantid is invalid

查看:77
本文介绍了致电shopify api创建结帐响应VariantID无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我致电api创建结帐

variant_id为38894644552是正确的,但是此api响应

  variantid无效 

  1. 获取我的商店变体ID

    获取

    您将需要删除所有现有的安装程序.

    i call api Creating a checkout

    the variant_id is 38894644552 is correct ,but this api response

    variantid is is invalid
    

    1. get my shop variant id

      get https://suisui.myshopify.com/admin/products/9981337608/variants.json Response: { "variants": [ { "id": 38894644552, "product_id": 9981337608,...

    2. Creating a checkout with variant id

      POST /admin/checkouts.json HTTP/1.1 Host: suisui.myshopify.com X-Shopify-Access-Token: xxx Content-Type: application/json

      { "checkout": { "lineitems": [ { "variantid": 38894644552, "quantity": 3 }

      Response:

      { "errors": { "lineitems": { "0": { "variantid": [ { "code": "invalid", "message": "is invalid", "options": {} }

    what's wrong with variantid 38894644552 ?

    Thank you~

    解决方案

    Your app must be a sales channel for this api to work,

    In Shopify Partners got to App Setup and it should look like this:

    You will need to remove all existing installations to do this.

    这篇关于致电shopify api创建结帐响应VariantID无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆