Magento 2 V1/Shipment API getParentItem on null Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Shipment confirmation email option not showingHow to create new shipment using Magento REST API?Magento Order Shipment Email not sending - Instead we are sending the Shipment Update EmailMagento 2: get shipment collection by orderGet Shipment Id while creating Shipment in Magento 1.9How we can create partial shipment programmatically using rest apiPartial ShipmentMagento 2 Cannot create shipment Rest Apicalling custom api in another custom api in Magento 2Magento2 save Custom shipment field by API

Is a self contained air-bullet cartridge feasible?

What's parked in Mil Moscow helicopter plant?

Why aren't road bicycle wheels tiny?

France's Public Holidays' Puzzle

How did Elite on the NES work?

How to translate "red flag" into Spanish?

Is there a verb for listening stealthily?

Help in K.331 Andante Grazioso

Using a map function on a 'Map' to change values

What is ls Largest Number Formed by only moving two sticks in 508?

Why does the Cisco show run command not show the full version, while the show version command does?

Mechanism of the formation of peracetic acid

Retract an already submitted recommendation letter (written for an undergrad student)

Page Layouts : 1 column , 2 columns-left , 2 columns-right , 3 column

Contradiction:Maximum Power Transfer and High resistance of load

What *exactly* is electrical current, voltage, and resistance?

Overhanging vertical bars in tabular

Trumpet valves, lengths, and pitch

Co-worker works way more than he should

How to keep bees out of canned beverages?

Using NDEigensystem to solve the Mathieu equation

Is this homebrew racial feat, Stonehide, balanced?

AI positioning circles within an arc at equal distances and heights

Coin Game with infinite paradox



Magento 2 V1/Shipment API getParentItem on null



Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Shipment confirmation email option not showingHow to create new shipment using Magento REST API?Magento Order Shipment Email not sending - Instead we are sending the Shipment Update EmailMagento 2: get shipment collection by orderGet Shipment Id while creating Shipment in Magento 1.9How we can create partial shipment programmatically using rest apiPartial ShipmentMagento 2 Cannot create shipment Rest Apicalling custom api in another custom api in Magento 2Magento2 save Custom shipment field by API



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am using postman the rest api to create shipping:



http://myMagento/rest/default/V1/shipment



POST:




"entity":
"order_id": 5873,
"shipment_status": 1,
"store_id": 1,
"total_qty": 3,
"items": [

"parent_id": 5873,
"price": 4.99,
"product_id": 3964,
"row_total": 3.49,
"sku": "2457-0000",
"weight": 1.25,
"order_item_id": 3964,
"qty": 3

],
"tracks": [

"order_id": 5873,
"weight": 1.25,
"qty": 3,
"description": "Tracking Updated",
"track_number": "123456",
"title": "DHL",
"carrier_code": "DHL"

],
"comments": [

"is_customer_notified": 1,
"comment": "Order Completed",
"is_visible_on_front": 1

]




Can someone help with the above it creates the shipping fine but when click action view the error shows:
Is this something to do with parent_id inside items ? what would be the parent_id here?



Fatal error: Uncaught Error: Call to a member function getParentItem() 
on null in
.../vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml:19









share|improve this question




























    1















    I am using postman the rest api to create shipping:



    http://myMagento/rest/default/V1/shipment



    POST:




    "entity":
    "order_id": 5873,
    "shipment_status": 1,
    "store_id": 1,
    "total_qty": 3,
    "items": [

    "parent_id": 5873,
    "price": 4.99,
    "product_id": 3964,
    "row_total": 3.49,
    "sku": "2457-0000",
    "weight": 1.25,
    "order_item_id": 3964,
    "qty": 3

    ],
    "tracks": [

    "order_id": 5873,
    "weight": 1.25,
    "qty": 3,
    "description": "Tracking Updated",
    "track_number": "123456",
    "title": "DHL",
    "carrier_code": "DHL"

    ],
    "comments": [

    "is_customer_notified": 1,
    "comment": "Order Completed",
    "is_visible_on_front": 1

    ]




    Can someone help with the above it creates the shipping fine but when click action view the error shows:
    Is this something to do with parent_id inside items ? what would be the parent_id here?



    Fatal error: Uncaught Error: Call to a member function getParentItem() 
    on null in
    .../vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml:19









    share|improve this question
























      1












      1








      1








      I am using postman the rest api to create shipping:



      http://myMagento/rest/default/V1/shipment



      POST:




      "entity":
      "order_id": 5873,
      "shipment_status": 1,
      "store_id": 1,
      "total_qty": 3,
      "items": [

      "parent_id": 5873,
      "price": 4.99,
      "product_id": 3964,
      "row_total": 3.49,
      "sku": "2457-0000",
      "weight": 1.25,
      "order_item_id": 3964,
      "qty": 3

      ],
      "tracks": [

      "order_id": 5873,
      "weight": 1.25,
      "qty": 3,
      "description": "Tracking Updated",
      "track_number": "123456",
      "title": "DHL",
      "carrier_code": "DHL"

      ],
      "comments": [

      "is_customer_notified": 1,
      "comment": "Order Completed",
      "is_visible_on_front": 1

      ]




      Can someone help with the above it creates the shipping fine but when click action view the error shows:
      Is this something to do with parent_id inside items ? what would be the parent_id here?



      Fatal error: Uncaught Error: Call to a member function getParentItem() 
      on null in
      .../vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml:19









      share|improve this question














      I am using postman the rest api to create shipping:



      http://myMagento/rest/default/V1/shipment



      POST:




      "entity":
      "order_id": 5873,
      "shipment_status": 1,
      "store_id": 1,
      "total_qty": 3,
      "items": [

      "parent_id": 5873,
      "price": 4.99,
      "product_id": 3964,
      "row_total": 3.49,
      "sku": "2457-0000",
      "weight": 1.25,
      "order_item_id": 3964,
      "qty": 3

      ],
      "tracks": [

      "order_id": 5873,
      "weight": 1.25,
      "qty": 3,
      "description": "Tracking Updated",
      "track_number": "123456",
      "title": "DHL",
      "carrier_code": "DHL"

      ],
      "comments": [

      "is_customer_notified": 1,
      "comment": "Order Completed",
      "is_visible_on_front": 1

      ]




      Can someone help with the above it creates the shipping fine but when click action view the error shows:
      Is this something to do with parent_id inside items ? what would be the parent_id here?



      Fatal error: Uncaught Error: Call to a member function getParentItem() 
      on null in
      .../vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml:19






      orders magento2.2.2 rest-api shipment






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 20 at 17:24









      Juliano VargasJuliano Vargas

      606523




      606523




















          1 Answer
          1






          active

          oldest

          votes


















          1














          The parent_id of the shipment item is the entity_id of the shipment and if I understand you correctly you create a new shipment with this request. So you can't now the entity_id of the newly created shipment at that time.



          I would suggest to remove the parent_id from the item. The only required fields in the API documentation inside the items array are order_item_id and qty - everything else is optional. I guess the other fields like sku, price etc. will anyway be taken from the corresponding order_item.






          share|improve this answer























          • Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

            – Juliano Vargas
            Mar 20 at 21:07












          • That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

            – HelgeB
            Mar 21 at 5:32











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266742%2fmagento-2-v1-shipment-api-getparentitem-on-null%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          The parent_id of the shipment item is the entity_id of the shipment and if I understand you correctly you create a new shipment with this request. So you can't now the entity_id of the newly created shipment at that time.



          I would suggest to remove the parent_id from the item. The only required fields in the API documentation inside the items array are order_item_id and qty - everything else is optional. I guess the other fields like sku, price etc. will anyway be taken from the corresponding order_item.






          share|improve this answer























          • Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

            – Juliano Vargas
            Mar 20 at 21:07












          • That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

            – HelgeB
            Mar 21 at 5:32















          1














          The parent_id of the shipment item is the entity_id of the shipment and if I understand you correctly you create a new shipment with this request. So you can't now the entity_id of the newly created shipment at that time.



          I would suggest to remove the parent_id from the item. The only required fields in the API documentation inside the items array are order_item_id and qty - everything else is optional. I guess the other fields like sku, price etc. will anyway be taken from the corresponding order_item.






          share|improve this answer























          • Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

            – Juliano Vargas
            Mar 20 at 21:07












          • That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

            – HelgeB
            Mar 21 at 5:32













          1












          1








          1







          The parent_id of the shipment item is the entity_id of the shipment and if I understand you correctly you create a new shipment with this request. So you can't now the entity_id of the newly created shipment at that time.



          I would suggest to remove the parent_id from the item. The only required fields in the API documentation inside the items array are order_item_id and qty - everything else is optional. I guess the other fields like sku, price etc. will anyway be taken from the corresponding order_item.






          share|improve this answer













          The parent_id of the shipment item is the entity_id of the shipment and if I understand you correctly you create a new shipment with this request. So you can't now the entity_id of the newly created shipment at that time.



          I would suggest to remove the parent_id from the item. The only required fields in the API documentation inside the items array are order_item_id and qty - everything else is optional. I guess the other fields like sku, price etc. will anyway be taken from the corresponding order_item.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 20 at 19:02









          HelgeBHelgeB

          3,4481423




          3,4481423












          • Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

            – Juliano Vargas
            Mar 20 at 21:07












          • That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

            – HelgeB
            Mar 21 at 5:32

















          • Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

            – Juliano Vargas
            Mar 20 at 21:07












          • That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

            – HelgeB
            Mar 21 at 5:32
















          Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

          – Juliano Vargas
          Mar 20 at 21:07






          Thanks I found where the problem is! the order_item_id it isn't the order_id or the product_id it should the item_id from table sales_order_item I was basically trying with entity_id from sales_order table which isn't right and yes you are right you don't need to send all the detail but some fields in the shipping grid like ship-to-name wont show.

          – Juliano Vargas
          Mar 20 at 21:07














          That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

          – HelgeB
          Mar 21 at 5:32





          That's right, from your question I didn't realize that it's not clear to you that the order_item_id is the id of the order item and not of the order :-). But you have anyway to remove the parent_id otherwise you will have strange data constellations.

          – HelgeB
          Mar 21 at 5:32

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266742%2fmagento-2-v1-shipment-api-getparentitem-on-null%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

          Masuk log Menu navigasi

          อาณาจักร (ชีววิทยา) ดูเพิ่ม อ้างอิง รายการเลือกการนำทาง10.1086/39456810.5962/bhl.title.447410.1126/science.163.3863.150576276010.1007/BF01796092408502"Phylogenetic structure of the prokaryotic domain: the primary kingdoms"10.1073/pnas.74.11.5088432104270744"Towards a natural system of organisms: proposal for the domains Archaea, Bacteria, and Eucarya"1990PNAS...87.4576W10.1073/pnas.87.12.4576541592112744PubMedJump the queueexpand by handPubMedJump the queueexpand by handPubMedJump the queueexpand by hand"A revised six-kingdom system of life"10.1111/j.1469-185X.1998.tb00030.x9809012"Only six kingdoms of life"10.1098/rspb.2004.2705169172415306349"Kingdoms Protozoa and Chromista and the eozoan root of the eukaryotic tree"10.1098/rsbl.2009.0948288006020031978เพิ่มข้อมูล