How to Use the API
This guide explains how to submit properties via API or file import.
Step 1: Request API access
- Log in to your account.
- Go to Profile & Settings.
- In the API access section, click 'Request API access'.
- Our team will review your request. You will be notified when approved.
Step 2: Create an API key
Once API access is granted:
- Go to Profile & Settings.
- In the API access section, enter an optional key name (e.g. 'Production' or 'Agency XYZ').
- Click 'Create API key'.
- Copy your key immediately. It is shown only once and cannot be retrieved later.
- Store the key securely. Do not share it or commit it to version control.
Step 3: Submit a property via API
Send a POST request to:
https://lokacija.net/api/properties/submit/
Include your API key in the request header:
X-API-Key: your-api-key
Or:
Authorization: Bearer your-api-key
Send the property data as JSON in the request body. Example:
{
"property": {
"title": "Modern apartment in Bežigrad",
"description": "Spacious 85m² apartment with balcony.",
"property_type": "apartment",
"listing_type": "sell",
"price": 285000,
"street_number": "45",
"bedrooms": 3,
"bathrooms": 2,
"area_sqm": 85,
"amenities": ["balcony", "parking"]
},
"location": {
"city": "Ljubljana",
"district": "Bežigrad",
"street": "Dunajska cesta"
}
}
Alternative: File import (no API key needed)
You can also submit properties by uploading a JSON or XML file:
- Go to Submit property.
- In the 'Import from file' section, download an example (JSON or XML).
- Fill in your property data using the example format.
- Upload the file and click 'Import and pre-fill form'.
- Review the form, add photos if needed, and submit.
For multiple properties at once, use Bulk import.
Required fields
- property.title — Property title
- property.street_number — Building/house number
- location.city — City name
- location.district — District name
- location.street — Street name