cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.1 - Integration for processing shipment fails

Magento 2.3.1 - Integration for processing shipment fails

For one of our customers we have recently started having problems using the call to /order/<id>/ship. Possibly connected to them updating their Magento version:

POST https://www.cardshop.no/rest/V1/order/1791/ship

 

{

  "items": [

    {

      "order_item_id": 4557,

      "qty": 1

    },

    {

      "order_item_id": 4558,

      "qty": 1

    }

  ],

  "notify": true,

  "appendComment": false,

  "comment": {

    "comment": "Order handled by Ongoing",

    "is_visible_on_front": 0

  },

  "tracks": [

    {

      "track_number": "73325389922959444",

      "title": "PostNord NO MyPack Collect",

      "carrier_code": "custom"

    },

    {

      "track_number": "373325381938176472",

      "title": "PostNord NO MyPack Collect",

      "carrier_code": "custom"

    }

  ]

}

 

The response we get is the following:

{

  "message": "Could not save a shipment, see error log for details",

  "trace": "#0 [internal function]: Magento\\Sales\\Model\\ShipOrder->execute(1791, Array, true, false, Object(Magento\\Sales\\Model\\Order\\Shipment\\CommentCreation), Array, Array, NULL)\n#1 /var/www/html/cardshop/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#2 /var/www/html/cardshop/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#3 /var/www/html/cardshop/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#4 /var/www/html/cardshop/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#5 /var/www/html/cardshop/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#6 /var/www/html/cardshop/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins('dispatch', Array, Array)\n#7 /var/www/html/cardshop/vendor/magento/framework/App/Http.php(136): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#8 /var/www/html/cardshop/vendor/magento/framework/App/Bootstrap.php(258): Magento\\Framework\\App\\Http->launch()\n#9 /var/www/html/cardshop/pub/index.php(40): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#10 {main}"

}

1 REPLY 1

Re: Magento 2.3.1 - Integration for processing shipment fails

Getting same issue while posting the data using {host}/rest/V1/shipment/ API