I want to update order status to complete using webapi
here is my testing code :
$data = array (
'entity' =>
array (
'entity_id' => $id,
'status' => 'complete',
),
);
$this->generateApiToken();
$ch = curl_init("https://$this->link/rest/V1/orders/");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type: application/json",
"Authorization: Bearer " . json_decode($this->token) ));
$cusJsonData = curl_exec($ch);
and when this code runs, the status updated correctly , but the increment_id changed.
Can anyone help me with this problem?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)