API para parceiros › Configurações Obter a lista de assinaturas de webhooks GET /api/crm/v2/webhooks_subscriptionsv2
operationId: webhooksSubscriptions.default
Autorização api-token + language + role
Parâmetros de consulta branch_id integer
Exemplo: 8412
Respostas 200
object
status string obrigatório
Valores: successerror
Exemplo: success
data object
filters object
branch_id object (FilterSelectInteger)
value integer
Exemplo: 8920
type string obrigatório
Exemplo: select
option array of object
value integer obrigatório
Exemplo: 8920
name string obrigatório
Exemplo: Green Basket | Kaliningrad
mode string (FilterMode)
Como a interface processa o filtro; filtros comuns não possuem mode. force_shown — sempre exibido, não pode ser ocultado. value_required — ponto de entrada para a seção: sempre exibido, não pode ter valor vazio (enquanto o valor não for selecionado, a lista permanece vazia; não há opção "todos"), a limpeza geral não o redefine.
Valores: force_shownvalue_required
Exemplo: value_required
settings object (WebhooksBranchSettings)
secret string pode ser nulo
null, até que a rede crie o segredo
Exemplo: 9f2c…
enabled boolean obrigatório
Exemplo: true
list array of object
id integer obrigatório
Exemplo: 12
date_creation string (DataTimeFormatSQL) obrigatório
Exemplo: 2024-05-02 08:31:16
webhook_event_id integer obrigatório
Exemplo: 4
slug string obrigatório
Código do evento transmitido no corpo do webhook
Exemplo: order.created
translation_key string obrigatório
Chave de tradução do nome do evento
Exemplo: webhooksSubscriptionsEvent.orderCreated
url string obrigatório
Exemplo: https://partner.example.com/hooks/foodsoul
description string obrigatório
Exemplo: Учётная система
enabled boolean obrigatório
Exemplo: true
blocked boolean obrigatório
A assinatura é desativada automaticamente após uma série de erros
Exemplo: false
count_errors integer obrigatório
Número de envios consecutivos com falha
Exemplo: 0
curl PHP JavaScript Python Copiar
curl -X GET 'https://foodsoul.ru/api/crm/v2/webhooks_subscriptions' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: pt' \
-H 'role: partner' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.ru/api/crm/v2/webhooks_subscriptions' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'pt' ,
'role' => 'partner' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/webhooks_subscriptions" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "pt" ,
"role" : "partner"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.ru/api/crm/v2/webhooks_subscriptions" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "pt" ,
"role" : "partner" ,
},
)
data = response . json () Resposta 200
{
"status" : "success" ,
"data" : {
"filters" : {
"branch_id" : {
"value" : 8920 ,
"type" : "select" ,
"option" : [
{
"value" : 8920 ,
"name" : "Green Basket | Kaliningrad"
}
],
"mode" : "value_required"
}
},
"settings" : {
"secret" : "9f2c…" ,
"enabled" : true
},
"list" : [
{
"id" : 12 ,
"date_creation" : "2024-05-02 08:31:16" ,
"webhook_event_id" : 4 ,
"slug" : "order.created" ,
"translation_key" : "webhooksSubscriptionsEvent.orderCreated" ,
"url" : "https://partner.example.com/hooks/foodsoul" ,
"description" : "Учётная система" ,
"enabled" : true ,
"blocked" : false ,
"count_errors" : 0
}
]
}
} As solicitações são enviadas para foodsoul.ru — o host deste portal, não é possível escolher outro.