curl --request POST 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'tools_icon=@"/path/to/icon.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['tools_icon' => new CURLFILE('/path/to/icon.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/tools_icon/12567/670a4919b99087.png
{
"message": "Unauthenticated."
}
{
"message": "The tools icon field is required.",
"errors": {
"tools_icon": ["The tools icon field is required."]
}
}
Custom template
Upload tools icon
Upload the icon of your business’s tools widget.
POST
/
business
/
template
/
upload-tools-icon
/
{business_id}
curl --request POST 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'tools_icon=@"/path/to/icon.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['tools_icon' => new CURLFILE('/path/to/icon.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/tools_icon/12567/670a4919b99087.png
{
"message": "Unauthenticated."
}
{
"message": "The tools icon field is required.",
"errors": {
"tools_icon": ["The tools icon field is required."]
}
}
Uploads an icon for the tools widget and returns its storage path. Use the result as
tools_icon in Update template config.
Path parameters
integer
required
ID of the business.
Body
file
required
Icon image. Supported types:
png, jpeg, jpg, ico. Send as multipart/form-data.Response
Returns the storage path of the uploaded icon as plain text.curl --request POST 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--form 'tools_icon=@"/path/to/icon.png"'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://core.getfaceage.com/api/v1/business/template/upload-tools-icon/{business_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => ['tools_icon' => new CURLFILE('/path/to/icon.png')],
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer your_secret_key',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
storage/tools_icon/12567/670a4919b99087.png
{
"message": "Unauthenticated."
}
{
"message": "The tools icon field is required.",
"errors": {
"tools_icon": ["The tools icon field is required."]
}
}