curl -X POST 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update?branch_id=8412' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: ka' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":12,"webhook_event_id":4,"url":"https://partner.example.com/hooks/foodsoul","description":"Учётная система"}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update?branch_id=8412', [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN',
'language' => 'ka',
'role' => 'partner',
],
'json' => [
'id' => 12,
'webhook_event_id' => 4,
'url' => 'https://partner.example.com/hooks/foodsoul',
'description' => 'Учётная система',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch("https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update?branch_id=8412", {
method: "POST",
headers: {
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "ka",
"role": "partner",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": 12,
"webhook_event_id": 4,
"url": "https://partner.example.com/hooks/foodsoul",
"description": "Учётная система"
}),
})
const data = await response.json()
import requests
response = requests.request(
"POST",
"https://foodsoul.pro/api/crm/v2/webhooks_subscriptions.update?branch_id=8412",
headers={
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "ka",
"role": "partner",
},
json={
"id": 12,
"webhook_event_id": 4,
"url": "https://partner.example.com/hooks/foodsoul",
"description": "Учётная система",
},
)
data = response.json()
პასუხი 200
{
"status": "success",
"data": {}
}
მოთხოვნები იგზავნება foodsoul.pro-ზე — ეს პორტალის ჰოსტია, სხვა არჩევა შეუძლებელია.