You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when viewing (drilling down to) the shipment detail record via the admin site as an admin user, the detail display gets garbled. It seems that it's missing some sort of header for the display not to render properly.
This does not happen if the shipment record was added manually via the admin control panel.
Would anyone have any idea what might be causing this? Am I missing some shipment elements to pass in the API call? According to the docs, I'm already passing more than the required data elements.
Figured out what I did wrong. I wasn't using the correct primary key for the line table for the order_item_id element.
It is a bit strange that the API considers it a successful transaction since it expects both order_id and order_item_id, but does not seem to perform any verification of the association between them at all.
On M2 Community v2.0.6
Steps to reproduce
POST: https://m2dev.mydomain.com/index.php/rest/V1/shipment/
{
"entity": {
"order_id": "3"
,"items": [{
"order_item_id": "1"
,"qty": "2"
,"description": "test-20160612-2"
,"sku": "SPCTOOL"
}]
}
}
Expected result (REST response):
{"created_at":"2016-06-12 22:07:10","entity_id":17,"increment_id":"SHI-000000003","order_id":3,"packages":[],"updated_at":"2016-06-12 22:07:10","items":[{"entity_id":17,"order_item_id":1,"parent_id":17,"qty":1,"sku":"SPCTOOL"}],"tracks":[],"comments":null}
However, when viewing (drilling down to) the shipment detail record via the admin site as an admin user, the detail display gets garbled. It seems that it's missing some sort of header for the display not to render properly.
This does not happen if the shipment record was added manually via the admin control panel.
Would anyone have any idea what might be causing this? Am I missing some shipment elements to pass in the API call? According to the docs, I'm already passing more than the required data elements.
Thanks!
ipekerti
shipment-detail-garbled.pdf
shipment-detail-ok-when-added-manually.pdf
The text was updated successfully, but these errors were encountered: