API dla partnerów › Informacje Dodaj wpis do czarnej listy POST /api/crm/v2/black_list.addv2
operationId: blackList.add
Dodaje wpis do czarnej listy. type_lock określa, jaki identyfikator jest oczekiwany w treści żądania: phone_number, client_branch_profile_id lub client_account_id. Duplikat w obrębie sieci jest odrzucany.
Autoryzacja api-token + language + role
Treść żądania application/json object
type_lock string wymagane
Wartości: phone_numberclient_branch_profile_idclient_account_id
Przykład: phone_number
Jeden z wariantów
blackListOneOf
object (blackListOneOf)
Jeden z wariantów
object object object
object
Blokada według phone_number
phone_format_id integer (PhoneFormatId) wymagane
Kod kraju: 1-🇷🇺(+7|8), 2-🇦🇿(+994|0), 3-🇧🇾(+375|80), 4-🇰🇿(+7|8), 6-🇷🇸(+381|0), 7-🇹🇷(+90|0), 8-🇺🇦(+380|0), 9-🇵🇹(+351|0), 10-🇰🇬(+996|0), 11-🇺🇸(+1), 12-🇫🇷(+33|0), 13-🇲🇩(+373|0), 15-🇪🇪(+372), 18-🇬🇪(+995), 19-🇺🇿(+998), 22-🇵🇱(+48|0), 23-🇹🇯(+992|8), 25-🇷🇴(+40|0), 44-🇨🇭(+41|0)
Przykład: 1
phone_number string wymagane
Przykład: 705-712-51-20
object
Blokada według client_branch_profile_id
client_branch_profile_id integer wymagane
ID profilu klienta w oddziale
Przykład: 48997963
object
Blokada według client_account_id
client_account_id integer wymagane
Przykład: 4211309
Odpowiedzi 200
object
status string wymagane
Wartości: successerror
Przykład: success
data object
description string
Przykład: Successfully added
row object
chain_id integer
Przykład: 7135
date string (DataTimeFormatSQL)
Przykład: 2024-05-02 08:31:16
phone_format_id integer
Przykład: 4
phone_number string
Przykład: 7057125119
client_account_id integer
Przykład: 0
client_branch_profile_id integer
Przykład: 0
blocked boolean
Przykład: true
curl PHP JavaScript Python Kopiuj
curl -X POST 'https://foodsoul.ru/api/crm/v2/black_list.add' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: pl' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"phone_format_id":1,"phone_number":"705-712-51-20"}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/black_list.add' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'pl' ,
'role' => 'partner' ,
],
'json' => [
'phone_format_id' => 1 ,
'phone_number' => '705-712-51-20' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/black_list.add" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "pl" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"phone_format_id" : 1 ,
"phone_number" : "705-712-51-20"
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/black_list.add" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "pl" ,
"role" : "partner" ,
},
json ={
"phone_format_id" : 1 ,
"phone_number" : "705-712-51-20" ,
},
)
data = response . json () Odpowiedź 200
{
"status" : "success" ,
"data" : {
"description" : "Successfully added" ,
"row" : {
"chain_id" : 7135 ,
"date" : "2024-05-02 08:31:16" ,
"phone_format_id" : 4 ,
"phone_number" : "7057125119" ,
"client_account_id" : 0 ,
"client_branch_profile_id" : 0 ,
"blocked" : true ,
"id" : "82348"
}
}
} Żądania są wysyłane na foodsoul.ru — to jest host tego portalu, nie można wybrać innego.