Atualizar Configurações de Comércio
curl --request POST \
--url https://apis.vectalk.com.br/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_cart_enabled": true,
"is_catalog_visible": true
}
'import requests
url = "https://apis.vectalk.com.br/catalog"
payload = {
"is_cart_enabled": True,
"is_catalog_visible": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_cart_enabled: true, is_catalog_visible: true})
};
fetch('https://apis.vectalk.com.br/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.vectalk.com.br/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'is_cart_enabled' => true,
'is_catalog_visible' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apis.vectalk.com.br/catalog"
payload := strings.NewReader("{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://apis.vectalk.com.br/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.vectalk.com.br/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}"
response = http.request(request)
puts response.read_bodyCatálogo
Atualizar Configurações de Comércio
Atualiza as configurações de comércio do WhatsApp para um número de telefone Business, controlando a visibilidade do catálogo e a funcionalidade de carrinho.
POST
/
catalog
Atualizar Configurações de Comércio
curl --request POST \
--url https://apis.vectalk.com.br/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_cart_enabled": true,
"is_catalog_visible": true
}
'import requests
url = "https://apis.vectalk.com.br/catalog"
payload = {
"is_cart_enabled": True,
"is_catalog_visible": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_cart_enabled: true, is_catalog_visible: true})
};
fetch('https://apis.vectalk.com.br/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.vectalk.com.br/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'is_cart_enabled' => true,
'is_catalog_visible' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apis.vectalk.com.br/catalog"
payload := strings.NewReader("{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://apis.vectalk.com.br/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.vectalk.com.br/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_cart_enabled\": true,\n \"is_catalog_visible\": true\n}"
response = http.request(request)
puts response.read_bodyRequer token de instância associado ao número de telefone. O número é resolvido automaticamente pelo token — não é necessário informar o
phone-number-id.Parâmetros
Body
boolean
Define se os usuários podem adicionar produtos ao carrinho diretamente pelo WhatsApp.
true para ativar, false para desativar.boolean
Define se o catálogo de produtos é exibido no perfil do número de telefone.
true para tornar visível, false para ocultar.Resposta
{
"success": true
}
⌘I