Listings
Retrieve Listings
Search listings by ID, external ID, and with filters
Get listing information to display status in your CRM or to sync changes.
Find a Listing by ID
Use the Rentix internal ID.
const response = await fetch('https://crm.rentix.md/api/v1/listings/42', {
headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
const listing = await response.json();
console.log(`Status: ${listing.formData.announcementStatus}`);
console.log(`URL: ${listing.publicUrl}`);
curl https://crm.rentix.md/api/v1/listings/42 \
-H "Authorization: ApiKey YOUR_API_KEY"
$ch = curl_init('https://crm.rentix.md/api/v1/listings/42');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: ApiKey YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$listing = json_decode($response, true);
Response
{
"id": 42,
"externalId": "apt-001",
"publicUrl": "https://rentix.md/announcement/42",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T12:00:00.000Z",
"lastSyncedAt": "2024-01-15T12:00:00.000Z",
"formData": {
"id": 42,
"announcementStatus": "active",
"announcementType": "rent",
"propertyType": "residential",
"propertySecondaryType": "apartment",
"propertyCoordinates": { "lat": 47.0245, "lng": 28.8323 },
"announcementValue": 500,
"announcementCurrency": "EUR",
"announcementDescription": "A spacious apartment...",
"...": "other listing fields"
},
"user": {
"id": 1,
"externalId": "agent-001",
"name": "John Doe",
"phone": "+37312345678",
"role": "admin"
},
"files": [
{
"id": 123,
"externalId": "apt-001-photo-1",
"contentType": "image/jpeg",
"size": "102400", // in bytes
"optimization": "success"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | number | Internal Rentix listing ID |
externalId | string | null | Your CRM's external ID (null if not linked) |
publicUrl | string | Public listing URL on Rentix |
createdAt | string | ISO date of creation |
updatedAt | string | ISO date of last update |
lastSyncedAt | string | null | ISO date of last CRM sync (null if never synced) |
formData | object | All listing fields (status, type, price, coordinates, description, etc.) |
formData.id | number | Same as top-level id |
formData.announcementStatus | string | Listing status (draft, active, hidden, pending_active) |
user | object | null | Assigned agent (null if no agent assigned) |
user.id | number | Internal user ID |
user.externalId | string | null | External user ID from your CRM |
user.name | string | User name |
user.phone | string | User phone |
user.role | string | null | Agency role (admin, editor, viewer) |
files | array | Attached photos |
files[].id | number | Internal file ID |
files[].externalId | string | null | External file ID from your CRM |
files[].contentType | string | MIME type (e.g. image/jpeg) |
files[].size | string | File size in bytes |
files[].optimization | string | Optimization status (pending, processing, success, failed) |
The
formData object contains the same fields you use when creating or updating a listing. See Field Schema for full field details.Find a Listing by External ID
Use the ID from your CRM. Returns the same response shape as above.
const response = await fetch('https://crm.rentix.md/api/v1/listings/external/apt-001', {
headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
const listing = await response.json();
curl https://crm.rentix.md/api/v1/listings/external/apt-001 \
-H "Authorization: ApiKey YOUR_API_KEY"
$ch = curl_init('https://crm.rentix.md/api/v1/listings/external/apt-001');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: ApiKey YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$listing = json_decode($response, true);
Get Listing List
Returns listings with pagination and filtering. Each item in the response has the same shape as a single listing.
const response = await fetch('https://crm.rentix.md/api/v1/listings?status=active&limit=20', {
headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
const { items, meta } = await response.json();
console.log(`Total: ${meta.totalItems}, page ${meta.currentPage} of ${meta.totalPages}`);
curl "https://crm.rentix.md/api/v1/listings?status=active&limit=20" \
-H "Authorization: ApiKey YOUR_API_KEY"
$ch = curl_init('https://crm.rentix.md/api/v1/listings?status=active&limit=20');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: ApiKey YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Total: {$data['meta']['totalItems']}, page {$data['meta']['currentPage']}";
Filter Parameters
| Parameter | Type | Description |
|---|---|---|
status | enum | Filter by status (draft, active, hidden, pending_active) |
userId | number | Filter by agent (internal ID) |
externalUserId | string | Filter by agent (external ID) |
syncedAfter | string | ISO date — only updated after this date |
page | number | Page (1–1000) |
limit | number | Items per page (1–100, default 20) |
You cannot use
userId and externalUserId at the same time.Response
{
"items": [
{
"id": 42,
"externalId": "apt-001",
"publicUrl": "https://rentix.md/announcement/42",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T12:00:00.000Z",
"lastSyncedAt": "2024-01-15T12:00:00.000Z",
"formData": { "id": 42, "announcementStatus": "active", "..." : "..." },
"user": { "id": 1, "externalId": "agent-001", "name": "John Doe", "phone": "+373...", "role": "admin" },
"files": [{ "id": 123, "externalId": "photo-1", "contentType": "image/jpeg", "size": "102400", // in bytes "optimization": "success" }]
}
],
"meta": {
"currentPage": 1,
"itemCount": 20,
"itemsPerPage": 20,
"totalItems": 150,
"totalPages": 8
}
}
Incremental Sync
For regular synchronization, request only changed listings using syncedAfter.
// Store the last sync time
let lastSync = loadLastSyncTime() || new Date(0).toISOString();
async function syncChanges() {
const response = await fetch(
`https://crm.rentix.md/api/v1/listings?syncedAfter=${lastSync}`,
{ headers: { 'Authorization': 'ApiKey YOUR_API_KEY' } }
);
const { items, meta } = await response.json();
for (const listing of items) {
await updateInCrm(listing);
}
// If there are more pages, load them
if (meta.currentPage < meta.totalPages) {
// Load next pages...
}
// Save time for the next sync
lastSync = new Date().toISOString();
saveLastSyncTime(lastSync);
console.log(`Synced: ${items.length} listings`);
}
curl "https://crm.rentix.md/api/v1/listings?syncedAfter=2024-01-15T11:00:00Z" \
-H "Authorization: ApiKey YOUR_API_KEY"
$lastSync = getLastSyncTime() ?: '1970-01-01T00:00:00Z';
$ch = curl_init("https://crm.rentix.md/api/v1/listings?syncedAfter={$lastSync}");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: ApiKey YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
foreach ($data['items'] as $listing) {
updateInCrm($listing);
}
saveLastSyncTime(date('c'));
echo "Synced: " . count($data['items']) . " listings";
Results are sorted by
updatedAt — newest changes first.Common Errors
| Error | Cause | Solution |
|---|---|---|
Listing not found | Listing doesn't exist or belongs to another agency | Check the ID and make sure you're using the correct API key |
Cannot use both userId and externalUserId | Both parameters were passed | Use only one |