curl --request PUT \
--url https://core.locusmedical.fr/v2/embed-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"theme": {},
"features": {},
"labels": {},
"branding": {}
}
'import requests
url = "https://core.locusmedical.fr/v2/embed-config"
payload = {
"theme": {},
"features": {},
"labels": {},
"branding": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({theme: {}, features: {}, labels: {}, branding: {}})
};
fetch('https://core.locusmedical.fr/v2/embed-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.locusmedical.fr/v2/embed-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'theme' => [
],
'features' => [
],
'labels' => [
],
'branding' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.locusmedical.fr/v2/embed-config"
payload := strings.NewReader("{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://core.locusmedical.fr/v2/embed-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.locusmedical.fr/v2/embed-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Écrire la configuration du widget (auth : clé lsk_)
Remplace la configuration du widget. Le corps est NORMALISÉ avant écriture : une couleur qu’on ne sait pas lire retombe sur le défaut, un champ inconnu est ignoré. Ce qui est stocké est donc toujours ce qui sera servi — pas une intention qu’un lecteur devra interpréter.
Réservée à la clé : un widget ne réécrit pas son propre thème.
client permet à une clé platform d’écrire celle d’un autre — c’est ce que fait la console quand un partenaire change ses couleurs.
curl --request PUT \
--url https://core.locusmedical.fr/v2/embed-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"theme": {},
"features": {},
"labels": {},
"branding": {}
}
'import requests
url = "https://core.locusmedical.fr/v2/embed-config"
payload = {
"theme": {},
"features": {},
"labels": {},
"branding": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({theme: {}, features: {}, labels: {}, branding: {}})
};
fetch('https://core.locusmedical.fr/v2/embed-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.locusmedical.fr/v2/embed-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'theme' => [
],
'features' => [
],
'labels' => [
],
'branding' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.locusmedical.fr/v2/embed-config"
payload := strings.NewReader("{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://core.locusmedical.fr/v2/embed-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.locusmedical.fr/v2/embed-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"theme\": {},\n \"features\": {},\n \"labels\": {},\n \"branding\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Locus API key — paste the raw lsk_… value (no 'Bearer ' prefix) — or a B2B session token minted by POST /v2/session-token.
Query Parameters
Agir au nom d'un AUTRE client, par son slug ou son identifiant. Réservé aux clés platform — la console que nous servons, où c'est une personne qui se connecte et non une clé. Omis : le client de la clé présentée, comme toujours.
200Body
Response
Successful Response
The response is of type Response Set Embed Config V2 Embed Config Put · object.