For partner portals
Partner Listings API
Push your listings to eMediaLinks and control exactly what appears: send a listing to publish or update it, mark it sold or withdrawn to take it down. Base URL: https://fang.redichan.com/api/partner/v1. Everything is JSON over HTTPS.
Authentication
We give you one API key. Keep it on your server only and never put it in a web page or app. Send it on every request:
Authorization: Bearer <your key>X-API-Key: <your key> also works. A missing or wrong key returns 401. If a key leaks, tell us: we issue a new one and switch off the old one, with no downtime.
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /me | Checks your key; shows your listing counts, defaults and limits |
| POST | /listings | Creates or updates up to 25 listings. Add ?dry_run=1 to validate without saving |
| GET | /listings | Lists what you have on eMediaLinks. Query: limit (1–200), cursor, status, updated_since |
| GET | /listings/{id} | One listing, by your own id |
| DELETE | /listings/{id} | Takes a listing off eMediaLinks (status becomes withdrawn) |
| GET | /leads | Buyer enquiries on your listings. Query: since (ISO date; default last 30 days), limit (1–200) |
You always use your own listing id. We return our id as eml_id and the public page as url.
Listing fields
Required: id, title, city. An active listing also needs at least one image, plus a price or a floor_area. Everything else is optional; send what you have. Defaults for country, currency and units are set per account and shown by GET /me.
| Field | Type | Rules |
|---|---|---|
id | string | Required. Your listing id. Letters, digits, . _ -, max 100. Never reuse an id for a different property |
status | string | active (default), sold or withdrawn |
listing_type | string | sale (default) or rent (rent is shown per month) |
title | string | Required. Max 300 characters |
description | string | Max 20,000 characters, plain text |
price | number | Positive number, or null for “price on request” |
currency | string | ISO code, e.g. LKR, USD |
property_type | string | Your label, e.g. House, Apartment, Land, Office |
bedrooms | number | 0–100 |
bathrooms | number | 0–100 |
floor_area | number | With floor_area_unit: sqft or sqm |
land_size | number | With land_size_unit: perches, acres, hectares, sqft or sqm |
year_built | number | 4-digit year |
address | string | Street address as you want it shown |
city | string | Required. e.g. Colombo 7, Kandy |
district | string | e.g. Colombo |
country | string | Defaults to your account's country |
postal_code | string | |
latitude | number | Decimal degrees |
longitude | number | Decimal degrees |
images | array of URLs | Up to 40 public https image URLs; the first is the cover photo |
url | string | The listing on your website; shown as “View original” |
features | array of strings | Up to 50, e.g. "Swimming pool" |
agent | object | name, email, phone, company, license_number. Shown on the listing; enquiries go to agent.email |
Example
curl -X POST https://fang.redichan.com/api/partner/v1/listings \
-H "Authorization: Bearer $EML_KEY" \
-H "Content-Type: application/json" \
-d '{
"listings": [{
"id": "LP-10452",
"status": "active",
"listing_type": "sale",
"title": "Modern 4-bedroom house with pool in Battaramulla",
"description": "Two-storey house on a quiet lane...",
"price": 85000000,
"currency": "LKR",
"property_type": "House",
"bedrooms": 4,
"bathrooms": 3,
"floor_area": 3200,
"floor_area_unit": "sqft",
"land_size": 15,
"land_size_unit": "perches",
"city": "Battaramulla",
"district": "Colombo",
"latitude": 6.9022,
"longitude": 79.918,
"images": ["https://www.example.lk/photos/10452/1.jpg", "https://www.example.lk/photos/10452/2.jpg"],
"url": "https://www.example.lk/property/10452",
"features": ["Swimming pool", "Parking for 2 cars"],
"agent": { "name": "Nimal Perera", "email": "nimal@example.lk", "phone": "+94 77 123 4567" }
}]
}'Response (200):
{
"dry_run": false,
"received": 1,
"succeeded": 1,
"failed": 0,
"results": [{
"id": "LP-10452",
"ok": true,
"result": "created",
"eml_id": "cmg8x2k0p0001abcd",
"status": "active",
"url": "https://fang.redichan.com/listings/cmg8x2k0p0001abcd"
}]
}A listing that fails comes back with "ok": false and every problem at once, e.g. "errors": ["city is required"]. The other listings in the same request are still saved.
Updates, removals, photos and enquiries
- Update: send the same
idagain with the full listing. Each push replaces the previous version; fields you leave out are cleared. - Remove: send it with
"status": "sold"or"withdrawn", or callDELETE /listings/{id}. It disappears from the site at once. Send it asactiveto bring it back. - Photos: the listing goes live straight away with your image URLs. We then copy the photos to our servers in China so they load fast for buyers there;
images_readyturnstruewhen done. Re-sending the same photos does not copy them again. Keep your image URLs reachable for a few minutes after each push. - Chinese version: we add a Chinese description on our side; you don't need to send one.
- Enquiries: we email the listing's
agent.email, or your central leads address if there is none. All enquiries are also available fromGET /leads; poll it with the lastcreated_atyou received as the nextsince. - Attribution: every listing shows “Listed by” your company, and a “View original” link when you send
url.
Errors and limits
Errors come back as {"error": {"code": "...", "message": "..."}}.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_json · no_listings · invalid_status · invalid_date | The request itself is malformed |
| 401 | unauthorized | Missing or wrong API key |
| 404 | not_found | No listing with that id on your account |
| 413 | batch_too_large | More than 25 listings in one request |
| 429 | More than 120 requests a minute; wait retryAfter seconds | |
| 500 | Our side failed; retry the same request later (safe to repeat) |
Limits: 25 listings per request, 40 photos per listing, 120 requests a minute. Your maximum number of active listings is shown by GET /me. Sending the same listing twice is always safe.
Getting started
- Check your key:
curl -H "Authorization: Bearer $EML_KEY" https://fang.redichan.com/api/partner/v1/me - Validate a few real listings without publishing:
POST /listings?dry_run=1. Fix anything listed inerrors. - Publish 5–10 listings, open the
urlof each and review the pages with us. - Load the rest, 25 per request.
- From then on, push a listing whenever it changes on your site, and send
soldorwithdrawnwhen it comes off.
Questions or a new key: partners@emedialinks.com