Application mobile de scan de QR codes de colis retournés, avec vérification du statut dans OM Express / Ecotrack et validation officielle du retour.
Projet totalement indépendant des autres applications SAMI.TECH : code, logique, base SQLite et fonctions propres à ce val.
retour_recu ou livraison_echoue_recu.| Niveau | Signification |
|---|---|
| 1 | QR détecté |
| 2 | Tracking trouvé dans OM Express |
| 3 | Tracking éligible au retour (retour_recu / livraison_echoue_recu) |
| 4 | Retour réellement validé (returned = "success" ou confirmation après relecture) |
Un QR détecté ne signifie jamais que le retour est validé.
Rendering mermaid diagram...
| Méthode | Route | Rôle |
|---|---|---|
| GET | /health | Santé ({ "ok": true }) |
| GET | /api/access/status | Schéma configuré ? session ouverte ? |
| POST | /api/access/setup | Créer le schéma (une seule fois) |
| POST | /api/access/unlock | Déverrouiller (cookie sami_access, ~12 h) |
| POST | /api/access/logout | Verrouiller |
| GET | /api/config | apiSaved |
| GET/POST/DELETE | /api/ecotrack/settings | Token API (jamais réaffiché) |
| POST | /api/validate | Vérifier un tracking |
| POST | /api/return/validate | Valider un retour (mutation) |
GET /api/v1/validate/tokenGET /api/v1/get/orders?tracking=...POST /api/v1/valid/returns avec { "trackings": ["..."] }/retours/recu/validated — dépendait d'une session web Ecotrack (HTTP 403)./api/v1/valid/order — autre opération, ne remplace pas /valid/returns.API_NOT_CONFIGURED, ECOTRACK_READ_ERROR, ECOTRACK_BAD_RESPONSE, TRACKING_NOT_FOUND,
TRACKING_FOUND, ECOTRACK_NETWORK_ERROR, RETURN_NOT_READY, RETURN_INVALID,
RETURN_API_ERROR, RETURN_NOT_ELIGIBLE, RETURN_VALIDATED, RETURN_ACCEPTED_UNCONFIRMED,
RETURN_UNEXPECTED_RESPONSE, RETURN_NETWORK_ERROR.
app_settings.ecotrack_api_credentials
(clé ecotrack_api_credentials, format { "apiToken": "..." }).httpStatus, returned et emptyBody.ENREGISTRER L'API.VALIDER LE RETOUR apparaît ; sinon le scanner reprend seul.La base SQLite et les réglages sont propres à ce val. Aucune donnée n'est partagée avec une autre application SAMI.TECH.