Magento 2 V1/Shipment API getParentItem on nullShipment 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
Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?
How to make money from a browser who sees 5 seconds into the future of any web page?
Why is the Sun approximated as a black body at ~ 5800 K?
Can I say "fingers" when referring to toes?
How do I tell my boss that I'm quitting soon, especially given that a colleague just left this week
Why is so much work done on numerical verification of the Riemann Hypothesis?
"before" and "want" for the same systemd service?
Is it necessary to use pronouns with the verb "essere"?
What does "Scientists rise up against statistical significance" mean? (Comment in Nature)
How can ping know if my host is down
The IT department bottlenecks progress, how should I handle this?
C++ check if statement can be evaluated constexpr
Are Captain Marvel's powers affected by Thanos breaking the Tesseract and claiming the stone?
Delete multiple columns using awk or sed
Which was the first story featuring espers?
Review your own paper in Mathematics
Is there a RAID 0 Equivalent for RAM?
15% tax on $7.5k earnings. Is that right?
Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?
How to preserve electronics (computers, iPads and phones) for hundreds of years
US tourist/student visa
How do I fix the group tension caused by my character stealing and possibly killing without provocation?
Has the laser at Magurele, Romania reached a tenth of the Sun's power?
What does Apple's new App Store requirement mean
Magento 2 V1/Shipment API getParentItem on null
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
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 yesterday
Juliano VargasJuliano Vargas
564522
564522
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
yesterday
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
19 hours ago
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
yesterday
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
19 hours ago
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
yesterday
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
19 hours ago
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 yesterday
HelgeBHelgeB
2,7581321
2,7581321
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
yesterday
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
19 hours ago
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
yesterday
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
19 hours ago
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
yesterday
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
yesterday
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
19 hours ago
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
19 hours ago
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