Listings
External ID Linking
Connecting existing listings with CRM records
If listings were created via the Rentix web interface, link external IDs to them to manage via API.
When You Need This
- Listings were created manually on rentix.md, and now need to sync with CRM
- Migrating from another integration system
- Restoring connections after a failure
Link External ID
Connects a Rentix listing with a record in your CRM.
const response = await fetch('https://crm.rentix.md/api/v1/listings/42/link', {
method: 'POST',
headers: {
'Authorization': 'ApiKey YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ externalId: 'apt-001' })
});
const result = await response.json();
console.log(`Listing ${result.id} linked to ${result.externalId}`);
curl -X POST https://crm.rentix.md/api/v1/listings/42/link \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "externalId": "apt-001" }'
$ch = curl_init('https://crm.rentix.md/api/v1/listings/42/link');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['externalId' => 'apt-001']));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: ApiKey YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Response
{
"id": 42,
"externalId": "apt-001",
"linked": true
}
After linking, you can use the external ID for updates:
curl -X PUT https://crm.rentix.md/api/v1/listings \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "externalId": "apt-001", "announcementValue": 550 }'
Unlink External ID
Removes the connection between a listing and external ID.
const response = await fetch('https://crm.rentix.md/api/v1/listings/42/link', {
method: 'DELETE',
headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
curl -X DELETE https://crm.rentix.md/api/v1/listings/42/link \
-H "Authorization: ApiKey YOUR_API_KEY"
$ch = curl_init('https://crm.rentix.md/api/v1/listings/42/link');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: ApiKey YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Response
{
"id": 42,
"externalId": "apt-001",
"unlinked": true
}
Scenario: Initial Linking
When integrating an existing agency, you need to connect Rentix listings with records in your CRM.
Node.js
// 1. Get all listings from Rentix
const response = await fetch('https://crm.rentix.md/api/v1/listings?limit=100', {
headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
const { items: rentixListings } = await response.json();
// 2. For each listing, find a match in CRM
for (const listing of rentixListings) {
// Skip already linked
if (listing.externalId) continue;
// Find by address, price, or other characteristics
const crmRecord = await findMatchInCrm(listing);
if (crmRecord) {
// 3. Link external ID
await fetch(`https://crm.rentix.md/api/v1/listings/${listing.id}/link`, {
method: 'POST',
headers: {
'Authorization': 'ApiKey YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ externalId: crmRecord.id })
});
console.log(`Linked: Rentix #${listing.id} → CRM ${crmRecord.id}`);
}
}
Common Errors
| Error | Cause | Solution |
|---|---|---|
External ID already linked | This external ID is already used by another listing | Use a unique ID or unlink from the other listing first |
Listing already has external ID | The listing already has an external ID | Unlink the current ID first |
Listing not found | Listing doesn't exist or belongs to another agency | Check the ID |
Listing has no external ID | When unlinking: listing has no external ID | Nothing needs to be done |