curl --request POST 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'logo=@"/path/to/logo.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['logo' => new CURLFILE('/path/to/logo.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/logo/1245/670a365bb0dg6adc.png
{
"message": "Unauthenticated."
}
{
"message": "The logo field is required.",
"errors": {
"logo": ["The logo field is required."]
}
}
Business management
Upload a logo
Upload a logo image for your business.
POST
/
business
/
upload-logo
/
{business_id}
curl --request POST 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'logo=@"/path/to/logo.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['logo' => new CURLFILE('/path/to/logo.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/logo/1245/670a365bb0dg6adc.png
{
"message": "Unauthenticated."
}
{
"message": "The logo field is required.",
"errors": {
"logo": ["The logo field is required."]
}
}
Uploads a logo and returns its storage path. Pass that path as the
logo parameter when you create or update a business.
Path parameters
integer
required
ID of the business.
Body
file
required
Logo image. Supported types:
png, jpeg, jpg, ico. Send as multipart/form-data.Response
Returns the storage path of the uploaded logo as plain text.curl --request POST 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'logo=@"/path/to/logo.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/upload-logo/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['logo' => new CURLFILE('/path/to/logo.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/logo/1245/670a365bb0dg6adc.png
{
"message": "Unauthenticated."
}
{
"message": "The logo field is required.",
"errors": {
"logo": ["The logo field is required."]
}
}