curl -X POST 'https://foodsoul.ru/api/crm/v2/operators.update_operator' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: lt' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":1,"firm_user_id":1,"email_for_notifications":["operator@fs.pro"],"phone_format_id":1,"phone_number":9999999999,"public_phone":"+7 (999) 999-99-99","phone_sms_enabled":true,"permission":"all"}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://foodsoul.ru/api/crm/v2/operators.update_operator', [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN',
'language' => 'lt',
'role' => 'partner',
],
'json' => [
'id' => 1,
'firm_user_id' => 1,
'email_for_notifications' => [
'operator@fs.pro',
],
'phone_format_id' => 1,
'phone_number' => 9999999999,
'public_phone' => '+7 (999) 999-99-99',
'phone_sms_enabled' => true,
'permission' => 'all',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch("https://foodsoul.ru/api/crm/v2/operators.update_operator", {
method: "POST",
headers: {
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "lt",
"role": "partner",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": 1,
"firm_user_id": 1,
"email_for_notifications": [
"operator@fs.pro"
],
"phone_format_id": 1,
"phone_number": 9999999999,
"public_phone": "+7 (999) 999-99-99",
"phone_sms_enabled": true,
"permission": "all"
}),
})
const data = await response.json()
import requests
response = requests.request(
"POST",
"https://foodsoul.ru/api/crm/v2/operators.update_operator",
headers={
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "lt",
"role": "partner",
},
json={
"id": 1,
"firm_user_id": 1,
"email_for_notifications": [
"operator@fs.pro",
],
"phone_format_id": 1,
"phone_number": 9999999999,
"public_phone": "+7 (999) 999-99-99",
"phone_sms_enabled": True,
"permission": "all",
},
)
data = response.json()
Atsakymas 200
{
"error": {
"code": 0,
"variables": {},
"description": "string"
}
}
Užklausos siunčiamos į foodsoul.ru — tai šio portalo priegloba, kitos pasirinkti negalima.