Description

API authentication for the company

Headers

Authorization

Parameters

secret required, type: string

The secret for authenticaticating the user login.

Example Request

{
                      "secret": "************"
                  
}

Example Response

{      
  
"vendor_id"1,</br>
   "vendor_name""nutrichoice",    </br>
   
"vendor_company_name"null,   </br>
    
"vendor_email"null,    </br>    "vendor_company_email""bcp@gmail.com",  </br>
     
"state""Active",    </br>   
 
"auth_token""eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDE5MzcwMzYsImlzcyI6Imh0dHBzOlwvXC9hcGkubnV0cmljaG9pY2UuYmlnY2l0eXZvdWNoZXIuY28uaW4iLCJhdWQiOiJodHRwczpcL1wvYXBpLm51dHJpY2hvaWNlLmJpZ2NpdHl2b3VjaGVyLmNvLmluIiwibmJmIjoxNzAxOTM3MDM2LCJleHAiOjE3MDIwMjM0MzYsImRhdGEiOnsiY29tcGFueV9uYW1lIjoibnV0cmljaG9pY2UiLCJhcGlfa2V5IjoibE9WRW1wNkhHN0w2Qm9BN0szRlwvT0tBVmpuY0J3OFhhUXVXT0NlQk9kKzZpKzhGWXBSemtybXJzTzBxK256cEZHV0pqRVVIbGMyeGNPb3JieE5YNVk2bnNsSzBLRmJzMVV6ZFYrUFpDdHdpSHozcDRZd1BDZmJHZEVIdyszUUc5R0doNCs3d0ExTUhyTEdRWnNVN3p5emE5bXJwZXVkN2jM0j4phM6xE",   </br>   
   
"created_at""2023-03-08 15:28:12",  </br>  
    
"updated_at""2023-12-04 11:24:42",   </br>
     
"last_logged_in""2023-12-07 13:47:16",    </br>    "token_expiry""2023-12-08 13:47:16",    </br>
    
"credit_balance""0"    
}

Example Of Failuer Response

{

        "name": "Bad Request",

        "message": "Could not authenticate you",

        "code": 0,

        "status": 400,

        "type": "yii\\web\\HttpException"

    }