Skip to content

Connecting a host

Your API key proves that you are who you say you are. It gives you no rights over anyone’s properties.

For that, each of your users has to authorize you from their own Localoge account. It is exactly what they already do to connect their Airbnb or Booking.com account in your tool.

Your interface Localoge You
─────────────────────────────────────────────────────────────────────
The user ticks
"Localoge", clicks
Connect
│
└──── redirect ──────▶ They log in
or sign up
│
"Your-tool wants to
manage your properties"
[Allow] [Deny]
│
◀─── redirect with a code ───▶
You exchange
the code for
a host_ref
https://localoge.com/connect
?partner=your-identifier
&redirect_uri=https://your-tool.com/callback/localoge
&state=a-value-of-yours
&code_challenge=BASE64URL(SHA256(code_verifier))
&code_challenge_method=S256
Parameter
partner Your identifier, the one we gave you along with your key.
redirect_uri Where we send the user back afterwards. Must match what you registered with us.
state Required (at least 8 characters). A random value of your own, bound to your user’s session, returned to you unchanged: check it on return (request-forgery protection).
scope Optional. listings (default: manage properties) and/or identity (“Sign in with Localoge”: name, email and whether it is verified, language). With identity listings, the user ticks or not “also link my listings” on the same screen.
code_challenge, code_challenge_method PKCE (S256). Required for every scope (OAuth 2.1); plain is rejected; the code_verifier is required when exchanging the code.

Open this URL in the user’s browser, not server-side: they are the one who has to log in and click.

If they allow access:

https://your-tool.com/callback/localoge?code=9f2c1a44…&state=a-value-of-yours

If they deny it:

https://your-tool.com/callback/localoge?error=access_denied&state=a-value-of-yours
Fenêtre de terminal
curl -X POST https://localoge.com/api/v1/channel/oauth/token \
-H "Authorization: Bearer $LOCALOGE_KEY" \
-H "Content-Type: application/json" \
-d '{ "code": "9f2c1a44…" }'
{ "success": true, "data": { "host_ref": "lh_4f8a2c…", "host_name": "Conciergerie Mont Blanc" } }

4. Store the host_ref and send it everywhere

Section titled “4. Store the host_ref and send it everywhere”

It tells us which account owns each property you send us:

{
"external_property_id": "PROP-4821",
"host_ref": "lh_4f8a2c…",
"title": "Studio vue mer"
}

It never changes, even if the user revokes and then grants access again. Store it with that user’s account, just as you store their Airbnb credentials.

A special case: you manage your own properties

Section titled “A special case: you manage your own properties”

If you are not a Channel Manager but a property manager who built your own tool for your own properties, there is nobody to ask for authorization. Tell us: we link your Localoge account to your key, and you can omit host_ref.

This is the only case where the field is optional.

This is the Airbnb-style flow: the user never leaves your software for more than a minute.

  1. Connect Localoge. In your interface, the user ticks “Localoge” and clicks Connect.
  2. Sign in or sign up. You send them to /connect. They sign in with Google, Apple or email, or create their account on the spot.
  3. Authorization. They read what your software will be able to do and click Authorize.
  4. Return with a code. We send them back to your redirect_uri with code and state. You exchange the code for a host_ref (step 3 above).
  5. Select properties. Show their existing Localoge listings with GET /host/listings?host_ref=…, one checkbox per property: for each ticked box, claim the listing (claim). One software per listing: if another software already manages it, 409 CONFLICT, the host must disconnect it first; for a property they do not have with us yet, create it with POST /properties.
  6. Synchronize. Push rates, availability and bookings as usual, with that host_ref.

A management company attached to a listing by its owner sees it in GET /host/listings, next to its own listings.

  • role: owner (default, the linked host’s own listing) or manager (listing managed for an owner). managed_for.display_name: the owner’s abbreviated display name, plus first_name and last_name (the owner’s full first and last name, so you can match an existing record instead of creating a duplicate). Never an email, phone, address or identifier, and only while the mandate is neither refused nor withdrawn.
  • Claim: allowed for the manager with the same rules as for an owner (one software per listing). Otherwise 404, with no hint about the owner.
  • What the manager can write: availability, reservations, rates, extras, listing details and photos, like the owner. The owner keeps every right. On simultaneous edits, the last write wins.
  • What stays hidden: payout is null (no bank details, no owner share).
  • Refused or withdrawn mandate: if the latest mandate is refused or withdrawn, the listing leaves the list and writing rates and extras answers 403 FORBIDDEN.
  • Trace: every rates or extras write is recorded with its author (modifie_par: gestionnaire or proprietaire).

Guest reviews for the host (GET /host/reviews)

Section titled “Guest reviews for the host (GET /host/reviews)”

GET /host/reviews?host_ref=…&since=…&page=1 returns the reviews guests left on the linked host’s listings, including those the host manages for an owner (mandate neither refused nor withdrawn). Scope reviews:read.

  • Each review: id, listing_id, external_property_id (null if you have not claimed the listing), role (owner or manager), kind (always listing: the guest’s review of the property, never the host’s review of the guest), rating (out of 10), comment, guest_first_name (first name only, never the surname, email or phone), created_at (when it was written), published_at (when it became public).
  • Only public reviews are returned: a review stays hidden until the host has rated the guest or 7 days have passed after the stay, and a review hidden by an administrator is never returned.
  • since (ISO 8601 date) filters on published_at, not created_at: a review written early can be revealed later. Use the largest published_at you read as the next since. Ascending order, 50 reviews per page, has_more tells whether more remain.
  • Host reply: not available on Localoge yet. host_reply and host_reply_at are always null, and there is no route to reply.

Several owners (property-management company)

Section titled “Several owners (property-management company)”

A management company handles properties for several owners, each with their own Localoge account.

  • One /connect link per owner. Put that owner’s identifier in your system into state (followed by a random value, see above): on return you know which owner the host_ref belongs to.
  • One distinct host_ref per owner. Never mix two owners under the same reference.
  • Tracking. GET /owners lists your owners: host_ref, host_name, status (connected or revoked), connected_at, revoked_at, listings_count. Never an email. Cursor-paginated like the other lists. The host.connected (code exchanged) and host.revoked (access withdrawn) webhooks save you from polling.
Fenêtre de terminal
curl https://localoge.com/api/v1/channel/owners?limit=100 -H "Authorization: Bearer $LOCALOGE_KEY"
{ "success": true, "data": { "owners": [
{ "host_ref": "lh_4f8a2c…", "host_name": "Marie Durand", "status": "connected",
"connected_at": "2026-11-08T09:12:00.000Z", "revoked_at": null, "listings_count": 3 } ],
"next_cursor": null } }

You already know the owner’s email? Add &login_hint=marie@example.com to the /connect link: the email field of the sign-in or sign-up screen is prefilled. It is only a convenience: the user can change it, and it grants no right.

An owner who signs up with an email must first click the confirmation link they receive. The return is resumed automatically: after confirming, they land back on your software’s authorization screen, with nothing to redo. Google and Apple accounts are confirmed from the start.

The owner can withdraw access at any time from “My managers” in their account. You receive host.revoked and their host_ref answers FORBIDDEN. If they reconnect later, they go through /connect again and you receive host.connected with the same host_ref: properties you already claimed find you again, with no duplicates.

When the host leaves you on your side, tell us: POST /oauth/revoke with { "host_ref": "…" } revokes the link at Localoge. Idempotent (200 even if it was already revoked, already_revoked: true). No host.revoked comes back to you for your own request and the host is not emailed. A host_ref unknown to your account answers 403 FORBIDDEN.

As with Airbnb, a host has only one management software linked at a time: two tools would fight over their rates and availability. If they already have one, authorization is refused with the already_linked error (HTTP 409) and the screen tells them which: they unlink it first in “My managers”, then start again. Warn your users about this case in your interface.