转到内容
stayclean
文档导航
API docsReports

API 参考

Reports

Reports

3 个端点REST / JSON

概览

使用以下路径和方法。请将示例标识符和 YOUR_API_TOKEN 替换为您有权使用的值;本页不会执行任何示例。

基础 URL

https://api.stayclean.io

身份验证

Authorization: Basic YOUR_API_TOKEN

GET/api/v1/reports/{id}

Get an intervention report

See the work completed at your property, the quality checks and the photo and video evidence in one report. Monitor service quality and share a clear overview with your clients.

参数

参数类型位置必填详情
idstring路径是UUID of the cleaning intervention. Reports have no separate ID; all report endpoints use the intervention ID.6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456
localestring查询否Content language: fr, en, es, it, pt or de. Defaults to the company language. Regional variants are accepted (e.g. fr-FR).fr

The complete report is available after validation, subject to your plan. Cross-company access returns 404 (except SUPER_ADMIN). Redis snapshots never expire (`cache_ttl_seconds: null`); access is checked on every call. Unavailable sections stay empty or hidden. Anyone with the sharing link can open it without signing in. Errors are JSON; translation failures return 503 TRANSLATION_UNAVAILABLE. Respect Retry-After.

请求限制:30 / 分钟300 / 小时1500 / 天

请求示例 · GET

cURL

curl --request 'GET' 'https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000?locale=fr' \
  --header 'Authorization: Basic YOUR_API_TOKEN' \
  --header 'Accept: application/json'

JavaScript

const response = await fetch("https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000?locale=fr", {
    "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/reports/00000000-0000-4000-8000-000000000000?locale=fr');
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/reports/00000000-0000-4000-8000-000000000000?locale=fr", data=data, headers=headers, method="GET")
with urlopen(request) as response:
    result = json.load(response)

响应示例

{
    "metadata": {
        "schema_version": "1.0",
        "cleaning_intervention_id": "6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456",
        "locale": "fr",
        "available_locales": [
            "fr",
            "en",
            "es",
            "it",
            "pt",
            "de"
        ],
        "timezone": "Europe/Paris",
        "generated_at": "2026-11-05T12:00:00+00:00",
        "cache_ttl_seconds": null
    },
    "links": {
        "self": "https://api.stayclean.io/api/v1/reports/6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456?locale=fr",
        "summary": "https://api.stayclean.io/api/v1/reports/6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456/summary?locale=fr",
        "media": "https://api.stayclean.io/api/v1/reports/6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456/media?locale=fr",
        "public_embed": "https://app.stayclean.io/public/business/interventions/6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456/report/embed?locale=fr"
    },
    "report": {
        "overview": {
            "ready": false,
            "score": 73,
            "grade": "C",
            "grade_marker_percent": 45,
            "tasks_done": 2,
            "tasks_applicable": 3,
            "proofs_received": 2,
            "proofs_required": 3,
            "quality_controlled": true,
            "confidence": "Partielle",
            "critical_anomaly": false
        },
        "intervention": {
            "id": "6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456",
            "property_name": "Villa Moana",
            "property_thumbnail": "https://cdn.example.test/reports/property.jpg",
            "date": "2026-11-05T09:00:00+01:00",
            "date_display": "5 nov. 2026",
            "reference": "6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456",
            "status": "Terminée",
            "type": "Inter-séjour",
            "origin": "Autopilote",
            "cleaning_level": 3,
            "booking_reference": "BOOKING-2026-1105"
        },
        "agent": {
            "visible": true,
            "first_name": "Alex",
            "rating": 4.8,
            "intervention_count": 128
        },
        "timing": {
            "planned_start": "2026-11-05T09:00:00+01:00",
            "planned_end": "2026-11-05T11:00:00+01:00",
            "actual_start": "2026-11-05T09:20:00+01:00",
            "actual_end": "2026-11-05T11:36:00+01:00",
            "site_arrival_at": "2026-11-05T08:55:00+01:00",
            "arrival_at": "2026-11-05T09:10:00+01:00",
            "preparation_seconds": 600,
            "transmission_at": "2026-11-05T12:21:00+01:00",
            "planned_seconds": 7200,
            "actual_seconds": 8160,
            "duration_delta_seconds": 960,
            "start_delta_seconds": 1200,
            "end_delta_seconds": 2160,
            "last_task_at": "2026-11-05T11:20:00+01:00",
            "last_task_to_exit_seconds": 960,
            "next_arrival_margin_seconds": null,
            "events": [
                {
                    "key": "arrival",
                    "label": "Arrivée sur place",
                    "title": "Arrivée sur place",
                    "description": "Moment où l’agent arrive aux abords du logement.",
                    "at": "2026-11-05T08:55:00+01:00",
                    "display_time": "08:55",
                    "inferred": true,
                    "duration_seconds": null
                },
                {
                    "key": "parking",
                    "label": "Stationnement et sortie du matériel",
                    "title": "Préparation de la prestation",
                    "description": "Temps consacré au stationnement et à la sortie du matériel.",
                    "at": "2026-11-05T09:10:00+01:00",
                    "display_time": "09:10",
                    "inferred": true,
                    "duration_seconds": 600
                },
                {
                    "key": "badge",
                    "label": "Badge initial · début du ménage",
                    "title": "Début certifié",
                    "description": "Badge d’entrée confirmant le démarrage réel dans le logement.",
                    "at": "2026-11-05T09:20:00+01:00",
                    "display_time": "09:20",
                    "inferred": false,
                    "duration_seconds": null
                },
                {
                    "key": "last_task",
                    "label": "Dernière tâche validée",
                    "title": "Dernière tâche validée",
                    "description": "Dernière action du protocole confirmée par l’agent.",
                    "at": "2026-11-05T11:20:00+01:00",
                    "display_time": "11:20",
                    "inferred": false,
                    "duration_seconds": null
                },
                {
                    "key": "exit",
                    "label": "Sortie du logement",
                    "title": "Fin certifiée",
                    "description": "Badge de sortie marquant la fin réelle de l’intervention.",
                    "at": "2026-11-05T11:36:00+01:00",
                    "display_time": "11:36",
                    "inferred": false,
                    "duration_seconds": null
                },
                {
                    "key": "transmission",
                    "label": "Transmission des informations",
                    "title": "Rapport transmis",
                    "description": "Finalisation et transmission des informations après la prestation.",
                    "at": "2026-11-05T12:21:00+01:00",
                    "display_time": "12:21",
                    "inferred": true,
                    "duration_seconds": 2700
                }
            ],
            "punctuality": {
                "label": "En retard",
                "tone": "warning",
                "delta_seconds": 1200,
                "score": 80,
                "review_score": 4,
                "grade": "B"
            },
            "chronology_cards": {
                "agent_first_name": "Alex",
                "started_at": "2026-11-05T09:20:00+01:00",
                "started_at_display": "09:20",
                "punctuality": {
                    "label": "En retard",
                    "tone": "warning",
                    "delta_seconds": 1200,
                    "score": 80,
                    "review_score": 4,
                    "grade": "B"
                },
                "ended_at": "2026-11-05T11:36:00+01:00",
                "ended_at_display": "11:36",
                "end_delta_seconds": 2160,
                "finish_delayed": true,
                "next_arrival": "2026-11-05T15:00:00+01:00",
                "next_arrival_label": "Tout à l’heure · À partir de 15:00",
                "next_arrival_date_label": "Tout à l’heure",
                "next_arrival_time_label": "À partir de 15:00"
            },
            "performance_timeline": {
                "visible": true,
                "range_start": "2026-11-05T08:34:24+01:00",
                "range_end": "2026-11-05T12:41:36+01:00",
                "range_start_timestamp": 1793864064,
                "range_end_timestamp": 1793878896,
                "timezone": "Europe/Paris",
                "margin_seconds": 1236,
                "events": [
                    {
                        "key": "arrival",
                        "label": "Arrivée sur place",
                        "title": "Arrivée sur place",
                        "description": "Moment où l’agent arrive aux abords du logement.",
                        "at": "2026-11-05T08:55:00+01:00",
                        "display_time": "08:55",
                        "inferred": true,
                        "duration_seconds": null,
                        "position": 8.333
                    },
                    {
                        "key": "planned_start",
                        "label": "Début prévu",
                        "at": "2026-11-05T09:00:00+01:00",
                        "title": "Démarrage planifié",
                        "description": "Horaire prévu pour commencer la prestation.",
                        "position": 10.356,
                        "display_time": "09:00",
                        "inferred": false,
                        "duration_seconds": null
                    },
                    {
                        "key": "parking",
                        "label": "Stationnement et sortie du matériel",
                        "title": "Préparation de la prestation",
                        "description": "Temps consacré au stationnement et à la sortie du matériel.",
                        "at": "2026-11-05T09:10:00+01:00",
                        "display_time": "09:10",
                        "inferred": true,
                        "duration_seconds": 600,
                        "position": 14.401
                    },
                    {
                        "key": "badge",
                        "label": "Badge initial · début du ménage",
                        "title": "Début certifié",
                        "description": "Badge d’entrée confirmant le démarrage réel dans le logement.",
                        "at": "2026-11-05T09:20:00+01:00",
                        "display_time": "09:20",
                        "inferred": false,
                        "duration_seconds": null,
                        "position": 18.447
                    },
                    {
                        "key": "planned_end",
                        "label": "Fin prévue",
                        "at": "2026-11-05T11:00:00+01:00",
                        "title": "Fin planifiée",
                        "description": "Horaire prévu pour rendre le logement prêt.",
                        "position": 58.9,
                        "display_time": "11:00",
                        "inferred": false,
                        "duration_seconds": null
                    },
                    {
                        "key": "last_task",
                        "label": "Dernière tâche validée",
                        "title": "Dernière tâche validée",
                        "description": "Dernière action du protocole confirmée par l’agent.",
                        "at": "2026-11-05T11:20:00+01:00",
                        "display_time": "11:20",
                        "inferred": false,
                        "duration_seconds": null,
                        "position": 66.99
                    },
                    {
                        "key": "exit",
                        "label": "Sortie du logement",
                        "title": "Fin certifiée",
                        "description": "Badge de sortie marquant la fin réelle de l’intervention.",
                        "at": "2026-11-05T11:36:00+01:00",
                        "display_time": "11:36",
                        "inferred": false,
                        "duration_seconds": null,
                        "position": 73.463
                    },
                    {
                        "key": "transmission",
                        "label": "Transmission des informations",
                        "title": "Rapport transmis",
                        "description": "Finalisation et transmission des informations après la prestation.",
                        "at": "2026-11-05T12:21:00+01:00",
                        "display_time": "12:21",
                        "inferred": true,
                        "duration_seconds": 2700,
                        "position": 91.667
                    }
                ],
                "segments": [
                    {
                        "key": "peripheral",
                        "start": 8.333,
                        "width": 83.334
                    },
                    {
                        "key": "planned",
                        "start": 10.356,
                        "width": 48.544
                    },
                    {
                        "key": "actual",
                        "start": 18.447,
                        "width": 55.01599999999999
                    }
                ],
                "delay_seconds": 1200,
                "finish_delta_seconds": 2160
            }
        },
        "access": {
            "visible": false
        },
        "execution": {
            "progress_points": [
                {
                    "at": "2026-11-05T10:05:00+01:00",
                    "percent": 33
                },
                {
                    "at": "2026-11-05T11:20:00+01:00",
                    "percent": 67
                }
            ],
            "planned_points": [
                {
                    "at": "2026-11-05T09:00:00+01:00",
                    "percent": 0
                },
                {
                    "at": "2026-11-05T11:00:00+01:00",
                    "percent": 100
                }
            ],
            "progress_chart": {
                "labels": [
                    "09:20",
                    "10:05",
                    "11:20",
                    "11:36"
                ],
                "actual": [
                    0,
                    33,
                    67,
                    100
                ],
                "planned": [
                    0,
                    33,
                    88,
                    100
                ]
            },
            "idle_periods": [],
            "initial_state": {
                "level": 4,
                "label": "Niveau d’effort 4/5",
                "time_impact_seconds": 960
            }
        },
        "rooms": [
            {
                "name": "Cuisine",
                "tasks": [
                    {
                        "name": "Nettoyer la cuisine",
                        "room": "Cuisine",
                        "status": "done",
                        "completed_at": "2026-11-05T10:05:00+01:00",
                        "planned_minutes": 45,
                        "proof_required": true,
                        "proof_received": true,
                        "proof_items": [
                            {
                                "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                                "mime_type": "image/jpeg"
                            }
                        ]
                    }
                ],
                "task_count": 1,
                "completed_count": 1,
                "planned_minutes": 45,
                "observed_minutes": 51,
                "proof_count": 1,
                "completion_percent": 100,
                "time_share_percent": 37.5,
                "time_delta_minutes": 6,
                "planned_width_percent": 88.2,
                "observed_width_percent": 100
            },
            {
                "name": "Salle de bain",
                "tasks": [
                    {
                        "name": "Nettoyer la salle de bain",
                        "room": "Salle de bain",
                        "status": "done",
                        "completed_at": "2026-11-05T11:20:00+01:00",
                        "planned_minutes": 45,
                        "proof_required": true,
                        "proof_received": true,
                        "proof_items": [
                            {
                                "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                                "mime_type": "video/mp4",
                                "duration": 15
                            },
                            {
                                "url": "https://cdn.example.test/reports/checklist.pdf",
                                "mime_type": "application/pdf"
                            }
                        ]
                    }
                ],
                "task_count": 1,
                "completed_count": 1,
                "planned_minutes": 45,
                "observed_minutes": 51,
                "proof_count": 1,
                "completion_percent": 100,
                "time_share_percent": 37.5,
                "time_delta_minutes": 6,
                "planned_width_percent": 88.2,
                "observed_width_percent": 100
            },
            {
                "name": "Chambre",
                "tasks": [
                    {
                        "name": "Vérifier la chambre",
                        "room": "Chambre",
                        "status": "missing",
                        "completed_at": null,
                        "planned_minutes": 30,
                        "proof_required": true,
                        "proof_received": false,
                        "proof_items": []
                    }
                ],
                "task_count": 1,
                "completed_count": 0,
                "planned_minutes": 30,
                "observed_minutes": 34,
                "proof_count": 0,
                "completion_percent": 0,
                "time_share_percent": 25,
                "time_delta_minutes": 4,
                "planned_width_percent": 58.8,
                "observed_width_percent": 66.7
            }
        ],
        "tasks": [
            {
                "name": "Nettoyer la cuisine",
                "room": "Cuisine",
                "status": "done",
                "completed_at": "2026-11-05T10:05:00+01:00",
                "planned_minutes": 45,
                "proof_required": true,
                "proof_received": true,
                "proof_items": [
                    {
                        "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                        "mime_type": "image/jpeg"
                    }
                ],
                "id": "052e691d-7402-4b74-b2bb-2e0c0fd28214",
                "attachments": [
                    {
                        "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                        "mime_type": "image/jpeg"
                    }
                ]
            },
            {
                "name": "Nettoyer la salle de bain",
                "room": "Salle de bain",
                "status": "done",
                "completed_at": "2026-11-05T11:20:00+01:00",
                "planned_minutes": 45,
                "proof_required": true,
                "proof_received": true,
                "proof_items": [
                    {
                        "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                        "mime_type": "video/mp4",
                        "duration": 15
                    },
                    {
                        "url": "https://cdn.example.test/reports/checklist.pdf",
                        "mime_type": "application/pdf"
                    }
                ],
                "id": "75ade35f-6f14-43c3-8ac5-5b4b2fa55f15",
                "attachments": [
                    {
                        "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                        "mime_type": "video/mp4",
                        "duration": 15
                    },
                    {
                        "url": "https://cdn.example.test/reports/checklist.pdf",
                        "mime_type": "application/pdf"
                    }
                ]
            },
            {
                "name": "Vérifier la chambre",
                "room": "Chambre",
                "status": "missing",
                "completed_at": null,
                "planned_minutes": 30,
                "proof_required": true,
                "proof_received": false,
                "proof_items": [],
                "id": "af5113dc-96ab-45ed-a62a-4829a37c37f8",
                "attachments": []
            }
        ],
        "proofs": {
            "items": [
                {
                    "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                    "room": "Cuisine",
                    "task": "Nettoyer la cuisine",
                    "label": null,
                    "captured_at": "2026-11-05T10:05:00+01:00"
                },
                {
                    "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                    "room": "Salle de bain",
                    "task": "Nettoyer la salle de bain",
                    "label": null,
                    "captured_at": "2026-11-05T11:20:00+01:00"
                },
                {
                    "url": "https://cdn.example.test/reports/checklist.pdf",
                    "room": "Salle de bain",
                    "task": "Nettoyer la salle de bain",
                    "label": null,
                    "captured_at": "2026-11-05T11:20:00+01:00"
                }
            ],
            "required": 3,
            "received": 2,
            "missing": 1,
            "percent": 67
        },
        "videos": {
            "items": [
                {
                    "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                    "room": "Salle de bain",
                    "label": "Nettoyer la salle de bain",
                    "duration": 15
                }
            ]
        },
        "quality": {
            "punctuality": 4,
            "compliance": 5,
            "professionalism": 4,
            "global": 4.3,
            "insights": {
                "global": {
                    "value": 4.333333333333333,
                    "percent": 86.66666666666666,
                    "label": "Très bon",
                    "message": "Belle qualité globale, continuez sur cette lancée."
                },
                "items": [
                    {
                        "key": "punctuality",
                        "label": "Ponctualité",
                        "value": 4,
                        "percent": 80,
                        "description": "Très bon résultat, la ponctualité est maîtrisée avec seulement quelques détails à surveiller."
                    },
                    {
                        "key": "compliance",
                        "label": "Prestation",
                        "value": 5,
                        "percent": 100,
                        "description": "Score parfait : la qualité de prestation est irréprochable, bravo !"
                    },
                    {
                        "key": "feeling",
                        "label": "Professionnalisme",
                        "value": 4,
                        "percent": 80,
                        "description": "Très bon résultat, la ressenti global est maîtrisée avec seulement quelques détails à surveiller."
                    }
                ]
            }
        },
        "quality_control": {
            "visible": true,
            "defined_count": 3,
            "total": 3,
            "verified": 2,
            "missing": 1,
            "coverage_percent": 66.7,
            "rooms": [
                {
                    "name": "Cuisine",
                    "position": 0,
                    "total": 1,
                    "verified": 1,
                    "missing": 0,
                    "items": [
                        {
                            "label": "Évier",
                            "description": "Vérifier la propreté de cet élément.",
                            "expected_media": "https://cdn.example.test/reports/kitchen-before.jpg",
                            "proof_url": "https://cdn.example.test/reports/kitchen-after.jpg",
                            "media_type": "photo",
                            "verified": true
                        }
                    ],
                    "coverage_percent": 100
                },
                {
                    "name": "Salle de bain",
                    "position": 1,
                    "total": 1,
                    "verified": 1,
                    "missing": 0,
                    "items": [
                        {
                            "label": "Douche",
                            "description": "Vérifier la propreté de cet élément.",
                            "expected_media": "https://cdn.example.test/reports/bathroom-before.mp4",
                            "proof_url": "https://cdn.example.test/reports/bathroom-after.mp4",
                            "media_type": "video",
                            "verified": true
                        }
                    ],
                    "coverage_percent": 100
                },
                {
                    "name": "Chambre",
                    "position": 2,
                    "total": 1,
                    "verified": 0,
                    "missing": 1,
                    "items": [
                        {
                            "label": "Lit",
                            "description": "Vérifier la propreté de cet élément.",
                            "expected_media": null,
                            "proof_url": null,
                            "media_type": "photo",
                            "verified": false
                        }
                    ],
                    "coverage_percent": 0
                }
            ],
            "fully_controlled_rooms": 2,
            "room_count": 3,
            "items": [
                {
                    "label": "Évier",
                    "description": "Vérifier la propreté de cet élément.",
                    "expected_media": "https://cdn.example.test/reports/kitchen-before.jpg",
                    "proof_url": "https://cdn.example.test/reports/kitchen-after.jpg",
                    "media_type": "photo",
                    "verified": true,
                    "room": "Cuisine"
                },
                {
                    "label": "Douche",
                    "description": "Vérifier la propreté de cet élément.",
                    "expected_media": "https://cdn.example.test/reports/bathroom-before.mp4",
                    "proof_url": "https://cdn.example.test/reports/bathroom-after.mp4",
                    "media_type": "video",
                    "verified": true,
                    "room": "Salle de bain"
                },
                {
                    "label": "Lit",
                    "description": "Vérifier la propreté de cet élément.",
                    "expected_media": null,
                    "proof_url": null,
                    "media_type": "photo",
                    "verified": false,
                    "room": "Chambre"
                }
            ],
            "photo_proofs": [
                {
                    "id": "343fbbcb-fa9d-4eee-897f-07e819239c38",
                    "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                    "label": "Évier",
                    "room": "Cuisine"
                }
            ],
            "video_proofs": [
                {
                    "id": "12ea0c7c-3091-4c4c-b580-462f7be3773f",
                    "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                    "label": "Douche",
                    "room": "Salle de bain"
                }
            ],
            "photo_proofs_before": [
                {
                    "id": "a815a49c-b74c-4e74-9145-4ad4a363bf84",
                    "url": "https://cdn.example.test/reports/kitchen-before.jpg",
                    "label": "Évier",
                    "room": "Cuisine"
                }
            ],
            "video_proofs_before": [
                {
                    "id": "1ee4bc6e-b7cf-4828-ba63-09e0147e8d74",
                    "url": "https://cdn.example.test/reports/bathroom-before.mp4",
                    "label": "Douche",
                    "room": "Salle de bain"
                }
            ],
            "started_at": "2026-11-05T11:20:00+01:00",
            "ended_at": "2026-11-05T11:35:00+01:00",
            "duration_seconds": 900,
            "attention_items": [
                {
                    "label": "Lit",
                    "description": "Vérifier la propreté de cet élément.",
                    "expected_media": null,
                    "proof_url": null,
                    "media_type": "photo",
                    "verified": false,
                    "room": "Chambre"
                }
            ],
            "history": [
                {
                    "date": "2026-11-04T11:30:00+01:00",
                    "coverage_percent": 100,
                    "total": 1,
                    "verified": 1
                }
            ],
            "media_items": [
                {
                    "id": "control_9b0ecc5f220aceef58487254e740040c7374758614703990a76f6f5aeebc86cf",
                    "source": "quality_control",
                    "label": "Évier",
                    "room": "Cuisine",
                    "before": [
                        {
                            "id": "a815a49c-b74c-4e74-9145-4ad4a363bf84",
                            "type": "photo",
                            "url": "https://cdn.example.test/reports/kitchen-before.jpg",
                            "mime_type": null,
                            "captured_at": "2026-11-05T09:25:00+01:00"
                        }
                    ],
                    "after": [
                        {
                            "id": "343fbbcb-fa9d-4eee-897f-07e819239c38",
                            "type": "photo",
                            "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                            "mime_type": null,
                            "captured_at": "2026-11-05T11:30:00+01:00"
                        }
                    ],
                    "unpositioned": []
                },
                {
                    "id": "control_704cd26e0f48e824f65f4a325761406d2ec7da8b08d5ed6957aac2b0182f4ea7",
                    "source": "quality_control",
                    "label": "Douche",
                    "room": "Salle de bain",
                    "before": [
                        {
                            "id": "1ee4bc6e-b7cf-4828-ba63-09e0147e8d74",
                            "type": "video",
                            "url": "https://cdn.example.test/reports/bathroom-before.mp4",
                            "mime_type": null,
                            "captured_at": "2026-11-05T09:25:00+01:00"
                        }
                    ],
                    "after": [
                        {
                            "id": "12ea0c7c-3091-4c4c-b580-462f7be3773f",
                            "type": "video",
                            "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                            "mime_type": null,
                            "captured_at": "2026-11-05T11:30:00+01:00"
                        }
                    ],
                    "unpositioned": []
                },
                {
                    "id": "attachment_2d059cfb3d4cd12e806985554d88b5952da959075093f32fcc54252bd2acb53d",
                    "source": "provider_reports.0",
                    "label": null,
                    "room": null,
                    "before": [],
                    "after": [],
                    "unpositioned": [
                        {
                            "id": "8b353f645851bce8197d10bc77dfbfc33db14a11ff7c40c364a23c49b0a083fa",
                            "type": "photo",
                            "url": "https://cdn.example.test/reports/issue.jpg",
                            "mime_type": null,
                            "captured_at": null
                        }
                    ]
                }
            ]
        },
        "provider_reports": [
            {
                "date": "05/11/2026",
                "time": "11:30",
                "message": "Rayure signalée sur la table.",
                "reporter_first_name": "Alex",
                "pictures": [
                    "https://cdn.example.test/reports/issue.jpg"
                ]
            }
        ],
        "benchmarks": {
            "visible": true,
            "sample_count": 3,
            "minimum_samples": 3,
            "history": [
                {
                    "date": "2026-11-02T11:15:00+01:00",
                    "actual_seconds": 8100,
                    "planned_seconds": 7200,
                    "x_percent": 0,
                    "actual_y_percent": 15,
                    "planned_y_percent": 24.44
                },
                {
                    "date": "2026-11-03T11:10:00+01:00",
                    "actual_seconds": 7800,
                    "planned_seconds": 7200,
                    "x_percent": 50,
                    "actual_y_percent": 18.15,
                    "planned_y_percent": 24.44
                },
                {
                    "date": "2026-11-04T11:05:00+01:00",
                    "actual_seconds": 7500,
                    "planned_seconds": 7200,
                    "x_percent": 100,
                    "actual_y_percent": 21.3,
                    "planned_y_percent": 24.44
                }
            ],
            "chart": {
                "labels": [
                    "02/11",
                    "03/11",
                    "04/11"
                ],
                "actual_minutes": [
                    135,
                    130,
                    125
                ],
                "planned_minutes": [
                    120,
                    120,
                    120
                ]
            },
            "chart_maximum_seconds": 8100,
            "average_seconds": 7800,
            "delta_seconds": 360,
            "current_seconds": 8160,
            "faster_than_percent": 0,
            "position_percent": 100
        },
        "checkout": {
            "visible": true,
            "quality_controlled": true
        },
        "laundry": {
            "visible": false,
            "items": []
        },
        "restock": {
            "visible": false,
            "items": []
        },
        "maintenance": {
            "visible": false,
            "issues": []
        },
        "financials": {
            "visible": true,
            "total": 120,
            "currency": "USD",
            "cost_per_hour": 52.94,
            "cost_per_square_meter": 1.5,
            "surface_square_meters": 80,
            "cost_per_task": 40,
            "cleaning_fee": 150,
            "balance": 30
        },
        "insurance": {
            "visible": false
        },
        "automation": {
            "events": [
                {
                    "label": "Intervention créée",
                    "at": "2026-11-01T10:00:00+00:00"
                },
                {
                    "label": "Démarrage",
                    "at": "2026-11-05T09:20:00+01:00"
                },
                {
                    "label": "Clôture",
                    "at": "2026-11-05T11:36:00+01:00"
                },
                {
                    "label": "Rapport généré",
                    "at": "2026-11-05T12:00:00+00:00"
                }
            ],
            "automated_count": 4,
            "human_count": null,
            "fully_automated": false
        },
        "next_arrival": {
            "visible": false
        },
        "consumption": {
            "visible": false
        },
        "anomalies": {
            "items": [
                {
                    "severity": "high",
                    "title": "Tâches non réalisées",
                    "description": "1 tâche(s) du protocole ne sont pas validées."
                },
                {
                    "severity": "medium",
                    "title": "Preuves manquantes",
                    "description": "1 preuve(s) requise(s) sont absentes."
                },
                {
                    "severity": "medium",
                    "title": "Démarrage retardé",
                    "description": "Le démarrage dépasse la fenêtre prévue de plus de 15 minutes."
                }
            ],
            "critical": false,
            "headline": "3 point(s) à examiner"
        },
        "recommendations": [
            {
                "title": "Compléter les preuves",
                "description": "Ajoutez une exigence photo claire aux tâches concernées.",
                "action": "Modifier le protocole"
            },
            {
                "title": "Revoir le protocole",
                "description": "Certaines tâches applicables n’ont pas été validées.",
                "action": "Voir les tâches"
            },
            {
                "title": "Ajuster la durée prévue",
                "description": "La durée réelle dépasse sensiblement la planification.",
                "action": "Modifier la durée"
            }
        ],
        "ai_summary": {
            "executive": "L’intervention est terminée, mais certains éléments méritent une vérification.",
            "positives": [],
            "attention": [
                "1 tâche(s) du protocole ne sont pas validées.",
                "1 preuve(s) requise(s) sont absentes.",
                "Le démarrage dépasse la fenêtre prévue de plus de 15 minutes."
            ]
        },
        "data_confidence": {
            "score": 67,
            "level": "Partielle",
            "explanation": "4 critères de traçabilité sur 6 sont vérifiés.",
            "presence_verified": true,
            "presence_method": "Pointages horodatés"
        },
        "analytical_basis": {
            "total": 365,
            "categories": [
                {
                    "key": "tasks",
                    "label": "Tâches réalisées",
                    "count": 2,
                    "percent": 0.55
                },
                {
                    "key": "controls",
                    "label": "Points de contrôle",
                    "count": 3,
                    "percent": 0.82
                },
                {
                    "key": "validations",
                    "label": "Critères de validation",
                    "count": 0,
                    "percent": 0
                },
                {
                    "key": "photos",
                    "label": "Preuves photo",
                    "count": 2,
                    "percent": 0.55
                },
                {
                    "key": "videos",
                    "label": "Preuves vidéo",
                    "count": 1,
                    "percent": 0.27
                },
                {
                    "key": "timing",
                    "label": "Mesures temporelles",
                    "count": 180,
                    "percent": 49.32
                },
                {
                    "key": "execution",
                    "label": "Points de suivi d’exécution",
                    "count": 23,
                    "percent": 6.3
                },
                {
                    "key": "performance",
                    "label": "Signaux de performance",
                    "count": 132,
                    "percent": 36.16
                },
                {
                    "key": "history",
                    "label": "Données historiques",
                    "count": 22,
                    "percent": 6.03
                }
            ],
            "reviewed_at": "2026-11-05T12:00:00+01:00"
        },
        "visibility": {
            "agent": true,
            "proofs": true,
            "videos": true,
            "financials": true
        }
    },
    "media": {
        "total": 7,
        "photos": [
            {
                "id": "343fbbcb-fa9d-4eee-897f-07e819239c38",
                "source": "quality_control.photo_proofs.0.url",
                "position": "after",
                "type": "photo",
                "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                "mime_type": null,
                "label": "Évier",
                "room": "Cuisine",
                "task": null,
                "captured_at": null
            },
            {
                "id": "a815a49c-b74c-4e74-9145-4ad4a363bf84",
                "source": "quality_control.photo_proofs_before.0.url",
                "position": "before",
                "type": "photo",
                "url": "https://cdn.example.test/reports/kitchen-before.jpg",
                "mime_type": null,
                "label": "Évier",
                "room": "Cuisine",
                "task": null,
                "captured_at": null
            },
            {
                "id": "8c4bac442988751f074d52ac616f336c637e7cd210e69df01665c9909914b4ba",
                "source": "intervention.property_thumbnail",
                "position": "unspecified",
                "type": "photo",
                "url": "https://cdn.example.test/reports/property.jpg",
                "mime_type": null,
                "label": null,
                "room": null,
                "task": null,
                "captured_at": null
            },
            {
                "id": "809198d719903bf9b1b3ff30dd3f3d0a6d4cf4b0d6b3e601dca25ec21f40e016",
                "source": "provider_reports.0.pictures.0",
                "position": "unspecified",
                "type": "photo",
                "url": "https://cdn.example.test/reports/issue.jpg",
                "mime_type": null,
                "label": null,
                "room": null,
                "task": null,
                "captured_at": null
            }
        ],
        "videos": [
            {
                "id": "12ea0c7c-3091-4c4c-b580-462f7be3773f",
                "source": "quality_control.video_proofs.0.url",
                "position": "after",
                "type": "video",
                "url": "https://cdn.example.test/reports/bathroom-after.mp4",
                "mime_type": null,
                "label": "Douche",
                "room": "Salle de bain",
                "task": null,
                "captured_at": null
            },
            {
                "id": "1ee4bc6e-b7cf-4828-ba63-09e0147e8d74",
                "source": "quality_control.video_proofs_before.0.url",
                "position": "before",
                "type": "video",
                "url": "https://cdn.example.test/reports/bathroom-before.mp4",
                "mime_type": null,
                "label": "Douche",
                "room": "Salle de bain",
                "task": null,
                "captured_at": null
            }
        ],
        "documents": [
            {
                "id": "a76f4badc4ac26952117500bf6305819f9011a91b42f66fcf8bbb3d859300984",
                "source": "rooms.1.tasks.0.proof_items.1.url",
                "position": "unspecified",
                "type": "document",
                "url": "https://cdn.example.test/reports/checklist.pdf",
                "mime_type": "application/pdf",
                "label": "Nettoyer la salle de bain",
                "room": "Salle de bain",
                "task": "Nettoyer la salle de bain",
                "captured_at": "2026-11-05T11:20:00+01:00"
            }
        ]
    }
}
GET/api/v1/reports/{id}/media

Get before-and-after evidence

Retrieve photo and video evidence grouped by item, with before and after captures together, to verify the work, analyze it or share a clear record with your clients.

参数

参数类型位置必填详情
idstring路径是UUID of the cleaning intervention. Reports have no separate ID; all report endpoints use the intervention ID.6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456
localestring查询否Caption language: fr, en, es, it, pt or de. Defaults to the company language.fr
typestring查询否Evidence type: photo, video or all (default). Omit to return all photos and videos.photo
positionstring查询否Capture stage: before, after or both (default).before

Captures with no known stage are kept in unpositioned and returned only in both mode. An empty before or after array means no capture is available for that stage. Uses the full report’s permanent snapshot and access checks; inaccessible reports return 404 (SUPER_ADMIN may read across companies). Errors are JSON; respect Retry-After.

请求限制:30 / 分钟300 / 小时1500 / 天

请求示例 · GET

cURL

curl --request 'GET' 'https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000/media?locale=fr&type=photo&position=before' \
  --header 'Authorization: Basic YOUR_API_TOKEN' \
  --header 'Accept: application/json'

JavaScript

const response = await fetch("https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000/media?locale=fr&type=photo&position=before", {
    "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/reports/00000000-0000-4000-8000-000000000000/media?locale=fr&type=photo&position=before');
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/reports/00000000-0000-4000-8000-000000000000/media?locale=fr&type=photo&position=before", data=data, headers=headers, method="GET")
with urlopen(request) as response:
    result = json.load(response)

响应示例

{
    "metadata": {
        "cleaning_intervention_id": "6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456",
        "locale": "fr"
    },
    "media": {
        "total_items": 1,
        "total_files": 2,
        "items": [
            {
                "id": "control_08e83f6a",
                "source": "quality_control",
                "label": "Plan de travail",
                "room": "Cuisine",
                "before": [
                    {
                        "id": "b0ee6a17-a016-41c3-880e-c65fbc5631d8",
                        "type": "photo",
                        "url": "https://cdn.example.test/reports/kitchen-before.jpg",
                        "mime_type": null,
                        "captured_at": "2026-11-05T09:00:00+01:00"
                    }
                ],
                "after": [
                    {
                        "id": "8250d419-bd5e-41b2-82a5-1ad99c953a20",
                        "type": "photo",
                        "url": "https://cdn.example.test/reports/kitchen-after.jpg",
                        "mime_type": null,
                        "captured_at": "2026-11-05T11:00:00+01:00"
                    }
                ],
                "unpositioned": []
            }
        ]
    }
}
GET/api/v1/reports/{id}/summary

Get a report summary

Get an at-a-glance view of an intervention’s outcome, points to review and recommendations, so you can track services from your own tools.

参数

参数类型位置必填详情
idstring路径是UUID of the cleaning intervention. Reports have no separate ID; all report endpoints use the intervention ID.6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456
localestring查询否Content language: fr, en, es, it, pt or de. Defaults to the company language.fr

The same access rules as the full report apply: 404 if unavailable or outside your company (except SUPER_ADMIN). The summary uses the same permanent snapshot. Access is checked on every call. Errors are JSON; respect Retry-After.

请求限制:30 / 分钟300 / 小时1500 / 天

请求示例 · GET

cURL

curl --request 'GET' 'https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000/summary?locale=fr' \
  --header 'Authorization: Basic YOUR_API_TOKEN' \
  --header 'Accept: application/json'

JavaScript

const response = await fetch("https://api.stayclean.io/api/v1/reports/00000000-0000-4000-8000-000000000000/summary?locale=fr", {
    "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/reports/00000000-0000-4000-8000-000000000000/summary?locale=fr');
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/reports/00000000-0000-4000-8000-000000000000/summary?locale=fr", data=data, headers=headers, method="GET")
with urlopen(request) as response:
    result = json.load(response)

响应示例

{
    "metadata": {
        "cleaning_intervention_id": "6dfc7a2e-8f9a-4a0f-9bd0-3f5a7d123456",
        "locale": "fr"
    },
    "summary": {
        "overview": {
            "ready": true,
            "score": 96,
            "grade": "A"
        },
        "quality": {
            "global": 4.8
        },
        "anomalies": {
            "items": [],
            "critical": false
        },
        "recommendations": [],
        "ai_summary": {
            "executive": "Le logement est prêt."
        }
    }
}