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;
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
add a comment |
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
add a comment |
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
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
orders magento2.2.2 rest-api shipment
asked Mar 20 at 17:24
Juliano VargasJuliano Vargas
606523
606523
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
Thanks I found where the problem is! theorder_item_id
it isn't theorder_id
or theproduct_id
it should theitem_id
from tablesales_order_item
I was basically trying withentity_id
fromsales_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 likeship-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 theorder_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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Thanks I found where the problem is! theorder_item_id
it isn't theorder_id
or theproduct_id
it should theitem_id
from tablesales_order_item
I was basically trying withentity_id
fromsales_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 likeship-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 theorder_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
add a comment |
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.
Thanks I found where the problem is! theorder_item_id
it isn't theorder_id
or theproduct_id
it should theitem_id
from tablesales_order_item
I was basically trying withentity_id
fromsales_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 likeship-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 theorder_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
add a comment |
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.
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.
answered Mar 20 at 19:02
HelgeBHelgeB
3,4481423
3,4481423
Thanks I found where the problem is! theorder_item_id
it isn't theorder_id
or theproduct_id
it should theitem_id
from tablesales_order_item
I was basically trying withentity_id
fromsales_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 likeship-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 theorder_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
add a comment |
Thanks I found where the problem is! theorder_item_id
it isn't theorder_id
or theproduct_id
it should theitem_id
from tablesales_order_item
I was basically trying withentity_id
fromsales_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 likeship-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 theorder_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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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