Evolution V2
Listar plantillas
Devuelve todas las plantillas registradas para la instancia. El nombre de la instancia se toma de la ruta.
GET
/
template
/
find
/
{instance}
Listar plantillas
curl --request GET \
--url https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance} \
--header 'apikey: <api-key>'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "1234567890123456",
"name": "order_confirmation",
"language": "pt_BR",
"status": "APPROVED",
"category": "UTILITY",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Pedido {{1}}",
"example": {
"header_text": [
"#10245"
]
}
},
{
"type": "BODY",
"text": "Olá {{1}}, seu pedido {{2}} foi confirmado e será enviado em breve.",
"example": {
"body_text": [
[
"Maria",
"#10245"
]
]
}
},
{
"type": "FOOTER",
"text": "Pilot Status"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Acompanhar pedido",
"url": "https://example.com/orders/{{1}}"
},
{
"type": "QUICK_REPLY",
"text": "Falar com atendente"
}
]
}
]
},
{
"id": "9876543210987654",
"name": "verification_code",
"language": "en_US",
"status": "APPROVED",
"category": "AUTHENTICATION",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "BODY",
"text": "{{1}} is your verification code.",
"example": {
"body_text": [
[
"123456"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Copy code",
"url": "https://example.com/otp/{{1}}"
}
]
}
]
}
]{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Autorizaciones
El token de la instancia, enviado en el encabezado apikey: el token de la instancia Evolution V2 que migraste en el panel (Números → Conectar → Migrar), o el token propio de la instancia de Pilot Status; y debe pertenecer a la {instance} de la ruta. Una clave de API ps_ de Pilot Status NO se acepta (404 Instance not found). Este es el único encabezado que lee el layer Evolution V2: Authorization: Bearer y x-api-key no se aceptan, y una solicitud sin apikey recibe 401.
Parámetros de ruta
Respuesta
Éxito: cuerpo de respuesta nativo del proveedor.
¿Esta página le ayudó?
⌘I
Listar plantillas
curl --request GET \
--url https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance} \
--header 'apikey: <api-key>'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/template/find/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "1234567890123456",
"name": "order_confirmation",
"language": "pt_BR",
"status": "APPROVED",
"category": "UTILITY",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Pedido {{1}}",
"example": {
"header_text": [
"#10245"
]
}
},
{
"type": "BODY",
"text": "Olá {{1}}, seu pedido {{2}} foi confirmado e será enviado em breve.",
"example": {
"body_text": [
[
"Maria",
"#10245"
]
]
}
},
{
"type": "FOOTER",
"text": "Pilot Status"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Acompanhar pedido",
"url": "https://example.com/orders/{{1}}"
},
{
"type": "QUICK_REPLY",
"text": "Falar com atendente"
}
]
}
]
},
{
"id": "9876543210987654",
"name": "verification_code",
"language": "en_US",
"status": "APPROVED",
"category": "AUTHENTICATION",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "BODY",
"text": "{{1}} is your verification code.",
"example": {
"body_text": [
[
"123456"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Copy code",
"url": "https://example.com/otp/{{1}}"
}
]
}
]
}
]{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}