Mettre à jour la configuration système
curl --request PUT \
--url http://localhost:3091/v1/api/superadmin/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}
'import requests
url = "http://localhost:3091/v1/api/superadmin/config"
payload = {
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": True,
"smsNotificationsEnabled": True,
"stripeConnectEnabled": True,
"stripeMode": "<string>",
"maintenanceMode": True,
"maintenanceMessage": "<string>"
}
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({
platformCommissionPercent: 123,
stripeCommissionPercent: 123,
minimumWithdrawalAmount: 123,
maxReservationWeight: 123,
maxPhotosPerReservation: 123,
kycExpirationDays: 123,
emailNotificationsEnabled: true,
smsNotificationsEnabled: true,
stripeConnectEnabled: true,
stripeMode: '<string>',
maintenanceMode: true,
maintenanceMessage: '<string>'
})
};
fetch('http://localhost:3091/v1/api/superadmin/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_PORT => "3091",
CURLOPT_URL => "http://localhost:3091/v1/api/superadmin/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([
'platformCommissionPercent' => 123,
'stripeCommissionPercent' => 123,
'minimumWithdrawalAmount' => 123,
'maxReservationWeight' => 123,
'maxPhotosPerReservation' => 123,
'kycExpirationDays' => 123,
'emailNotificationsEnabled' => true,
'smsNotificationsEnabled' => true,
'stripeConnectEnabled' => true,
'stripeMode' => '<string>',
'maintenanceMode' => true,
'maintenanceMessage' => '<string>'
]),
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 := "http://localhost:3091/v1/api/superadmin/config"
payload := strings.NewReader("{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\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("http://localhost:3091/v1/api/superadmin/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/superadmin/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}Configuration plateforme
Mettre à jour la configuration système
PUT
/
v1
/
api
/
superadmin
/
config
Mettre à jour la configuration système
curl --request PUT \
--url http://localhost:3091/v1/api/superadmin/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}
'import requests
url = "http://localhost:3091/v1/api/superadmin/config"
payload = {
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": True,
"smsNotificationsEnabled": True,
"stripeConnectEnabled": True,
"stripeMode": "<string>",
"maintenanceMode": True,
"maintenanceMessage": "<string>"
}
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({
platformCommissionPercent: 123,
stripeCommissionPercent: 123,
minimumWithdrawalAmount: 123,
maxReservationWeight: 123,
maxPhotosPerReservation: 123,
kycExpirationDays: 123,
emailNotificationsEnabled: true,
smsNotificationsEnabled: true,
stripeConnectEnabled: true,
stripeMode: '<string>',
maintenanceMode: true,
maintenanceMessage: '<string>'
})
};
fetch('http://localhost:3091/v1/api/superadmin/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_PORT => "3091",
CURLOPT_URL => "http://localhost:3091/v1/api/superadmin/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([
'platformCommissionPercent' => 123,
'stripeCommissionPercent' => 123,
'minimumWithdrawalAmount' => 123,
'maxReservationWeight' => 123,
'maxPhotosPerReservation' => 123,
'kycExpirationDays' => 123,
'emailNotificationsEnabled' => true,
'smsNotificationsEnabled' => true,
'stripeConnectEnabled' => true,
'stripeMode' => '<string>',
'maintenanceMode' => true,
'maintenanceMessage' => '<string>'
]),
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 := "http://localhost:3091/v1/api/superadmin/config"
payload := strings.NewReader("{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\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("http://localhost:3091/v1/api/superadmin/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3091/v1/api/superadmin/config")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platformCommissionPercent\": 123,\n \"stripeCommissionPercent\": 123,\n \"minimumWithdrawalAmount\": 123,\n \"maxReservationWeight\": 123,\n \"maxPhotosPerReservation\": 123,\n \"kycExpirationDays\": 123,\n \"emailNotificationsEnabled\": true,\n \"smsNotificationsEnabled\": true,\n \"stripeConnectEnabled\": true,\n \"stripeMode\": \"<string>\",\n \"maintenanceMode\": true,\n \"maintenanceMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}{
"platformCommissionPercent": 123,
"stripeCommissionPercent": 123,
"minimumWithdrawalAmount": 123,
"maxReservationWeight": 123,
"maxPhotosPerReservation": 123,
"kycExpirationDays": 123,
"emailNotificationsEnabled": true,
"smsNotificationsEnabled": true,
"stripeConnectEnabled": true,
"stripeMode": "<string>",
"maintenanceMode": true,
"maintenanceMessage": "<string>"
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}{
"status": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"message": "Ressource non trouvée",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/bookings/123",
"debugInfo": "<string>",
"suggestions": [
"<string>"
],
"fieldErrors": [
{
"field": "email",
"message": "must not be blank",
"rejectedValue": {}
}
]
}Authorizations
JWT access token from POST /v1/api/auth/login
Body
application/json
Response
Configuration updated
⌘I