I am passing data to update tracking code :
$userData = [
"entity" => [
"paymentStatusId" => 10
"orderStatusId" => 8
"tracking_code" => "237948723894789234"
"comment" => "Neuer Kommentar"
"transactionId" => 0
]
]
$client->put('rest/V1/orders/46',$userData);
But it's returning below response. Please help me in passing the data for update tracking number or any order fields.
Error:
[2017-01-13 09:48:32] main.CRITICAL: exception 'LogicException'
with message 'Property "PaymentStatusId" does not have corresponding
setter in class "Magento\Sales\Api\Data\OrderAddressInterface".' in
/var/www/html/m2/vendor/magento/framework/Reflection/NameFinder.php:100
Stack trace:
Best Answer
Go to http://devdocs.magento.com/swagger/ > salesShipmentTrackRepositoryV1
JSON:
parent_id
: is the foreign key fromsales_shipment
table.entity_id
(optional): is the entity id ofsales_shipment_track
table.custom
), DHL (dhl
), Federal Express (fedex
), etc..You can take a look some tables:
sales_shipment
,sales_shipment_track
.UPDATE SHIPMENT TRACK CODE:
CREATE NEW SHIPMENT TRACK: If we want to create the new shipment track, we need to remove
entity_id
param.