# Zoddak

> Connect Zoddak to search Spanish new-build developments, with prices, units, photos and build stage, beside your own listings.

Zoddak lists new-build and off-plan developments in Spain. Connecting your agency's Zoddak account puts those developments in Fondaro's search, with price ranges, available units, photos and build stage, so you can show them to buyers and add them to brochures. Fondaro reads Zoddak live with your agency's own token.

## Set it up

1. In your Zoddak portal, add Fondaro's server address (shown on the setup page in Fondaro) so Zoddak accepts requests on your behalf, and copy your API token.
2. In Fondaro, an admin opens **Settings › Integrations › Zoddak** and pastes the token. By API, an admin session can save it with `PUT /integrations/credentials/zoddak/api_token`:

```bash
curl -X PUT https://api.fondaro.com/integrations/credentials/zoddak/api_token \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":"<your Zoddak API token>"}'
```

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

`POST /integrations/credentials/zoddak/test` checks it again and `DELETE /integrations/credentials/zoddak/api_token` disconnects.

## Search developments

Use the `zoddak` 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 (zone, province, town or place), property type, price, bedrooms, bathrooms and build stage. A location is optional.

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

The stage values come from `GET /property-sources/zoddak/options/stage`, and a development with its units from `GET /property-sources/zoddak/detail/:id`.

## Check the connection

### `GET /zoddak/status`

Signed-in session. Whether the saved token passed its latest live check, cached for 6 hours after a pass and 5 minutes after a failure.

```json
{
  "connected": false,
  "connection": {
    "status": "attention",
    "reason": "credentials_rejected",
    "message": "Zoddak did not accept this API token. Copy it again from your Zoddak portal, disconnect, and save the new one.",
    "checkedAt": "2026-09-24T10:15:00.000Z"
  }
}
```

`connection.status` is `connected`, `attention` (saved but failing; `reason` and `message` say why) or `disconnected`.

## Dashboard routes

The dashboard and older app versions use these session-only routes. They answer in their own shapes and return `Deprecation: true` with a `Link` header naming the replacement.

| Method and path | Purpose | Replacement |
|---|---|---|
| `POST /zoddak/search` | Developments (`page`, `limit` up to 20, `propertyTypeEnums`, `towns`, `places`, `provinces`, `zones`, `stages`, `minPrice`, `maxPrice`, `minBeds`, `maxBeds`, `minBaths`, `maxBaths`, `sort` `price_asc` or `price_desc`) | `POST /property-sources/zoddak/search` |
| `GET /zoddak/detail/:reference` | One development with its `units` | `GET /property-sources/zoddak/detail/:id` |
| `GET /zoddak/locations` | Zones, provinces, towns and places (`?query=`) | `GET /property-sources/zoddak/locations` |
| `GET /zoddak/stages` | Build stages with labels in 11 languages | `GET /property-sources/zoddak/options/stage` |

```json
{
  "developments": [
    {
      "id": 42,
      "reference": "CHL",
      "name": "Cerrado Hills",
      "propertyType": "Villas",
      "minPrice": 2300000,
      "maxPrice": 4100000,
      "minBeds": 4,
      "maxBeds": 6,
      "town": "Marbella",
      "stage": "Offplan",
      "unitsTotal": 13,
      "unitsAvailable": 9
    }
  ],
  "page": 1,
  "pageSize": 20,
  "totalResults": 39
}
```

Bedroom and bathroom filters apply to a development's smallest unit.

## Errors

| Status | When |
|---|---|
| `400` | Zoddak is not connected, or a field is invalid |
| `403` | Saving the token without being an admin |
| `404` | No development with that reference |

Source: https://www.fondaro.com/docs/api/zoddak
