Upload a logo for a Business


Upload Logo

The Upload Logo API provides an ability to upload a logo for your business.


Request and Headers

<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}',
  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 => array('logo'=> new CURLFILE('/home/Pictures/DYJfvQKmI4dQzrf.png')),
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer your_secret_key'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Body Parameters

logo :

This field is required and must be a type of png,jpeg,jpg,ico.


Response

Upon successful creation, the endpoint returns a directory that you have to place it in the create or update business api.

{success} Response 200

storage/logo/1245/670a365bb0dg6adc.png


{warning} Response 401 : Unauthorized

{
    "message": "Unauthenticated."
}


{warning} Response 422 : Upload wrong logo error

{
     "message": "The logo field is required.",
    "errors": {
        "logo": [
            "The logo field is required."
        ]
    }
}