Documentation navigation
API docsIntroduction
Essential guides
Introduction
Understand the public API and its resources.
The reference is generated from the application’s documented public routes. Each resource lists its HTTP methods, paths, declared parameters, examples and request limits. Availability and permissions depend on your API access.
Request example
cURL
curl --request 'GET' 'https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc' \
--header 'Authorization: Basic YOUR_API_TOKEN' \
--header 'Accept: application/json'JavaScript
const response = await fetch("https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc", {
"method": "GET",
"headers": {
"Authorization": "Basic YOUR_API_TOKEN",
"Accept": "application/json"
}
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();PHP
<?php
$curl = curl_init('https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array (
0 => 'Authorization: Basic YOUR_API_TOKEN',
1 => 'Accept: application/json',
),
]);
$response = curl_exec($curl);
if ($response === false) throw new RuntimeException(curl_error($curl));
curl_close($curl);
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);PYTHON
import json
from urllib.request import Request, urlopen
headers = {
"Authorization": "Basic YOUR_API_TOKEN",
"Accept": "application/json"
}
data = None
request = Request("https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc", data=data, headers=headers, method="GET")
with urlopen(request) as response:
result = json.load(response)