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

Create

This is the endpoint for creating an order or requesting a pick up.

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

Create Order

Endpoint => /order

POST /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

recipientEmail

Email

Recipient Email

uniqueID*

String

Any value that uniquely identifies a delivery request

BatchID*

String

Any value that identifies the request. i.e all the delivery requests in an API call should have the same Batch ID.

CustToken

String

if your organization sends a token to recipient for confirmation of receipt purpose, please include the token here.

itemDescription

String

Description of the order

additionalDetails

String

Any additional details you want us to know about the order. You can add additional recipient phone numbers or address landmark here.

valueOfItem*

String

The value of items

weight*

Integer

Weight of item in Kg (Kilogram)

pickUpState

string

Must be any of the 36 states or FCT (optional)

pickUpAddress

string

The address from which the item to be sent should be picked up from. Its Optional. If not supplied, the business address is used.

waybillNumber

string

Unique string from 3rd party logistics partners for a given order.

pickUpDate

Date

Date in which you want the order to be picked up (Optional)

isItemCod

Boolean

A boolean flag indicating if the item delivered is to be paid for at the point of delivery. its optional and its default value is false.(Optional)

cashOnDeliveryAmount

Decimal | Integer

Amount to be paid for the Item been delivered. (Optional)

fragile

Boolean

An indicator that the item to be delivered is fragile. (Default : false)

lockerID

string

The selected locker ID to deliver the item to. (Optional)

{
  "status": "Success",
  "description": "Order Successfully Created",
  "orderNos": {
    "KingOne-1234": "ASAC27012319",
    "KingOne-1235": "JHAZ27012319"
  }
}
{
    "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',
  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":"Lagos",
    "recipientName":"Femi",
    "recipientPhone":"08000000000000",
    "uniqueID":"KingOne-1234",
    "BatchID":"KingOne-1",
    "valueOfItem": "20000"
},{
    "recipientAddress":"Idumota3",
    "recipientState":"Lagos",
    "recipientName":"Femi2",
    "recipientPhone":"08000000000000",
    "uniqueID":"KingOne-1235",
    "BatchID":"KingOne-1",
    "valueOfItem": "20000"
}]',
  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.

PreviousOrdersNextGet

Last updated 1 day ago