curl PHP JavaScript Python Copiar
curl -X POST 'https://foodsoul.pro/api/crm/v2/chains.switch' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: es' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":1}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.pro/api/crm/v2/chains.switch' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'es' ,
'role' => 'partner' ,
],
'json' => [
'id' => 1 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/chains.switch" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "es" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"id" : 1
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.pro/api/crm/v2/chains.switch" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "es" ,
"role" : "partner" ,
},
json ={
"id" : 1 ,
},
)
data = response . json () Las solicitudes se envían a foodsoul.pro, que es el host de este portal; no se puede elegir otro.