Enquiries API Doc


Love To Rent - Developer API Documentation

Overview

The Love To Rent Developer API provides external access to property enquiry data for authorized companies. This API allows partner developers to retrieve enquiries submitted through the Love To Rent platform for their properties.


Authentication

Prerequisites

To access the API, you need:

  1. Company ID - Your unique Umbraco content node ID

  2. Company Key - Your unique GUID identifier (security key)

How to Obtain Credentials

Contact your Love To Rent administrator to:

  1. Verify your company has API access enabled (allowEnquiriesAPI property set to true)

  2. Obtain your Company ID

  3. Obtain your Company Key (GUID)

Note: API access must be explicitly enabled for your company in the CMS.

API Endpoint

Base URL

https://www.lovetorent.co.uk/ltrAPI/

Endpoint: List Enquiries

URL Pattern:

GET /ltrAPI/ListEnquiries/

Full Example:

https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId=35154&companyKey=8b645efb-40dc-44ce-acb3-0a1aef752de7&dateFrom=2025-01-01&dateTo=2025-01-31

Request Parameters

Required Parameters

Parameter

Type

Description

Example

companyId

integer

Your unique company identifier

35154

companyKey

GUID

Your security key for authentication

8b645efb-40dc-44ce-acb3-0a1aef752de7

Optional Parameters

Parameter

Type

Format

Description

Default

dateFrom

date

yyyy-MM-dd

Start date for enquiry search

Yesterday

dateTo

date

yyyy-MM-dd

End date for enquiry search

Yesterday

Notes:
  • Dates are inclusive (includes both dateFrom and dateTo dates)

  • If dates are not provided, defaults to yesterday's enquiries

  • Date format must be yyyy-MM-dd (e.g., 2025-01-25)


Example Requests

Example 1: Get Yesterday's Enquiries (using defaults)

curl "https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId=35154&companyKey=8b645efb-40dc-44ce-acb3-0a1aef752de7"

Example 2: Get Enquiries for a Specific Date Range

curl "https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId=35154&companyKey=8b645efb-40dc-44ce-acb3-0a1aef752de7&dateFrom=2025-01-01&dateTo=2025-01-31"

Example 3: Get Last Week's Enquiries

curl "https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId=35154&companyKey=8b645efb-40dc-44ce-acb3-0a1aef752de7&dateFrom=2025-01-18&dateTo=2025-01-25"

Example 4: Using JavaScript (Fetch API)

const companyId = 35154;
const companyKey = '8b645efb-40dc-44ce-acb3-0a1aef752de7';
const dateFrom = '2025-01-01';
const dateTo = '2025-01-31';

const url = `https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId=${companyId}&companyKey=${companyKey}&dateFrom=${dateFrom}&dateTo=${dateTo}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    console.log('Enquiries:', data);
  })
  .catch(error => {
    console.error('Error:', error);
  });

Example 5: Using C# (HttpClient)

using System;
using System.Net.Http;
using System.Threading.Tasks;

public class EnquiryClient
{
    private static readonly HttpClient client = new HttpClient();

    public static async Task GetEnquiries()
    {
        var companyId = 35154;
        var companyKey = "8b645efb-40dc-44ce-acb3-0a1aef752de7";
        var dateFrom = "2025-01-01";
        var dateTo = "2025-01-31";

        var url = $"https://www.lovetorent.co.uk/ltrAPI/ListEnquiries/?companyId={companyId}&companyKey={companyKey}&dateFrom={dateFrom}&dateTo={dateTo}";

        try
        {
            var response = await client.GetStringAsync(url);
            Console.WriteLine(response);
        }
        catch (HttpRequestException e)
        {
            Console.WriteLine($"Request error: {e.Message}");
        }
    }
}

Response Format

Success Response

Status: 200 OK

Content-Type: application/json

{
  "CompanyName": "Example Company Ltd",
  "Status": "Success",
  "Enquiries": [
    {
      "DevelopmentName": "Riverside Development",
      "UnitName": "Apartment 101",
      "RequestDetails": "True",
      "ArrangeViewing": "True",
      "Title": "Mr",
      "FirstName": "John",
      "LastName": "Smith",
      "Email": "john.smith@example.com",
      "Postcode": "SW1A 1AA",
      "Telephone": "07700900123",
      "Country": "United Kingdom",
      "Enquiry": "I am interested in arranging a viewing for this property.",
      "CreateDate": "25/01/2025 14:30:00"
    },
    {
      "DevelopmentName": "Riverside Development",
      "UnitName": "Apartment 205",
      "RequestDetails": "True",
      "ArrangeViewing": "False",
      "Title": "Ms",
      "FirstName": "Jane",
      "LastName": "Doe",
      "Email": "jane.doe@example.com",
      "Postcode": "W1A 1AA",
      "Telephone": "07700900456",
      "Country": "United Kingdom",
      "Enquiry": "Please send me more details about this property.",
      "CreateDate": "25/01/2025 16:45:00"
    }
  ]
}

Enquiry Object Properties

Property

Type

Description

DevelopmentName

string

Name of the development

UnitName

string

Name/number of the specific unit

RequestDetails

string

"True" if customer requested property details

ArrangeViewing

string

"True" if customer wants to arrange a viewing

Title

string

Customer's title (Mr, Mrs, Ms, etc.)

FirstName

string

Customer's first name

LastName

string

Customer's last name

Email

string

Customer's email address

Postcode

string

Customer's postcode

Telephone

string

Customer's phone number

Country

string

Customer's country

Enquiry

string

Customer's enquiry message

CreateDate

string

Date and time enquiry was submitted (dd/MM/yyyy HH:mm:ss)


Error Responses

Invalid/Missing Company ID

Response:

{
  "Status": "Unknown"
}

Invalid Company Key

Response:

{
  "Status": "Unknown credentials"
}

API Access Not Enabled

Response:

{
  "Status": "Not authorised"
}

Invalid Date Format

Response (dateTo):

{
  "Status": "dateTo not in correct format (yyyy-mm-dd)"
}

Response (dateFrom):

{
  "Status": "dateFrom not in correct format (yyyy-mm-dd)"
}

No Records Found

Response:

{
  "Status": "No records found",
  "CompanyName": "Example Company Ltd"
}

Important Notes

Data Limitations

  • The API returns a maximum of 5 enquiries per request (TOP 5 in query)

  • Test member enquiries are automatically filtered out

  • Only enquiries for dates within your specified range are returned

Security Best Practices

  1. Never expose your Company Key in client-side code

  2. Store credentials securely (use environment variables or secure configuration)

  3. Use HTTPS for all API requests

  4. Implement rate limiting in your application to avoid excessive requests

  5. Log failed authentication attempts for security monitoring

Data Privacy

  • All enquiry data contains personal information

  • Comply with GDPR and data protection regulations

  • Only access enquiries for your authorized properties

  • Implement appropriate data retention policies


Rate Limiting

Currently, there are no enforced rate limits, but we recommend:

  • Maximum 1 request per minute for polling

  • Batch requests by using appropriate date ranges

  • Consider implementing webhooks for real-time notifications (contact us for details)


Support

For API access issues, questions, or to report bugs:

  • Email: support@lovetorent.co.uk

  • Technical Support: developers@lovetorent.co.uk


Changelog

Version 1.0 (Current)

  • Initial API release

  • GET endpoint for listing enquiries

  • Company-based authentication

  • Date range filtering


Testing

Test Environment

Use your credentials on the test environment:

https://lovetorent.fmlocal.co.uk/ltrAPI/ListEnquiries/

Sample Test Request

curl "https://lovetorent.fmlocal.co.uk/ltrAPI/ListEnquiries/?companyId=YOUR_TEST_COMPANY_ID&companyKey=YOUR_TEST_KEY&dateFrom=2025-01-01&dateTo=2025-01-31"

Replace YOUR_TEST_COMPANY_ID and YOUR_TEST_KEY with your test credentials.


Frequently Asked Questions (FAQ)

Q: Why am I getting "Unknown credentials" even though my Company ID is correct?
A: Your Company Key (GUID) must exactly match the Key property of your company node in Umbraco. Check with your administrator.

Q: Can I retrieve enquiries older than the specified date range?
A: Yes, you can specify any date range, but remember only the first 5 results will be returned. Contact support if you need bulk historical data.

Q: What timezone are the dates in?
A: All dates and times are in UK time (GMT/BST depending on the season).

Q: Can I get real-time notifications instead of polling?
A: Webhook support is planned for future releases. Contact us to express interest.

Q: Why do I only get 5 results?
A: This is currently a hard limit in the API. If you need more results per request, please contact support to discuss your use case.


Last Updated: January 2025
API Version: 1.0