Update

This is the endpoint for updating orders. It can be used for single or multiple orders and it takes an array object.

Update Order

Endpoint => /order

PUT /order

Headers

Request Body

{
  "status": "Success",
  "description": "Update Batch Request Processed",
  "Response": {
    "37P727012321": "Order Successfully Updated",
    "JHAZ27012319": "Order Successfully Updated"
  }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/order/multiple',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'[{
    "recipientAddress":"Idumota11",
    "recipientState":"Lagos",
    "recipientName":"Femi11",
    "recipientPhone":"08059151937",
    "orderNo":"37P727012321"
},{
    "recipientAddress":"Idumota33",
    "recipientState":"Lagos",
    "recipientName":"Femi2334",
    "recipientPhone":"08059051937",
    "orderNo":"JHAZ27012319"
}]
',
  CURLOPT_HTTPHEADER => array(
    'secret-key: {{Your Secret Key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Good to know: Upon successfully creating the order, the API returns an array object that consist of the update feedback for each request.

Last updated