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

          Masuk log Menu navigasi

          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

          Старые Смолеговицы Содержание История | География | Демография | Достопримечательности | Примечания | НавигацияHGЯOLHGЯOL41 206 832 01641 606 406 141Административно-территориальное деление Ленинградской области«Переписная оброчная книга Водской пятины 1500 года», С. 793«Карта Ингерманландии: Ивангорода, Яма, Копорья, Нотеборга», по материалам 1676 г.«Генеральная карта провинции Ингерманландии» Э. Белинга и А. Андерсина, 1704 г., составлена по материалам 1678 г.«Географический чертёж над Ижорскою землей со своими городами» Адриана Шонбека 1705 г.Новая и достоверная всей Ингерманландии ланткарта. Грав. А. Ростовцев. СПб., 1727 г.Топографическая карта Санкт-Петербургской губернии. 5-и верстка. Шуберт. 1834 г.Описание Санкт-Петербургской губернии по уездам и станамСпецкарта западной части России Ф. Ф. Шуберта. 1844 г.Алфавитный список селений по уездам и станам С.-Петербургской губернииСписки населённых мест Российской Империи, составленные и издаваемые центральным статистическим комитетом министерства внутренних дел. XXXVII. Санкт-Петербургская губерния. По состоянию на 1862 год. СПб. 1864. С. 203Материалы по статистике народного хозяйства в С.-Петербургской губернии. Вып. IX. Частновладельческое хозяйство в Ямбургском уезде. СПб, 1888, С. 146, С. 2, 7, 54Положение о гербе муниципального образования Курское сельское поселениеСправочник истории административно-территориального деления Ленинградской области.Топографическая карта Ленинградской области, квадрат О-35-23-В (Хотыницы), 1930 г.АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1933, С. 27, 198АрхивированоАдминистративно-экономический справочник по Ленинградской области. — Л., 1936, с. 219АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1966, с. 175АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1973, С. 180АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1990, ISBN 5-289-00612-5, С. 38АрхивированоАдминистративно-территориальное деление Ленинградской области. — СПб., 2007, с. 60АрхивированоКоряков Юрий База данных «Этно-языковой состав населённых пунктов России». Ленинградская область.Административно-территориальное деление Ленинградской области. — СПб, 1997, ISBN 5-86153-055-6, С. 41АрхивированоКультовый комплекс Старые Смолеговицы // Электронная энциклопедия ЭрмитажаПроблемы выявления, изучения и сохранения культовых комплексов с каменными крестами: по материалам работ 2016-2017 гг. в Ленинградской области