Atualizar o perfil comercial
curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": true
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}Atualizar o perfil comercial
Atualização parcial: só os campos enviados mudam (website: [] / categories: [] limpam). business_hours.config[].open_time/close_time são HH:MM no timezone informado. Os ids de categories são os que aparecem em categories[].id de qualquer perfil comercial.
Best effort. O WhatsApp não tem API pública de catálogo para dispositivos vinculados: o Wabox fala o mesmo protocolo que o WhatsApp Web usa, e ele pode mudar sem aviso. Escrever no catálogo exige uma conta WhatsApp Business.
Imediata: exige a instância conectada (caso contrário, 409 instance_not_connected).
PUT
/
instances
/
{instance_id}
/
token
/
{token}
/
business
/
profile
Atualizar o perfil comercial
curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/business/profile"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": true
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}Path Parameters
Id da instância (dashboard › instância › Credenciais).
Token da instância. Trate como senha.
Body
application/json
Maximum string length:
512Maximum string length:
256Maximum string length:
128Maximum array length:
2Maximum string length:
256Maximum array length:
3Minimum string length:
1Show child attributes
Show child attributes
Response
Perfil atualizado.