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. Auth

Authenticate

This is authentication endpoint to authenticate users.

Authenticate User

Endpoint => /user/authenticate

POST /user/authenticate

An admin credentials will be created and shared with you once your organization has been onboarded on our portal and all KYC activities has been.

Request Body

Name
Type
Description

user_id*

String

User Id

password*

String

User Password

{
  "status": "Success",
  "description": "Login Successfull",
  "authDetails": {
    "authToken": "PBKWY4APEAQD83FBU9GZK37NGH11SUNH-168",
    "expireToken": "2023-01-27 05:06:08"
  },
  "userDetails": {
    "userID": "G-4568-3493",
    "Full Name": "King One Admin",
    "Username": "kingOneAdmin"
  },
  "orgDetails": {
    "secret-key": "T2Y629UUeiwe7fjdj838934ooosoi82398297297482992",
    "Org Full Name": "King One Enterprise"
  }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/user/authenticate',
  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 =>'{
    "user_id": "G-4568-3493",
    "password":"KingOne123#"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Good to know: Upon a successful login, the API returns the user details and the authentication details which contain your bearer token and the token's expiry date.

Please use the bearer token when making calls to other method. Also, please include secret-key in your header. The secret key identify your organization

PreviousAuthNextLogout

Last updated 2 months ago