cURL
curl --request GET \
--url https://api.cakto.com.br/public_api/webhook/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cakto.com.br/public_api/webhook/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cakto.com.br/public_api/webhook/{id}/', 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.cakto.com.br/public_api/webhook/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/webhook/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.cakto.com.br/public_api/webhook/{id}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/webhook/{id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": 2863878,
"status": "active",
"name": "Venda Aprovada <Produto 1>",
"url": "https://destination-url-example.com.br/webhook-endpoint",
"products": [
{
"id": "cd287b31-d4b7-4e94-858a-96e05ce2f4r4",
"name": "Produto 1",
"image": "https://image-url-example.com.br",
"description": "Produto 1",
"price": 5,
"type": "unique",
"contentDeliveries": [
"cakto",
"telegram",
"discord"
],
"emailAccessLink": null,
"salesPage": "https://pv.example.com.br/product/",
"status": "active",
"paymentMethods": [
"boleto",
"credit_card",
"picpay"
],
"category": {
"id": "0673d296-1802-45e0-bc93-612f7514dddb",
"name": "Apps & Software"
}
}
],
"events": [
{
"id": 3,
"name": "Compra aprovada",
"custom_id": "purchase_approved"
}
],
"fields": {
"secret": "8a67e42d-08b9-4987-9f40-0fe7bfd15a5a"
},
"createdAt": "2050-11-07T09:11:58.377388-03:00",
"updatedAt": "2050-11-07T09:11:58.377406-03:00"
}{
"detail": "As credenciais de autenticação não foram fornecidas."
}Webhooks
Obter Webhook
Retorna os detalhes de um webhook específico
GET
/
public_api
/
webhook
/
{id}
/
cURL
curl --request GET \
--url https://api.cakto.com.br/public_api/webhook/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cakto.com.br/public_api/webhook/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cakto.com.br/public_api/webhook/{id}/', 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.cakto.com.br/public_api/webhook/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/webhook/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.cakto.com.br/public_api/webhook/{id}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/webhook/{id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": 2863878,
"status": "active",
"name": "Venda Aprovada <Produto 1>",
"url": "https://destination-url-example.com.br/webhook-endpoint",
"products": [
{
"id": "cd287b31-d4b7-4e94-858a-96e05ce2f4r4",
"name": "Produto 1",
"image": "https://image-url-example.com.br",
"description": "Produto 1",
"price": 5,
"type": "unique",
"contentDeliveries": [
"cakto",
"telegram",
"discord"
],
"emailAccessLink": null,
"salesPage": "https://pv.example.com.br/product/",
"status": "active",
"paymentMethods": [
"boleto",
"credit_card",
"picpay"
],
"category": {
"id": "0673d296-1802-45e0-bc93-612f7514dddb",
"name": "Apps & Software"
}
}
],
"events": [
{
"id": 3,
"name": "Compra aprovada",
"custom_id": "purchase_approved"
}
],
"fields": {
"secret": "8a67e42d-08b9-4987-9f40-0fe7bfd15a5a"
},
"createdAt": "2050-11-07T09:11:58.377388-03:00",
"updatedAt": "2050-11-07T09:11:58.377406-03:00"
}{
"detail": "As credenciais de autenticação não foram fornecidas."
}Escopo
read webhooks
Authorizations
Token de autenticação do tipo Bearer {access_token}, onde {access_token} é o token obtido no fluxo de autenticação.
Path Parameters
Id do App Webhook
Response
Corpo da resposta status 200
Nome do app
Maximum string length:
255Produtos que utilizam este app
Show child attributes
Show child attributes
Eventos que disparam este app
Show child attributes
Show child attributes
Data e hora de criação
Data e hora da última atualização
Status atual do app
active- Ativodisabled- Desativadowaiting_config- Aguardando Configuraçãopaused- Pausado
Available options:
active, disabled, waiting_config, paused URL de destino, onde os eventos serão enviados
Maximum string length:
2048Campos adicionais para o app
Was this page helpful?