POST /send-product-list
Envia um catálogo de produtos com até 30 produtos divididos em até 10 seções. O cliente vê uma prévia da lista e pode navegar no catálogo dentro do WhatsApp.
| Campo | Valor |
|---|---|
| URL | https://api.wevi.chat/functions/v1/send-product-list |
| Método | POST |
| Auth | Authorization: Bearer wevi_... |
| Content-Type | application/json |
| Rate limit | 60 req/min por API key |
| Plano necessário | Pro ou Ultra |
| Pré-requisito | Conexão com catalog_id configurado |
Body
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
connection_id |
string (uuid) | sim | ID da conexão WhatsApp. |
to |
string | sim | Telefone destino. |
header_text |
string | sim | Título do card. Max 60. |
body |
string | sim | Texto principal. Max 1024. |
footer |
string | não | Rodapé. Max 60. |
sections |
array | sim | Seções com produtos. Max 10 seções, 30 produtos total. |
contact_id |
string (uuid) | não | Vincula ao contato. |
idempotency_key |
string | não | Idempotência. |
Limites por seção:
section.titleobrigatório, max 24 chars.section.product_itemsarray de{ product_retailer_id }.
Exemplo
curl -X POST https://api.wevi.chat/functions/v1/send-product-list \
-H "Authorization: Bearer wevi_abc..." \
-H "Content-Type: application/json" \
-d '{
"connection_id": "conn-uuid",
"to": "+5511999999999",
"header_text": "Ofertas da semana",
"body": "Selecionamos isso pra você. Aproveite!",
"footer": "Promo válida até domingo",
"sections": [
{
"title": "Mais vendidos",
"product_items": [
{ "product_retailer_id": "SKU-1" },
{ "product_retailer_id": "SKU-2" },
{ "product_retailer_id": "SKU-3" }
]
},
{
"title": "Promoção",
"product_items": [
{ "product_retailer_id": "SKU-10" },
{ "product_retailer_id": "SKU-11" }
]
}
]
}'
await fetch("https://api.wevi.chat/functions/v1/send-product-list", {
method: "POST",
headers: { "Authorization": "Bearer wevi_abc...", "Content-Type": "application/json" },
body: JSON.stringify({
connection_id: "conn-uuid",
to: "+5511999999999",
header_text: "Ofertas da semana",
body: "Selecionamos isso pra você.",
sections: [
{ title: "Mais vendidos", product_items: [{ product_retailer_id: "SKU-1" }, { product_retailer_id: "SKU-2" }] },
{ title: "Promoção", product_items: [{ product_retailer_id: "SKU-10" }] },
],
}),
});
Resposta
Sucesso (200)
{ "id": "envio-uuid", "wamid": "wamid.HBgN...", "status": "sent" }
Erros principais
| Status | error |
|---|---|
| 400 | header_text is required, body is required, 'sections' must be a non-empty array |
| 400 | max 10 sections, max 30 products across all sections, section.title max 24 chars |
| 401 | Invalid API key |
| 403 | catalog_not_configured |
| 404 | Connection not found |
Pra produto único
Use `POST /send-product`.
Próximo
/send-conversation-message