Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi, I am working on the sales channel app. For create checkout I am using checkout api. When I have update the shipping lines through checkout api, I got the below error, even shipping lines are correct. See below error
{"errors"=>{"shipping_line"=>{"base"=>[{"code"=>"invalid", "message"=>"is invalid", "options"=>{}}], "id"=>[{"code"=>"invalid", "message"=>"is invalid", "options"=>{}}]}, "shipping_rate"=>{"base"=>[{"code"=>"invalid", "message"=>"is invalid", "options"=>{}}], "id"=>[{"code"=>"invalid", "message"=>"is invalid", "options"=>{}}]}}}
I have looked for the reason for shipping line error but I couldn't able to find the reason. I want to know all the reasons of above errors when update shipping lines through checkout api. Please respond on above ASAP. Thanks
Find request and payload below
PUT: https://devsquard-2.myshopify.com/admin/api/2020-04/checkouts/b06f117efdf7057bce2faa4d5898954d.json
{:checkout=>{:line_items=>[{:variant_id=>"36612219011240", :quantity=>1}, {:variant_id=>"36612218847400", :quantity=>1}], :token=>"b06f117efdf7057bce2faa4d5898954d", :email=>"tess01@shopoff.co", :buyer_accepts_marketing=>true, :billing_address=>{:first_name=>"Claire", :last_name=>"Clark", :address1=>"325 N La Salle Dr #300", :city=>"Chicago", :province=>"Illinois", :country=>"United States", :phone=>"(980) 279-8666", :zip=>"60654"}, :shipping_line=>{:handle=>"shopify-Standard-0.00"}, :applied_discount=>{:amount=>0, :title=>"Truupit Discount Order", :description=>"Promotional item for check handle"}}}
If you're creating a checkout, you'll want to use the POST method rather than PUT. PUT can be used to update/modify an existing checkout.
To learn more visit the Shopify Help Center or the Community Blog.
Still get the error above after running this
https://gigl-test-store.myshopify.com/admin/api/2021-07/checkouts/96aedeb6047d7562798d16397396d7ca.j...