drn34916 2015-08-31 08:01
浏览 126

{“line_items”:“必需参数缺失或无效”}

I am using Shopiy API for fulfill the order in PHP platform. When I try to fulfill the order, I can able to complete and getting a success response fron Shopify. If I pass line_items params then I am getting

{"line_items":"Required parameter missing or invalid"}

Can any one help me to figure out the issue.

<?php
require_once("inc/functions.php");
$shop = "my-store";
$fulfilment = array("fulfillment" => array ("tracking_number" =>"123456789",
                                            "tracking_company" => "FedEx",
                                            "line_items"=>array(array("id"=>2143139779))));
$response = shopify_call('accesstoken', $shop, "/admin/orders/1123553027/fulfillments.json", $fulfilment, 'POST');  
print_r($response);
?>
  • 写回答

1条回答 默认 最新

  • dongmeng1875 2015-08-31 15:56
    关注

    You need a quantity for each line item.

    e.g.

    "line_items" => array(
        array("id" => 12345, "quantity" => 1),
    
    评论

报告相同问题?

悬赏问题

  • ¥15 github符合条件20分钟秒到账,github空投 提供github账号可兑换💰感兴趣的可以找我交流一下
  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?