API für Partner › Einstellungen Webhooks einer Filiale aktivieren oder deaktivieren POST /api/crm/v2/webhooks_subscriptions.update_settingsv2
operationId: webhooksSubscriptions.updateSettings
Aktiviert oder deaktiviert die Webhooks einer Filiale. Beim erstmaligen Aktivieren wird ein Signaturgeheimnis erstellt, daher werden die Einstellungen der Filiale in der Antwort zurückgegeben.
Autorisierung api-token + language + role
Abfrageparameter branch_id integer erforderlich
Beispiel: 8412
Anfragetext application/json object
enabled boolean erforderlich
Deaktiviert sofort alle Abonnements der Filiale
Beispiel: true
Antworten 200
object
status string erforderlich
Werte: successerror
Beispiel: success
data object
settings object (WebhooksBranchSettings)
secret string kann null sein
null, bis das Netzwerk ein Secret erstellt hat
Beispiel: 9f2c…
enabled boolean erforderlich
Beispiel: true
curl PHP JavaScript Python Kopieren
curl -X POST 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update_settings?branch_id=8412' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: de' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"enabled":true}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update_settings?branch_id=8412' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'de' ,
'role' => 'partner' ,
],
'json' => [
'enabled' => true ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update_settings?branch_id=8412" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"enabled" : true
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update_settings?branch_id=8412" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "partner" ,
},
json ={
"enabled" : True ,
},
)
data = response . json () Antwort 200
{
"status" : "success" ,
"data" : {
"settings" : {
"secret" : "9f2c…" ,
"enabled" : true
}
}
} Anfragen werden an foodsoul.pro gesendet – dies ist der Host dieses Portals, ein anderer kann nicht ausgewählt werden.