Aller au contenu

API Reference

A versioned REST API. Account endpoints under /api/v1 authenticate with a per-user API key. ZOOM SPACE search and listing reads are public: they return the neighborhood and an approximate location, never the street address, and they never change a listing or a RIMOC level.

Authentication

Generate a key in Settings. Pass it as a Bearer token. Keys are shown once at creation and stored hashed — generating a new key revokes the previous one.

curl https://immoconnect.etugrand.com/api/v1/me \
  -H "Authorization: Bearer sk_..."

Requests are rate limited to 60 per minute per user. Exceeding it returns 429.

Responses

Successful responses wrap the payload in data. Errors carry a machine-readable code and a human-readable message.

{ "data": { "id": "usr_...", "name": "Ada Lovelace" } }

{ "error": { "code": "NOT_FOUND", "message": "Not found" } }
StatusMeaning
401Missing or invalid API key
404Not found, or not yours
400Invalid search filters
429Rate limit exceeded

ZOOM SPACE

GET/api/v1/zoom-space/search

Published listings only. Filters combine: city, neighborhood, type, min, max, rooms. Pages are small.

curl "https://immoconnect.etugrand.com/api/v1/zoom-space/search?city=cotonou&rooms=2&page=1"
{
  "data": [
    {
      "id": "seed-cadjehoun-appart",
      "title": "Appartement 2 chambres à Cadjèhoun",
      "neighborhood": "Cadjèhoun",
      "approxLocation": "Près de la marina, côté Haie Vive",
      "monthlyRent": 180000,
      "trustLevel": 3,
      "lastConfirmedAt": "2026-11-09T12:00:00.000Z"
    }
  ],
  "meta": { "page": 1, "pageSize": 6, "total": 1 }
}
GET/api/v1/zoom-space/listings/:id

One published listing: photos, entry cost, and the read-only trust badge. Unknown or unpublished ids return 404.

curl https://immoconnect.etugrand.com/api/v1/zoom-space/listings/seed-cadjehoun-appart

Favorites

Saved listings belong to IMMOCONNECT. The session cookie, or the bearer token returned at phone verification, is required. A second save of the same published listing changes nothing. Drafts cannot be saved. The list uses the public card: neighborhood and approximate location, never the street address.

GET/api/v1/favorites

The signed-in user's saved published listings, newest first.

POST/api/v1/favorites

Save a published listing. Repeating the call returns the same saved state.

curl -X POST https://immoconnect.etugrand.com/api/v1/favorites \
  -H "Content-Type: application/json" \
  -d '{ "propertyId": "seed-cadjehoun-appart" }'
GET/api/v1/favorites/:propertyId

Whether this listing is saved. The answer is saved: true or false.

DELETE/api/v1/favorites/:propertyId

Remove a saved listing. Removing one that was not saved still returns saved: false.

Contact

A signed-in seeker records one inquiry per WhatsApp click, call, or visit request. The web app sends the session cookie, the same way listing publication does. The listing publisher, or an admin, can read the rows and move a visit to done, rented, or closed. The response never includes the street address.

POST/api/v1/inquiries

Record a contact. kind is whatsapp, call, or visit. The row is created as open. WhatsApp and call responses include the link to open.

curl -X POST https://immoconnect.etugrand.com/api/v1/inquiries \
  -H "content-type: application/json" \
  -d '{"propertyId":"seed-cadjehoun-appart","kind":"visit"}'
GET/api/v1/listings/:id/inquiries

Inquiries on one listing, for its publisher or an admin. Optional kind=visit.

PATCH/api/v1/inquiries/:id

Set status to a value allowed for that kind. visit_done is only valid on a visit.

{ "status": "visit_done" }

Account

GET/api/v1/me

The authenticated user's profile.

{
  "data": {
    "id": "usr_...",
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "role": "user"
  }
}