Create Import Order

This is the endpoint for creating an import order or requesting a pick up from a vendor/business.

This endpoint can be used for single or multiple request. It takes an array object(s).

Create Order

Endpoint => /orders/import

POST /orders/import

Headers

Request Body

{
  "status": "Success",
  "description": "Order Successfully Created",
  "orderNos": {
    "KingOne-1234": "ASAC27012319",
    "KingOne-1235": "JHAZ27012319"
  }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/orders/import',
  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 =>'[{
    "recipientAddress":"Idumota",
    "recipientState":"Kano",
    "recipientName":"Femi",
    "recipientPhone":"08000000000000",
    "uniqueID":"KingOne-1234",
    "BatchID":"KingOne-1",
    "valueOfItem": "20000",
    "importLocationId":2,
    "weight":10,
    "itemCategory": 4,
    "businessName": "Johnson&Sons",
    "orderId": "xyz001",
    "trackingId": "tsu001"
},{
    "recipientAddress":"Idumota3",
    "recipientState":"Lagos",
    "recipientName":"Femi2",
    "recipientPhone":"08000000000000",
    "uniqueID":"KingOne-1235",
    "BatchID":"KingOne-1",
    "valueOfItem": "90000",
    "importLocationId":2,
    "weight":10,
    "itemCategory": 8,
    "businessName": "Femi&Sons",
    "orderId": "xyz002",
    "trackingId": "tsu002"
}]',
  CURLOPT_HTTPHEADER => array(
    'secret_key: {{Your Secret Key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
// Some code

Good to know: By default, the name, address and phone number of your organization as set during the onboarding process is captured as the sender's name, sender's address, sender's phone number respectively. However, if you want to specify a different senders Name, senders Address and phone number, please add the following field in the request parameter

  • thirdparty: Please set to "true" i.e "thirdparty": "true".

  • senderName: The name of the sender.

  • senderAddress: The address of the sender.

  • senderPhone: The phone number of the sender.

Upon successfully creating the order, the API returns an array object that consist of the orderNo for each request.

Last updated