Complete API reference for reading and creating property listings. Supports full CRUD operations with multilingual content, images, taxonomies, and booking platform links.
All requests require a valid API key sent via the x-api-key header.
curl -H "x-api-key: 4u_pk_YOUR_KEY" https://listings.4u-realestate.org/properties
Retrieve a paginated list of published properties. Supports full-text search, filtering, and sorting.
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| limit | number | Results per page (default: 20, max: 100) |
| search | string | Full-text search on title & description |
| featured | boolean | Filter featured properties only |
| project | string | Filter by project name |
| propertyType | string | Filter by type (apartments, villas, penthouses...) |
| purpose | string | Filter by purpose (for-rent, for-sale, vacation-rentals...) |
| city | string | Filter by city |
| area | string | Filter by area/neighborhood |
| country | string | Filter by country |
| minPrice | number | Minimum price |
| maxPrice | number | Maximum price |
| minBedrooms | number | Minimum bedrooms |
| maxBedrooms | number | Maximum bedrooms |
| language | string | Language filter (en, fr) |
| sort | string | price_asc, price_desc, newest, oldest (default: title) |
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties?page=1&limit=10&purpose=vacation-rentals&sort=newest"
{
"success": true,
"properties": [
{
"_id": "69b871f7bfe28eae670203cb",
"title": "Luxury 2BR Ocean View",
"slug": "luxury-2br-ocean-view",
"price": 250,
"priceUnit": "per_night",
"currency": "USD",
"bedrooms": 2,
"bathrooms": 2,
"surface": 95,
"featuredImage": { "url": "https://api.4u-realestate.org/uploads/...", "alt": "..." },
"gallery": [ ... ],
"propertyType": ["apartments"],
"purposes": ["vacation-rentals"],
"features": ["Air Conditioning", "WiFi"],
"city": "Simpson Bay",
"country": "Sint Maarten"
}
],
"total": 179,
"page": 1,
"limit": 10,
"totalPages": 18
}
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max results (default: 10, max: 50) |
| purpose | string | Filter by purpose |
Returns total count, available purposes, property types, and cities. Cached 5 minutes.
| Parameter | Type | Description |
|---|---|---|
| slug | string | URL slug of the property (path param, required) |
| Parameter | Type | Description |
|---|---|---|
| lodgifyId | number | Lodgify rental ID (path param, required) |
Returns the complete property with all detail fields including SEO, garden, balcony, land, zipCode, translationGroup.
Create a new property listing. Only title is required. The slug is auto-generated from the title if not provided. Newly created properties default to draft status.
| Field | Type | Description |
|---|---|---|
| title REQUIRED | string | Property title in English |
| Field | Type | Description |
|---|---|---|
| title_fr | string | Title in French |
| slug | string | URL slug (auto-generated if omitted) |
| slug_fr | string | French URL slug |
| description | string | Full HTML description (EN) |
| description_fr | string | Full HTML description (FR) |
| shortDescription | string | Short summary (EN) |
| shortDescription_fr | string | Short summary (FR) |
| language | string | Primary language: "en" or "fr" (default: "en") |
| translationGroup | string | ID to link EN/FR translations together |
| translations | object | { "en": "propertyId", "fr": "propertyId" } |
| Field | Type | Description |
|---|---|---|
| seo | object | SEO metadata object |
| seo.title | string | SEO title (EN) |
| seo.title_fr | string | SEO title (FR) |
| seo.metaDescription | string | Meta description (EN) |
| seo.metaDescription_fr | string | Meta description (FR) |
| seo.focusKeyphrase | string | Focus keyphrase (EN) |
| seo.focusKeyphrase_fr | string | Focus keyphrase (FR) |
| Field | Type | Description |
|---|---|---|
| status | string | "draft" (default), "published", "archived", "private" |
| featured | boolean | Highlighted listing (default: false) |
| showOnMobile | boolean | Show on mobile app (default: false) |
| isFeaturedSlide | boolean | Show in featured slider (default: false) |
| publishedAt | ISO date | Publish date (auto-set when status = published) |
| Field | Type | Description |
|---|---|---|
| price | number | Property price |
| priceUnit | string | "per_night" (default), "per_week", "per_month", "total" |
| currency | string | Currency code (default: "USD") |
| Field | Type | Description |
|---|---|---|
| surface | number | Interior area |
| garden | number | Garden area |
| balcony | number | Balcony area |
| land | number | Land area |
| areaUnit | string | "sqm" (default) or "sqft" |
| bedrooms | number|string | Number of bedrooms or "Studio" |
| bathrooms | number | Number of bathrooms |
| maxGuests | number | Maximum number of guests |
| numberOfBeds | string | Total number of beds |
| sizeOfBeds | string | Size of main beds |
| sizeOfBeds2 | string | Size of secondary beds |
| numberOfSofabed | string | Number of sofa beds |
| sizeOfSofabed | string | Size of sofa beds |
| Field | Type | Description |
|---|---|---|
| beds | array | Detailed bed configuration |
| beds[].room | string | Room name: "bedroom_1", "bedroom_2", "salon" |
| beds[].count | number | Number of beds in this room |
| beds[].size | string | Bed size: "kingsize", "queen", "single", "160 cm" |
| beds[].type | string | "bed" or "sofabed" |
"beds": [
{ "room": "bedroom_1", "count": 1, "size": "kingsize", "type": "bed" },
{ "room": "bedroom_2", "count": 2, "size": "single", "type": "bed" },
{ "room": "salon", "count": 1, "size": "queen", "type": "sofabed" }
]
| Field | Type | Description |
|---|---|---|
| bedroom2Description | string | Description of bedroom 2 |
| bedroom3Description | string | Description of bedroom 3 |
| bedroom4Description | string | Description of bedroom 4 |
| Field | Type | Description |
|---|---|---|
| address | string | Street address |
| city | string | City name |
| area | string | Area/neighborhood (Simpson Bay, Cole Bay...) |
| country | string | Country |
| zipCode | string | Zip/postal code |
| latitude | number | GPS latitude |
| longitude | number | GPS longitude |
| Field | Type | Description |
|---|---|---|
| featuredImage | object | Main property image |
| featuredImage.url | string | Image URL (absolute URL) |
| featuredImage.alt | string | Alt text (EN) |
| featuredImage.alt_fr | string | Alt text (FR) |
| featuredImage.title | string | Image title (EN) |
| featuredImage.title_fr | string | Image title (FR) |
| featuredImage.caption | string | Caption (EN) |
| featuredImage.caption_fr | string | Caption (FR) |
| featuredImage.description | string | Description (EN) |
| featuredImage.description_fr | string | Description (FR) |
| featuredImage.order | number | Display order |
| Field | Type | Description |
|---|---|---|
| gallery | array | Array of gallery images (same structure as featuredImage) |
"gallery": [
{
"url": "https://example.com/images/living-room.jpg",
"alt": "Living room with ocean view",
"alt_fr": "Salon avec vue sur l'ocean",
"title": "Living Room",
"order": 1
},
{
"url": "https://example.com/images/bedroom.jpg",
"alt": "Master bedroom",
"alt_fr": "Chambre principale",
"order": 2
}
]
| Field | Type | Description |
|---|---|---|
| propertyType | string[] | ["apartments", "villas", "penthouses", "studios", "land", "commercial"] |
| purposes | string[] | ["for-rent", "for-sale", "vacation-rentals"] |
| areas | string[] | ["Cupecoy", "Mullet Bay", "Maho"] |
| location | string[] | ["Sint Maarten", "Saint Martin"] |
| housingTypes | string[] | ["Real Estate"] |
| projects | string[] | ["The Hills Residence", "Aqua Resort"] |
| buildings | string[] | ["Building 1", "Building 2"] |
| unitNumbers | string[] | ["A-101", "B-204"] |
| building | string | Single building (legacy) |
| project | string | Single project (legacy) |
| unitNumber | string | Single unit number (legacy) |
| purpose | string | Single purpose (legacy) |
| stickers | string[] | ["featured", "new", "exclusive", "reduced"] |
| shortReference | string | Short reference code (e.g. "THR-A101") |
| Field | Type | Description |
|---|---|---|
| features | string[] | ["Air Conditioning", "WiFi", "TV", "Washer", "Dryer", "Dishwasher", "Iron"] |
| amenities | string[] | ["Pool", "Parking", "Gym", "Security", "Elevator", "BBQ"] |
| assets | string[] | ["Ocean View", "Lagoon View", "Restaurants", "Beach Access"] |
| Field | Type | Description |
|---|---|---|
| videoUrl | string | YouTube or video URL |
| documents | string[] | Array of document URLs (PDF floor plans, etc.) |
| Field | Type | Description |
|---|---|---|
| platforms | object | External booking platform links |
| platforms.airbnb | string | Airbnb listing URL |
| platforms.booking | string | Booking.com listing URL |
| platforms.expedia | string | Expedia listing URL |
| platforms.lodgify | string | Lodgify booking page URL |
| platforms.custom | array | Custom platforms: [{ "name": "VRBO", "url": "https://..." }] |
| Field | Type | Description |
|---|---|---|
| rentalId | number | Lodgify rental/property ID |
| websiteId | number | Lodgify website ID |
| managementCompanyId | string | Management company MongoDB ID |
| yearBuilt | number | Year the property was built |
curl -X POST "https://listings.4u-realestate.org/properties" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Luxury 2BR Apartment - Ocean View",
"title_fr": "Appartement de luxe 2 chambres - Vue Oc\u00e9an",
"slug": "luxury-2br-ocean-view-simpson-bay",
"description": "<p>Beautiful apartment with stunning ocean views...</p>",
"description_fr": "<p>Bel appartement avec vue imprenable sur l\u0027oc\u00e9an...</p>",
"shortDescription": "Stunning 2BR apartment in Simpson Bay",
"status": "published",
"featured": true,
"showOnMobile": true,
"price": 250,
"priceUnit": "per_night",
"currency": "USD",
"surface": 95,
"areaUnit": "sqm",
"bedrooms": 2,
"bathrooms": 2,
"maxGuests": 4,
"beds": [
{ "room": "bedroom_1", "count": 1, "size": "kingsize", "type": "bed" },
{ "room": "bedroom_2", "count": 1, "size": "queen", "type": "bed" },
{ "room": "salon", "count": 1, "size": "queen", "type": "sofabed" }
],
"address": "45 Beach Road",
"city": "Simpson Bay",
"area": "Simpson Bay",
"country": "Sint Maarten",
"zipCode": "00000",
"latitude": 18.0425,
"longitude": -63.0548,
"featuredImage": {
"url": "https://example.com/images/main.jpg",
"alt": "Ocean view apartment",
"alt_fr": "Appartement vue oc\u00e9an",
"title": "Main Photo",
"order": 0
},
"gallery": [
{
"url": "https://example.com/images/living.jpg",
"alt": "Living room",
"alt_fr": "Salon",
"order": 1
},
{
"url": "https://example.com/images/bedroom.jpg",
"alt": "Master bedroom",
"alt_fr": "Chambre principale",
"order": 2
}
],
"propertyType": ["apartments"],
"purposes": ["vacation-rentals"],
"areas": ["Simpson Bay"],
"location": ["Sint Maarten"],
"projects": ["Aqua Resort"],
"features": ["Air Conditioning", "WiFi", "TV", "Washer"],
"amenities": ["Pool", "Parking", "Security"],
"assets": ["Ocean View", "Beach Access"],
"videoUrl": "https://youtube.com/watch?v=example",
"platforms": {
"airbnb": "https://airbnb.com/rooms/123456",
"booking": "https://booking.com/hotel/sx/example",
"lodgify": "https://4urealestate.lodgify.com/luxury-2br",
"custom": [
{ "name": "VRBO", "url": "https://vrbo.com/123456" }
]
},
"seo": {
"title": "Luxury 2BR Ocean View | 4U Real Estate",
"metaDescription": "Book a luxury 2-bedroom apartment with ocean view in Simpson Bay, Sint Maarten.",
"focusKeyphrase": "ocean view apartment simpson bay"
},
"shortReference": "AQR-201",
"language": "en",
"yearBuilt": 2020
}'
{
"success": true,
"message": "Property created successfully",
"property": {
"_id": "668a1b2c3d4e5f6a7b8c9d0e",
"title": "Luxury 2BR Apartment - Ocean View",
"slug": "luxury-2br-ocean-view-simpson-bay",
"status": "published",
"price": 250,
"priceUnit": "per_night",
...
}
}
Update any property fields. Only send the fields you want to change. All fields from the create endpoint are supported.
curl -X PUT "https://listings.4u-realestate.org/properties/668a1b2c3d4e5f6a7b8c9d0e" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"price": 300,
"priceUnit": "per_night",
"gallery": [
{ "url": "https://example.com/images/new1.jpg", "alt": "New photo 1", "order": 1 },
{ "url": "https://example.com/images/new2.jpg", "alt": "New photo 2", "order": 2 }
],
"features": ["Air Conditioning", "WiFi", "TV", "Washer", "Dryer"]
}'
curl -X PUT "https://listings.4u-realestate.org/properties/668a1b2c3d4e5f6a7b8c9d0e" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "published" }'
{
"success": true,
"message": "Property updated successfully",
"property": { "_id": "668a1b2c...", "title": "...", "price": 300, ... }
}
curl -X DELETE "https://listings.4u-realestate.org/properties/668a1b2c3d4e5f6a7b8c9d0e" \ -H "x-api-key: YOUR_KEY"
{
"success": true,
"message": "Property deleted successfully",
"deletedId": "668a1b2c3d4e5f6a7b8c9d0e"
}
Complete list of all property fields returned by GET endpoints and accepted by POST/PUT.
| Field | Type | Description |
|---|---|---|
| _id | string | MongoDB ID (read-only) |
| title / title_fr | string | Property title EN / FR |
| slug / slug_fr | string | URL slug EN / FR |
| description / description_fr | string | Full HTML description EN / FR |
| shortDescription / shortDescription_fr | string | Short summary EN / FR |
| seo | object | SEO metadata (title, metaDescription, focusKeyphrase, *_fr) |
| status | string | draft, published, archived, private |
| featured | boolean | Featured flag |
| showOnMobile | boolean | Mobile visibility |
| isFeaturedSlide | boolean | Featured slider |
| price | number | Price |
| priceUnit | string | per_night, per_week, per_month, total |
| currency | string | Currency code |
| surface / garden / balcony / land | number | Area measurements |
| areaUnit | string | sqm or sqft |
| bedrooms | number|string | Bedrooms count or "Studio" |
| bathrooms | number | Bathrooms count |
| beds | array | Bed configuration [{room, count, size, type}] |
| maxGuests | number | Max guests |
| address / city / area / country / zipCode | string | Location fields |
| latitude / longitude | number | GPS coordinates |
| featuredImage | object | Main image {url, alt, alt_fr, title, ...} |
| gallery | array | Image gallery [{url, alt, alt_fr, order, ...}] |
| propertyType | string[] | Property types |
| purposes | string[] | Property purposes |
| areas | string[] | Area taxonomy |
| location | string[] | Location taxonomy |
| projects | string[] | Projects |
| buildings | string[] | Buildings |
| unitNumbers | string[] | Unit numbers |
| features | string[] | Property features |
| amenities | string[] | Amenities |
| assets | string[] | Nearby assets/views |
| stickers | string[] | Tags/stickers |
| shortReference | string | Short reference code |
| videoUrl | string | Video URL |
| documents | string[] | Document URLs |
| platforms | object | Booking platform links |
| rentalId | number | Lodgify rental ID |
| websiteId | number | Lodgify website ID |
| language | string | en or fr |
| translationGroup | string | Translation group ID |
| translations | object | {en: id, fr: id} |
| managementCompanyId | string | MC MongoDB ID |
| yearBuilt | number | Year built |
| publishedAt | date | Publish date |
| createdAt / updatedAt | date | Timestamps (read-only) |
const API = 'https://listings.4u-realestate.org';
const KEY = 'YOUR_API_KEY';
const headers = { 'x-api-key': KEY, 'Content-Type': 'application/json' };
// === LIST PROPERTIES ===
const list = await fetch(`${API}/properties?limit=10&purpose=vacation-rentals`, { headers });
const data = await list.json();
console.log(`Total: ${data.total}`);
// === CREATE PROPERTY ===
const create = await fetch(`${API}/properties`, {
method: 'POST',
headers,
body: JSON.stringify({
title: 'New Beach Villa',
status: 'draft',
price: 500,
priceUnit: 'per_night',
bedrooms: 3,
bathrooms: 2,
city: 'Simpson Bay',
propertyType: ['villas'],
purposes: ['vacation-rentals'],
features: ['Pool', 'WiFi', 'Air Conditioning'],
featuredImage: { url: 'https://example.com/villa.jpg', alt: 'Beach Villa', order: 0 },
gallery: [
{ url: 'https://example.com/pool.jpg', alt: 'Pool', order: 1 },
{ url: 'https://example.com/bedroom.jpg', alt: 'Bedroom', order: 2 }
]
})
});
const created = await create.json();
console.log('Created:', created.property._id);
// === UPDATE PROPERTY ===
const update = await fetch(`${API}/properties/${created.property._id}`, {
method: 'PUT',
headers,
body: JSON.stringify({ status: 'published', price: 550 })
});
// === DELETE PROPERTY ===
const del = await fetch(`${API}/properties/${created.property._id}`, {
method: 'DELETE', headers
});
$API = 'https://listings.4u-realestate.org';
$KEY = 'YOUR_API_KEY';
// === LIST ===
$ch = curl_init("$API/properties?limit=10");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["x-api-key: $KEY", "Accept: application/json"]
]);
$list = json_decode(curl_exec($ch), true);
curl_close($ch);
// === CREATE ===
$ch = curl_init("$API/properties");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["x-api-key: $KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'New Beach Villa',
'status' => 'draft',
'price' => 500,
'priceUnit' => 'per_night',
'bedrooms' => 3,
'city' => 'Simpson Bay',
'propertyType' => ['villas'],
'purposes' => ['vacation-rentals'],
'features' => ['Pool', 'WiFi'],
'featuredImage' => ['url' => 'https://example.com/villa.jpg', 'alt' => 'Villa', 'order' => 0]
])
]);
$created = json_decode(curl_exec($ch), true);
curl_close($ch);
$id = $created['property']['_id'];
// === UPDATE ===
$ch = curl_init("$API/properties/$id");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ["x-api-key: $KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(['status' => 'published', 'price' => 550])
]);
curl_exec($ch);
curl_close($ch);
// === DELETE ===
$ch = curl_init("$API/properties/$id");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ["x-api-key: $KEY"]
]);
curl_exec($ch);
curl_close($ch);
import requests
API = 'https://listings.4u-realestate.org'
HEADERS = {'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'}
# === LIST ===
r = requests.get(f'{API}/properties', params={'limit': 10}, headers=HEADERS)
data = r.json()
print(f"Total: {data['total']}")
# === CREATE ===
r = requests.post(f'{API}/properties', headers=HEADERS, json={
'title': 'New Beach Villa',
'status': 'draft',
'price': 500,
'priceUnit': 'per_night',
'bedrooms': 3,
'city': 'Simpson Bay',
'propertyType': ['villas'],
'purposes': ['vacation-rentals'],
'features': ['Pool', 'WiFi'],
'featuredImage': {'url': 'https://example.com/villa.jpg', 'alt': 'Villa', 'order': 0},
'gallery': [
{'url': 'https://example.com/pool.jpg', 'alt': 'Pool', 'order': 1}
]
})
prop_id = r.json()['property']['_id']
# === UPDATE ===
requests.put(f'{API}/properties/{prop_id}', headers=HEADERS, json={
'status': 'published', 'price': 550
})
# === DELETE ===
requests.delete(f'{API}/properties/{prop_id}', headers=HEADERS)
# List properties
curl -s -H "x-api-key: YOUR_KEY" \
"https://listings.4u-realestate.org/properties?limit=10" | jq .
# Create property
curl -s -X POST "https://listings.4u-realestate.org/properties" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"New Villa","price":500,"bedrooms":3,"status":"draft"}' | jq .
# Update property
curl -s -X PUT "https://listings.4u-realestate.org/properties/PROPERTY_ID" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"published","price":550}' | jq .
# Delete property
curl -s -X DELETE "https://listings.4u-realestate.org/properties/PROPERTY_ID" \
-H "x-api-key: YOUR_KEY" | jq .
| Code | Meaning | Solution |
|---|---|---|
| 400 | Invalid input (missing title, bad enum value) | Check required fields and valid values |
| 401 | Missing or invalid API key | Add x-api-key header with valid key |
| 403 | API key disabled or expired | Contact admin to reactivate |
| 404 | Property not found | Verify the property ID or slug |
| 409 | Duplicate slug or unique field conflict | Use a different slug or check existing data |
| 429 | Rate limit exceeded (100 req/min) | Wait and retry, implement caching |
| 500 | Internal server error | Contact contact@4u-realestate.org |