Skip to content
Smartlife Docs
FR
Stored only in this browser (never sent to this server) and reused on every “Test this endpoint” page below.
Scopes granted to this token (see the response received during authentication):
The “Test” buttons below stay disabled until the scope required by the endpoint is ticked here.

GET /api/rentals/summary

Required scope: rentals:read (“OAuth application” flow) or rental:read (partner flow).

Returns, for each rental project accessible to your token, a financial summary per year (field names are in French):
  • attendu (expected): rent + charges + fees expected over the year, all rental types combined;
  • depenses (expenses): expenses recorded over the year (overall);
  • encaisse (collected): amounts actually collected over the year, all types combined;
  • benefices (profit): encaisse - depenses;
  • taux_occupation (occupancy rate): average of the year's monthly occupancy rates;
  • taux_recouvrement (collection rate): encaisse / attendu * 100;
  • par_mois (per month): month-by-month detail (YYYY-MM key) of attendu, encaisse, depenses and taux_occupation;
  • benefices_par_type (profit per type): the same detail (attendu, encaisse, depenses_allouees, benefices, taux_recouvrement) separately for long_terme (long term) and court_terme (short term, holiday rental). As expenses are not linked to a specific type in the data, they are allocated in proportion to the amount collected for each type.
GET /api/rentals/summary request and example JSON response
Request and response of the rentals/summary endpoint.

Holiday rentals now included

Short-term (holiday) contracts are now counted in the totals above, whereas they used to be excluded. A project with holiday rentals will therefore show higher amounts than before this update.

curl https://construction.my-smartlife.fr/api/rentals/summary \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Example response:
{
  "rentals": [
    {
      "id": "12",
      "name": "Résidence Les Palmiers",
      "currency": "XOF",
      "resume": {
        "2025": {
          "attendu": 4860000.0,
          "depenses": 40000.0,
          "encaisse": 405000.0,
          "benefices": 365000.0,
          "taux_occupation": 100.0,
          "taux_recouvrement": 8.33,
          "par_mois": {
            "2025-01": { "attendu": 405000.0, "encaisse": 405000.0, "depenses": 40000.0, "taux_occupation": 100.0 }
          },
          "benefices_par_type": {
            "long_terme": { "attendu": 1260000.0, "encaisse": 105000.0, "depenses_allouees": 10370.37, "benefices": 94629.63, "taux_recouvrement": 8.33 },
            "court_terme": { "attendu": 3600000.0, "encaisse": 300000.0, "depenses_allouees": 29629.63, "benefices": 270370.37, "taux_recouvrement": 8.33 }
          }
        }
      }
    }
  ]
}

Test this endpoint

Paste your access token above (sidebar), then run the real API call to see the response for your own account.


Link copied!