API für Affiliates › Affiliate Kontodaten des Affiliate-Kontrahenten ändern POST /api/crm/v2/affiliate_contractor.update_contractorv2
operationId: affiliateContractor.updateContractor
Ändert die Stammdaten des Affiliate-Kontrahenten. Die Stammdatenfelder sind dynamisch: Übernehmen Sie sie aus affiliate_contractor.fields und übermitteln Sie diejenigen, die zum gewählten contractor_type_id gehören.
Autorisierung api-token + language + role
Anfragetext application/json object
contractor_type_id integer erforderlich
Beispiel: 1
Antworten 200
object
status string erforderlich
Werte: successerror
Beispiel: success
curl PHP JavaScript Python Kopieren
curl -X POST 'https://foodsoul.ru/api/crm/v2/affiliate_contractor.update_contractor' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: de' \
-H 'role: affiliate' \
-H 'Content-Type: application/json' \
-d '{"contractor_type_id":1}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/affiliate_contractor.update_contractor' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'de' ,
'role' => 'affiliate' ,
],
'json' => [
'contractor_type_id' => 1 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/affiliate_contractor.update_contractor" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "affiliate" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"contractor_type_id" : 1
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/affiliate_contractor.update_contractor" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "affiliate" ,
},
json ={
"contractor_type_id" : 1 ,
},
)
data = response . json () Antwort 200
{
"status" : "success" ,
"data" : {}
} Anfragen werden an foodsoul.ru gesendet – dies ist der Host dieses Portals, ein anderer kann nicht ausgewählt werden.