Fez Business API
  • Introduction
  • API ENDPOINTS
    • Auth
      • Authenticate
      • Logout
      • Change Password
    • Orders
      • Create
      • Get
      • Update
      • Delete
      • Search
      • Search via Waybill Number
      • Status With Date Range
      • Fetch Delivery Cost
      • Track
      • Delivery Time Estimate
    • International Orders
      • Create Import Order
      • Import Items Categories
      • Import Locations
      • Import Delivery Cost
      • Export Locations
      • Create Export Order
      • Export Delivery Cost
    • Users
      • Create
      • Get All
      • Delete
    • Locker
      • Get All
      • Check Availability
    • Webhook
      • Register Order Webhook
      • Order Webhook Request
Powered by GitBook
On this page
  1. API ENDPOINTS
  2. Orders

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

Name
Type
Description

Authorization *

String

Your Bearer Token

secret-key*

String

Your Secret Key

Request Body

Name
Type
Description

recipientAddress

String

Recipient Address (Delivery destination)

recipientState

String

Must be any of the 36 states or FCT

recipientName

String

Recipient Name

recipientPhone

String

Recipient Phone or Mobile number

orderNo*

String

Order number

{
  "status": "Success",
  "description": "Update Batch Request Processed",
  "Response": {
    "37P727012321": "Order Successfully Updated",
    "JHAZ27012319": "Order Successfully Updated"
  }
}
{
    "status": "Error",
    "description": "Organization Secret Key is Required"
}
<?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.

PreviousGetNextDelete

Last updated 1 year ago