Lister les paliers de majoration courte durée
curl --request GET \
--url https://api.lexio.rent/api/external/v1/short-duration-surcharges \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lexio.rent/api/external/v1/short-duration-surcharges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lexio.rent/api/external/v1/short-duration-surcharges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lexio.rent/api/external/v1/short-duration-surcharges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "3e5a7c9d-1b2f-4d4e-8a6c-0f2b4d6e8a1c",
"maxRentalDays": 3,
"surchargePercent": 25,
"isActive": true,
"surchargeFactors": [
{
"seasonSlug": "basse",
"surchargePercent": 0
}
]
}
],
"nextCursor": null
}{
"type": "https://api.lexio.rent/errors/malformed-request",
"title": "Corps de requête illisible",
"status": 400,
"code": "MALFORMED_REQUEST",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}{
"type": "https://api.lexio.rent/errors/api-key-disabled",
"title": "Clé API désactivée",
"status": 401,
"code": "API_KEY_DISABLED",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}{
"type": "https://api.lexio.rent/errors/feature-not-available",
"title": "Fonctionnalité non incluse",
"status": 403,
"code": "FEATURE_NOT_AVAILABLE",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c",
"feature": "<string>"
}{
"type": "https://api.lexio.rent/errors/rate-limited",
"title": "Trop de requêtes",
"status": 429,
"code": "RATE_LIMITED",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c",
"limit": "PRE_AUTH",
"windowSeconds": 2,
"retryAfter": 1
}{
"type": "https://api.lexio.rent/errors/internal-error",
"title": "Erreur interne",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}Tarification
Lister les paliers de majoration courte durée
Accès : pricing.read · Fonctionnalité d’abonnement : pricing.discounts (plans) · Clé partenaire : non
Renvoie les paliers de majoration courte durée (20 au plus), actifs ou non, triés par maxRentalDays ; nextCursor vaut toujours null.
Application
- S’applique le palier actif de plus petit
maxRentalDayssupérieur ou égal à la durée facturée, siGET /pricing-settingsdonneshortDurationSurcharge.isEnabledetisAvailableàtrue. surchargeFactorsliste les seules exceptions par saison : avec la tarification saisonnière, chaque jour prend la majoration de sa saison, sinonsurchargePercent; la ligne du devis porte la moyenne de ces taux pondérée par le prix HT de chaque jour, et disparaît si elle vaut 0. Sans tarification saisonnière,surchargePercents’applique.POST /quotesfait foi.
GET
/
short-duration-surcharges
Lister les paliers de majoration courte durée
curl --request GET \
--url https://api.lexio.rent/api/external/v1/short-duration-surcharges \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lexio.rent/api/external/v1/short-duration-surcharges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lexio.rent/api/external/v1/short-duration-surcharges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lexio.rent/api/external/v1/short-duration-surcharges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "3e5a7c9d-1b2f-4d4e-8a6c-0f2b4d6e8a1c",
"maxRentalDays": 3,
"surchargePercent": 25,
"isActive": true,
"surchargeFactors": [
{
"seasonSlug": "basse",
"surchargePercent": 0
}
]
}
],
"nextCursor": null
}{
"type": "https://api.lexio.rent/errors/malformed-request",
"title": "Corps de requête illisible",
"status": 400,
"code": "MALFORMED_REQUEST",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}{
"type": "https://api.lexio.rent/errors/api-key-disabled",
"title": "Clé API désactivée",
"status": 401,
"code": "API_KEY_DISABLED",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}{
"type": "https://api.lexio.rent/errors/feature-not-available",
"title": "Fonctionnalité non incluse",
"status": 403,
"code": "FEATURE_NOT_AVAILABLE",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c",
"feature": "<string>"
}{
"type": "https://api.lexio.rent/errors/rate-limited",
"title": "Trop de requêtes",
"status": 429,
"code": "RATE_LIMITED",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c",
"limit": "PRE_AUTH",
"windowSeconds": 2,
"retryAfter": 1
}{
"type": "https://api.lexio.rent/errors/internal-error",
"title": "Erreur interne",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "Explication lisible, propre à cette requête.",
"instance": "/api/external/v1/rentals",
"requestId": "5b0e2a1c-8f3d-4c7e-9a6b-1d2e3f4a5b6c"
}Autorisations
Clé API lck_… créée dans Lexio (Paramètres → Développeur), envoyée en Authorization: Bearer. Voir Authentification.