cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update tracking number, carrier code and title through REST API ?

Unable to update tracking number, carrier code and title through REST API ?

My magento version is 2.2.2. I am using the following code:

"entity": { "orderId": 4883, "items": [ { "extension_attributes": {}, "order_item_id": "7141", "qty": "1" } ], "notify": true, "append_comment": true, "comment": { "extension_attributes": {}, "comment": "Item(s) has been shipped", "is_visible_on_front": 0 }, "tracks": [ { "extension_attributes": {}, "track_number": "028806881473805", "title": "Federal Express", "carrier_code": "fedex" } ], "packages": [ { "extension_attributes": {} } ], "arguments": { "extension_attributes": {} } } }

URL is: 'https://'.$_SERVER['HTTP_HOST'].'/index.php/rest/V1/order/'.$entity_id.'/ship/';

 

In my case, before running the above script the order status at magento admin site is under 'processing'.
After running the script , that particular order status is changing to complete. However, the tracking number, carrier code and title, comment are not being updated in the admin. 

3 REPLIES 3

Re: Unable to update tracking number, carrier code and title through REST API ?

Hi @amardeeptttt,

 

Maybe this thread can be useful: https://magento.stackexchange.com/a/154774

 

 

Re: Unable to update tracking number, carrier code and title through REST API ?

It worked. Thank you for the reply.

Re: Unable to update tracking number, carrier code and title through REST API ?