Imports: knowing when a sync is done

When an account is connected, Repull imports what it already holds: listings, reservations, conversations and reviews. Every import is tracked from start to finish, so you can tell your users exactly when their data is ready instead of guessing.

Connecting from the dashboard

An account you connect yourself from the dashboard shows its first import live there, and we email the workspace owner when everything is in. Accounts your users connect through your own app (hosted or embedded Connect) get no email from us: your app hears it from the account.import.completed webhook, below.

When an import runs

  • connect — the first sync, right after the account is connected.
  • mapping — a room or unit was mapped to a listing after connecting, so its bookings and messages import now.
  • reconnect — the account was connected again after a disconnection.
  • resync — a later re-sync, including a listings import you asked for (below).

An import is listed as running from the moment it is queued, with its importId, and account.import.started goes out at once, so a freshly connected account always has an import you can follow.

If the first import does not start

A queued import that has not started 10 minutes later ends failed with reason did_not_start, and account.import.failed goes out: the account never sits on never_synced without an explanation. Start it again with POST /v1/connections/{id}/imports and {"scope": "full"}: the same import a new connection runs — listings with their calendars, reservations, then payouts, reviews and conversations. There is no need to send the host through the connection flow again.

curl -X POST https://api.repull.dev/v1/connections/airbnb:1234567/imports \
  -H "Authorization: Bearer $REPULL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scope": "full"}'

# 202 Accepted
# { "data": { "connection": "airbnb:1234567", "scope": "full", "status": "queued", "queuedAt": "2026-11-17T16:05:00.000Z",
#             "importId": "9d41c3e2-6a0b-4f7e-b2c8-51e0a7d3f964",
#             "replacedImportId": "e57252d3-b21d-4a5a-8169-552e428c606e" } }

full is for an account that has never been fully imported (a first import that failed, stalled or never started). With no body at all, Repull picks it for such an account and a listings refresh otherwise. If a queued import of the account is still waiting, a full request closes it as did_not_start once it is 10 minutes old and returns its id as replacedImportId; before that, and while an import is running, it returns 409 conflict. Once the account has been fully imported, full returns 409 conflict: everything keeps syncing on its own, and new listings come in with {"scope": "listings"}. Airbnb connections only for now.

// account.import.failed: retry a first import that never started
app.post('/webhooks/repull', async (req, res) => {
  const { event, account, data } = req.body
  if (event === 'account.import.failed' && data.trigger === 'connect' && data.reason === 'did_not_start') {
    const handle = `${account.provider}:${account.externalAccountId}`
    await fetch(`https://api.repull.dev/v1/connections/${handle}/imports`, {
      method: 'POST',
      headers: { Authorization: `Bearer ${process.env.REPULL_API_KEY}`, 'Content-Type': 'application/json' },
      body: JSON.stringify({ scope: 'full' }),
    })
  }
  res.sendStatus(200)
})

New listings added after connecting

A property the host adds on Airbnb after connecting is picked up on its own: every connected Airbnb account's listings are re-read once a day, and again whenever the host reconnects the account. A new listing comes in with its calendar (pricing and availability). Reservations, conversations, reviews and payouts are not imported again.

On a full-access connection Repull is the source of your calendars, so the calendars of listings already in Repull are not re-read from Airbnb: the prices, availability and booking rules you set through Repull stay as they are. On read-only and messaging connections, calendars are re-read from Airbnb as well.

To pick a new property up right away, refresh the account's listings with POST /v1/connections/{id}/imports. It returns 202 and runs in the background as an import with one listings stage (trigger resync), so you can wait for it like any other import, then read the new listings with GET /v1/listings.

curl -X POST https://api.repull.dev/v1/connections/airbnb:1234567/imports \
  -H "Authorization: Bearer $REPULL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scope": "listings"}'

# 202 Accepted
# { "data": { "connection": "airbnb:1234567", "scope": "listings", "status": "queued", "queuedAt": "2026-11-13T15:04:00.000Z",
#             "importId": "5b7e0c1d-2f4a-4c8e-9a61-0d3e8f2b7c15", "replacedImportId": null } }

New listings follow your plan's active-listing limit: past it, and when the property is unlisted on Airbnb, they arrive inactive and can be activated later. Existing listings keep their status. A request while a listings import of the account is already running returns 409 conflict; a disconnected account returns 409 connection_reauth_required (reconnect it instead).

Wait for it

With webhooks (recommended). Subscribe to account.import.started, account.import.completed and account.import.failed. Each carries the standard account block (provider, externalAccountId), so you know which of your users it is about.

{
  "event": "account.import.completed",
  "eventId": "3f1c9a2e-8b7d-4c6a-9e0f-1a2b3c4d5e6f",
  "account": { "id": 228, "provider": "booking_extranet", "externalAccountId": "20123456" },
  "data": {
    "importId": "7f0c2a9e-3b1d-4c55-9a8e-2d6f1b0c4e71",
    "trigger": "connect",
    "status": "completed",
    "outcome": "complete",
    "startedAt": "2026-10-16T18:24:19.000Z",
    "completedAt": "2026-10-16T18:29:23.000Z",
    "stages": [
      { "name": "account", "expected": 1, "done": 1, "failed": 0 },
      { "name": "reservations", "expected": 9, "done": 9, "failed": 0 },
      { "name": "reviews", "expected": 1, "done": 1, "failed": 0 }
    ],
    "counts": { "listings": 1, "reservations": 219, "reviews": 100 }
  }
}

By polling. Every connection on GET /v1/connect carries its latest import, and GET /v1/connections/{id}/imports lists the account's runs, newest first (id is {provider}:{externalAccountId}).

// Wait until the account's newest import has finished.
// handle = '{provider}:{externalAccountId}', e.g. 'booking_extranet:20123456'
async function waitForImport(handle: string) {
  for (;;) {
    const res = await fetch(`https://api.repull.dev/v1/connections/${handle}/imports?limit=1`, {
      headers: { Authorization: `Bearer ${process.env.REPULL_API_KEY}` },
    })
    const [run] = (await res.json()).data
    if (run && run.status !== 'running') return run // 'completed' or 'failed'
    await new Promise((r) => setTimeout(r, 30_000))
  }
}

Status, outcome, reason

  • running — still going. stages shows progress: a stage is done when done + failed reaches expected (expected is null until the stage knows how much work it has).
  • completed with outcome: complete — everything imported.
  • completed with outcome: partial — it finished, but some units failed (see each stage's failed). What did import is readable.
  • failed — it stopped. reason says why:
    • needs_permissions — the host must grant more access. The connection on GET /v1/connect carries a fixUrl; once the host fixes it, a new import starts.
    • duplicate_account — the same account is already connected in this workspace.
    • stalled — no progress for too long. Reconnect or re-sync the account.
    • did_not_start — it was queued but had not started 10 minutes later. Start it again: If the first import does not start.
    • queue_failed — it could not be queued. Start it again the same way.

Readable a moment after completed

account.import.completed fires when every stage has fetched its data. The last records can take a minute or two to finish saving, so a count read straight after the event may still be climbing.

History is read, not announced

An import does not announce every past booking as a reservation.created webhook: webhooks are for what changes next. Read the history with GET /v1/reservations, GET /v1/conversations and GET /v1/reviews once the import has completed.

Stages by channel

ChannelStages
Airbnblistings, reservations, then messages, reviews and transactions when requested. A listings import (one you asked for, or the host re-accepting a connected account) has listings only.
Booking.com (connectivity provider)reservations, after a room is mapped
Booking.com Extranetaccount, enrich (rooms), reservations, conversations, reviews. Reservations import for mapped rooms; a connection with nothing mapped completes with none, and mapping a room later starts a mapping import.
Vrbopriority (upcoming bookings and the last 30 days), then history
PMS (Hostaway, Guesty, …)one stage per entity: listings, reservations, messages, calendar, reviews, payments

Related: Webhook event types, Connect, List connections.

AI