How to Use the API

This guide explains how to submit properties via API or file import.

Step 1: Request API access

  1. Log in to your account.
  2. Go to Profile & Settings.
  3. In the API access section, click 'Request API access'.
  4. Our team will review your request. You will be notified when approved.

Step 2: Create an API key

Once API access is granted:

  1. Go to Profile & Settings.
  2. In the API access section, enter an optional key name (e.g. 'Production' or 'Agency XYZ').
  3. Click 'Create API key'.
  4. Copy your key immediately. It is shown only once and cannot be retrieved later.
  5. 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:

  1. Go to Submit property.
  2. In the 'Import from file' section, download an example (JSON or XML).
  3. Fill in your property data using the example format.
  4. Upload the file and click 'Import and pre-fill form'.
  5. 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

Need help?