# Resales Online

> Connect your agency's Resales Online feed to search it, put its homes in brochures and on your website, and import your own listings.

Connecting Resales Online puts the homes your Resales Online filter shares into Fondaro: search them on the map beside your own listings, add them to brochures, show them on your website, and import your agency's own listings. Fondaro reads Resales Online live with your agency's own credentials and never writes back.

## Set it up

You need the email Resales Online sends titled "Setup details for your Web API".

1. In Resales Online, create a Web API key and add Fondaro's server address (shown on the setup page in Fondaro) to its allowed list.
2. In a filter for that key, change the SearchProperties image size from Thumbnail (400px) to Medium (1200px) and save. Listings otherwise arrive with small photos.
3. In Fondaro, an admin opens **Settings › Integrations › Resales Online** and enters the **Contact ID (P1)**, the **API key (P2)** and the **Filter alias** (the alias number under Predefined filter for Sales, usually `1`).
4. Optional: to import your own listings, set up a spare filter in Resales Online that returns only your own properties and enter its alias as the **Own-listings filter alias**. See [Resales import](https://www.fondaro.com/docs/api/resales-own-listings-import.md).

Never reuse or edit the connected browse filter later: search, brochures and your website all read it.

### Save the credentials by API

An admin session can save each value with `PUT /integrations/credentials/resales_online/:key`. Each save checks the connection and returns its state.

| `:key` | Value |
|---|---|
| `p1` | Contact ID |
| `p2` | API key (stored encrypted) |
| `p_agency_filterid` | Browse filter alias |
| `p_own_filterid` | Own-listings filter alias (optional) |

```bash
curl -X PUT https://api.fondaro.com/integrations/credentials/resales_online/p2 \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":"your-p2-key"}'
```

```json
{
  "success": true,
  "connection": { "status": "connected", "checkedAt": "2026-10-02T10:00:00.000Z" },
  "detail": { "propertyCount": 1240, "searchType": "Sale" }
}
```

`GET /integrations/credentials/resales_online` lists what is saved (secrets masked), `POST /integrations/credentials/resales_online/test` checks again, and `DELETE /integrations/credentials/resales_online/:key` removes one value. Disconnecting takes Resales Online homes out of search, brochures and your website.

## Search and read listings

Use the `resales_online` source of [Property sources](https://www.fondaro.com/docs/api/properties/sources.md) with an API key that has `sources:read`. It filters by location, type, price, bedrooms, bathrooms, sizes, features and reference, and pages with a cursor.

```bash
curl -X POST https://api.fondaro.com/property-sources/resales_online/search \
  -H "X-API-Key: fondaro_pk_abc123" \
  -H "Content-Type: application/json" \
  -d '{"minPrice":500000,"maxPrice":1500000,"minBedrooms":3,"limit":20}'
```

A listing is read with `GET /property-sources/resales_online/detail/:id`, its `id` being the Resales reference (for example `R4381122`). The values for `features` and `propertyTypes` come from `GET /property-sources/resales_online/options/feature` and `/options/property_type`.

## Check the connection

### `GET /resales-online/status`

Signed-in session. Whether the saved credentials passed their latest live check.

```json
{
  "connected": false,
  "connection": {
    "status": "attention",
    "reason": "credentials_rejected",
    "message": "Resales Online did not accept these credentials.",
    "checkedAt": "2026-09-24T10:15:00.000Z"
  }
}
```

`connection.status` is `connected`, `attention` (saved but failing; `reason` and `message` say why) or `disconnected`. The result is cached for 6 hours after a pass and 5 minutes after a failure, and checked again when the credentials change.

## Dashboard routes

The dashboard and older app versions use these session-only routes. They answer in their own shapes; new code should use Property sources.

| Method and path | Purpose | Replacement |
|---|---|---|
| `POST /resales-online/search` | Search (`page` and `limit` 1 to 40 required; send the page-1 `queryId` on later pages) | `POST /property-sources/resales_online/search` |
| `GET /resales-online/detail/:reference` | One listing | `GET /property-sources/resales_online/detail/:id` |
| `GET /resales-online/locations` | Places (`?query=`) | `GET /property-sources/resales_online/locations` |
| `GET /resales-online/property-types` | Types | `GET /property-sources/resales_online/options/property_type` |
| `GET /resales-online/features` | The feature list | `GET /property-sources/resales_online/options/feature` |
| `POST /resales-online/batch` | Up to 40 listings by `referenceIds` | None |

The deprecated routes return `Deprecation: true` and a `Link` header naming their replacement. Listing `status` values are `available`, `under_offer`, `sale_agreed` and `unknown`.

## Errors

| Status | When |
|---|---|
| `400` | Resales Online is not connected, or a field is invalid |
| `403` | Saving credentials without being an admin |
| `404` | The reference does not exist in your filter |
| `424` | Resales Online rejected the saved credentials |

Source: https://www.fondaro.com/docs/api/resales-online
