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

MethodPathWhat it does
GET/meChecks your key; shows your listing counts, defaults and limits
POST/listingsCreates or updates up to 25 listings. Add ?dry_run=1 to validate without saving
GET/listingsLists 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/leadsBuyer 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.

FieldTypeRules
idstringRequired. Your listing id. Letters, digits, . _ -, max 100. Never reuse an id for a different property
statusstringactive (default), sold or withdrawn
listing_typestringsale (default) or rent (rent is shown per month)
titlestringRequired. Max 300 characters
descriptionstringMax 20,000 characters, plain text
pricenumberPositive number, or null for “price on request”
currencystringISO code, e.g. LKR, USD
property_typestringYour label, e.g. House, Apartment, Land, Office
bedroomsnumber0–100
bathroomsnumber0–100
floor_areanumberWith floor_area_unit: sqft or sqm
land_sizenumberWith land_size_unit: perches, acres, hectares, sqft or sqm
year_builtnumber4-digit year
addressstringStreet address as you want it shown
citystringRequired. e.g. Colombo 7, Kandy
districtstringe.g. Colombo
countrystringDefaults to your account's country
postal_codestring
latitudenumberDecimal degrees
longitudenumberDecimal degrees
imagesarray of URLsUp to 40 public https image URLs; the first is the cover photo
urlstringThe listing on your website; shown as “View original”
featuresarray of stringsUp to 50, e.g. "Swimming pool"
agentobjectname, 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

Errors and limits

Errors come back as {"error": {"code": "...", "message": "..."}}.

HTTPCodeMeaning
400invalid_json · no_listings · invalid_status · invalid_dateThe request itself is malformed
401unauthorizedMissing or wrong API key
404not_foundNo listing with that id on your account
413batch_too_largeMore than 25 listings in one request
429More than 120 requests a minute; wait retryAfter seconds
500Our 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

  1. Check your key: curl -H "Authorization: Bearer $EML_KEY" https://fang.redichan.com/api/partner/v1/me
  2. Validate a few real listings without publishing: POST /listings?dry_run=1. Fix anything listed in errors.
  3. Publish 5–10 listings, open the url of each and review the pages with us.
  4. Load the rest, 25 per request.
  5. From then on, push a listing whenever it changes on your site, and send sold or withdrawn when it comes off.

Questions or a new key: partners@emedialinks.com