Buscar todas as etiquetas
curl --request GET \
--url https://api.wppfy.com/labels \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/labels"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/labels', 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://api.wppfy.com/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"token: <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://api.wppfy.com/labels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<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://api.wppfy.com/labels")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "l121314mnop",
"name": "Cliente VIP",
"color": 2,
"colorHex": "#fed428",
"createdAt": "2025-01-24T14:35:00.000Z"
}
]{
"error": "Failed to fetch labels from database"
}Etiquetas
Buscar todas as etiquetas
Retorna a lista completa de etiquetas da instância.
GET
/
labels
Buscar todas as etiquetas
curl --request GET \
--url https://api.wppfy.com/labels \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/labels"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/labels', 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://api.wppfy.com/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"token: <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://api.wppfy.com/labels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<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://api.wppfy.com/labels")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "l121314mnop",
"name": "Cliente VIP",
"color": 2,
"colorHex": "#fed428",
"createdAt": "2025-01-24T14:35:00.000Z"
}
]{
"error": "Failed to fetch labels from database"
}Autorizações
Resposta
Lista de etiquetas retornada com sucesso
ID único da etiqueta
Nome da etiqueta
Índice numérico da cor (0-19)
Intervalo obrigatório:
0 <= x <= 19Exemplo:
2
Cor hexadecimal correspondente ao índice
Opções disponíveis:
#ff9484, #64c4ff, #fed428, #dfaef0, #9ab6c1, #56ccb4, #fe9dfe, #d3a91f, #6f7bcf, #d8e651, #01d0e2, #ffc5c7, #92ceac, #f64847, #00a1f2, #83e421, #ffae04, #b4ebff, #9ba6ff, #9568cf Exemplo:
"#fed428"
Data de criação
