curl -X POST 'https://foodsoul.ru/api/crm/v2/clients_accounts.update?chain_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: pl' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":48997964,"name":"John Doe","gender":"man","date_of_birth":"01/03/1982"}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://foodsoul.ru/api/crm/v2/clients_accounts.update?chain_id=1', [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN',
'language' => 'pl',
'role' => 'partner',
],
'json' => [
'id' => 48997964,
'name' => 'John Doe',
'gender' => 'man',
'date_of_birth' => '01/03/1982',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch("https://foodsoul.ru/api/crm/v2/clients_accounts.update?chain_id=1", {
method: "POST",
headers: {
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "pl",
"role": "partner",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": 48997964,
"name": "John Doe",
"gender": "man",
"date_of_birth": "01/03/1982"
}),
})
const data = await response.json()
import requests
response = requests.request(
"POST",
"https://foodsoul.ru/api/crm/v2/clients_accounts.update?chain_id=1",
headers={
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "pl",
"role": "partner",
},
json={
"id": 48997964,
"name": "John Doe",
"gender": "man",
"date_of_birth": "01/03/1982",
},
)
data = response.json()
Odpowiedź 200
{
"status": "success",
"data": {}
}
Żądania są wysyłane na foodsoul.ru — to jest host tego portalu, nie można wybrać innego.