Search

This endpoint allows you spool your orders.

Search Order

POST /orders/search

Headers

Request Body

{
  "status": "Success",
  "description": "Order Fetched Successfully",
  "orders": {
    "current_page": 1,
    "data": [
      {
        "orderNo": "O41027012333",
        "recipientName": "Femi",
        "recipientEmail": "",
        "recipientAddress": "Idumota",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:46:33",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      },
      {
        "orderNo": "JN7327012333",
        "recipientName": "Femi2",
        "recipientEmail": "",
        "recipientAddress": "Idumota3",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:46:33",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      },
      {
        "orderNo": "9KDT27012348",
        "recipientName": "Femi",
        "recipientEmail": "",
        "recipientAddress": "Idumota",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:46:48",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      },
      {
        "orderNo": "M7W727012349",
        "recipientName": "Femi2",
        "recipientEmail": "",
        "recipientAddress": "Idumota3",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:46:49",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      },
      {
        "orderNo": "JHAZ27012319",
        "recipientName": "Femi2",
        "recipientEmail": "",
        "recipientAddress": "Idumota3",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:47:19",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      },
      {
        "orderNo": "333R27012331",
        "recipientName": "Femi",
        "recipientEmail": "",
        "recipientAddress": "Idumota",
        "recipientPhone": "08000000000000",
        "orderStatus": "Pending Pick-Up",
        "statusDescription": null,
        "cost": "900",
        "createdBy": "C-39006-611",
        "OrgRep": "G-ylNt-c7xD",
        "orderDate": "2023-01-27 02:53:31",
        "pickUpDate": "0000-00-00 00:00:00",
        "dispatchDate": null,
        "deliveryDate": null,
        "returnReason": null,
        "returnDate": null
      }
    ],
    "first_page_url": "https://apisandbox.fezdelivery.co/v1/orders/search?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://apisandbox.fezdelivery.co/v1/orders/search?page=1",
    "next_page_url": null,
    "path": "https://apisandbox.fezdelivery.co/v1/orders/search",
    "per_page": 50,
    "prev_page_url": null,
    "to": 6,
    "total": 6
  }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/orders/search',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "startDate":"2019-08-26",
    "endDate":"2023-10-10"
}',
  CURLOPT_HTTPHEADER => array(
    'secret-key: {{Your Secret key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

The startDate and endDate is based on order Date.

Last updated