API per partner › Impostazioni Ottenere l'elenco delle sottoscrizioni ai webhook GET /api/crm/v2/webhooks_subscriptionsv2
operationId: webhooksSubscriptions.default
Autorizzazione api-token + language + role
Parametri della richiesta branch_id integer
Esempio: 8412
Risposte 200
object
status string obbligatorio
Valori: successerror
Esempio: success
data object
filters object
branch_id object (FilterSelectInteger)
value integer
Esempio: 8920
type string obbligatorio
Esempio: select
option array of object
value integer obbligatorio
Esempio: 8920
name string obbligatorio
Esempio: Green Basket | Kaliningrad
mode string (FilterMode)
Come l'interfaccia gestisce il filtro; un filtro normale non ha mode.
force_shown — sempre visibile, non può essere nascosto.
value_required — punto di ingresso nella sezione: sempre visibile, non può avere valore vuoto (finché non viene selezionato un valore, la lista è vuota; non esiste l'opzione "tutti"), il reset generale non lo azzera.
Valori: force_shownvalue_required
Esempio: value_required
settings object (WebhooksBranchSettings)
secret string può essere nullo
null, finché la rete non ha creato il segreto
Esempio: 9f2c…
enabled boolean obbligatorio
Esempio: true
list array of object
id integer obbligatorio
Esempio: 12
date_creation string (DataTimeFormatSQL) obbligatorio
Esempio: 2024-05-02 08:31:16
webhook_event_id integer obbligatorio
Esempio: 4
slug string obbligatorio
Codice dell'evento trasmesso nel corpo del webhook
Esempio: order.created
translation_key string obbligatorio
Chiave di traduzione del nome dell'evento
Esempio: webhooksSubscriptionsEvent.orderCreated
url string obbligatorio
Esempio: https://partner.example.com/hooks/foodsoul
description string obbligatorio
Esempio: Учётная система
enabled boolean obbligatorio
Esempio: true
blocked boolean obbligatorio
L'abbonamento viene disattivato automaticamente dopo una serie di errori
Esempio: false
count_errors integer obbligatorio
Numero di invii consecutivi non riusciti
Esempio: 0
curl PHP JavaScript Python Copiare
curl -X GET 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: it' \
-H 'role: partner' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'it' ,
'role' => 'partner' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/webhooks_subscriptions" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.pro/api/crm/v2/webhooks_subscriptions" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner" ,
},
)
data = response . json () Risposta 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
}
]
}
} Le richieste vengono inviate a foodsoul.pro, che è l’host di questo portale; non è possibile sceglierne un altro.