Integration API Developer Guide

Complete guide for integrating with Prop360's external API system

API Endpoints
7

Available integration endpoints

Operations
All CRUD operations

Create, Read, Update, Delete

Image Upload
Image validation and upload

Multi-image upload

Security
Prop360 API Token

API token authentication

Integration APIs
Complete external API system for property management
Fields API
Get available fields for property creation
GET /api/integration/fields
Ready
Properties API
Complete CRUD operations for properties
GET/POST /api/integration/properties
Ready
Property Details API
Get, update, and delete specific properties
GET/PUT/DELETE /api/integration/properties/{id}
Ready
Image Upload API
Upload images to properties
POST /api/integration/properties/{id}/images
Ready
Quick Start
Get started with Prop360 Integration API in minutes

1. Basic Setup

Integration API Setup
// Initialize API client
const API_TOKEN = 'your_api_token_here';
const BASE_URL = 'https://your-domain.com/api/integration';

const headers = {
  'Authorization': `Bearer ${API_TOKEN}`,
  'Content-Type': 'application/json'
};

// Get available fields
const fields = await fetch(`${BASE_URL}/fields`, { headers });
const fieldsData = await fields.json();

// Create a property with hierarchical location
const propertyData = {
  data: {
    Title: "Beautiful Apartment",
    Type: "apartment",
    Price: 350000,
    Bedrooms: 3,
    // Hierarchical Location - Provide at least one level
    Region: 104,        // Region ID (auto-resolves name)
    SubRegion: 2402,    // Sub-region ID (optional)
    Area: 123304,       // Area ID (optional)
    // Geographic coordinates
    Location: {
      lat: 37.9838,
      lng: 23.7275
    },
    isPublic: true
  }
};

const response = await fetch(`${BASE_URL}/properties`, {
  method: 'POST',
  headers,
  body: JSON.stringify(propertyData)
});

const property = await response.json();
console.log('Property created:', property);

2. Authentication

API Token Authentication
// API Token Authentication
// All requests require an API token in the Authorization header

const headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json'
};

// Example request
const response = await fetch('https://your-domain.com/api/integration/properties', {
  headers
});

// Token permissions:
// - read: View properties and fields
// - create: Create new properties
// - update: Modify existing properties
// - delete: Soft delete properties
// - upload: Upload images to properties
Create Property
Example of creating a new property with all field types
Create Property Example
// Create a new property with hierarchical location
const propertyData = {
  data: {
    Title: "Luxury Villa",
    Type: "villa",
    Price: 750000,
    Bedrooms: 5,
    Bathrooms: 4,
    "Square Meters": 250,
    Description: "A beautiful luxury villa with amazing views",
    
    // Hierarchical Location - NEW: Use structured location data
    Region: {
      id: 104,
      name: "Τήνος",
      nameEN: "Tinos"
    },
    SubRegion: {
      id: 2402,
      name: "Υστέρνια",
      nameEN: "Ysternia"
    },
    Area: {
      id: 123304,
      name: "Δέση",
      nameEN: "Desi"
    },
    
    // Alternative: Simple ID format (names auto-resolved)
    // Region: 104,
    // SubRegion: 2402,
    // Area: 123304,
    
    // Geographic coordinates
    Location: {
      lat: 37.9838,
      lng: 23.7275
    },
    isPublic: true
  }
};

const response = await fetch('https://your-domain.com/api/integration/properties', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(propertyData)
});

const result = await response.json();
console.log('Property created:', result);
Upload Images
Upload multiple images to a property
Image Upload Example
// Upload images to a property
const formData = new FormData();
formData.append('images', file1);
formData.append('images', file2);

const response = await fetch(
  'https://your-domain.com/api/integration/properties/PROPERTY_ID/images',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN'
    },
    body: formData
  }
);

const result = await response.json();
console.log('Images uploaded:', result);

// Supported formats: JPEG, JPG, PNG, WebP
// Max file size: 10MB per image
Hierarchical Location System (NEW)
Advanced location structure with Region → SubRegion → Area hierarchy

Important Update

The API now uses hierarchical location fields instead of simple "City" field. This provides better geographic accuracy and supports multilingual location names.

Complete Object Format

Complete Object Format
{
  "data": {
    "Title": "Beautiful Apartment",
    "Region": {
      "id": 104,
      "name": "Τήνος",
      "nameEN": "Tinos"
    },
    "SubRegion": {
      "id": 2402,
      "name": "Υστέρνια",
      "nameEN": "Ysternia"
    },
    "Area": {
      "id": 123304,
      "name": "Δέση",
      "nameEN": "Desi"
    },
    "isPublic": true
  }
}

Simple ID Format (Auto-resolve)

Simple ID Format
{
  "data": {
    "Title": "Beautiful Apartment",
    "Region": 104,
    "SubRegion": 2402,
    "Area": 123304,
    "isPublic": true
  }
}

// Names are automatically resolved:
// Response will include complete object
// with name and nameEN fields

Location Field Requirements

At least one level must be provided (Region, SubRegion, or Area)
Flexible field names: Region/region, SubRegion/sub-region/subregion, Area/area
Auto-resolution: Provide just IDs and names are resolved automatically
Multilingual: Supports both local names and English names

Migration Note

Existing integrations using "City" field will continue to work, but we recommend updating to the new hierarchical location system for better accuracy and features.

Key Features
What makes our Integration API powerful and developer-friendly
User-Friendly Fields

Use human-readable field names instead of internal IDs

Secure Tokens

Cryptographically secure API tokens with granular permissions

Image Upload

Multi-image upload with S3 integration and validation

Hierarchical Location

Structured location data with Region/SubRegion/Area hierarchy

Audit Logging

Complete audit trail for all API operations

Comprehensive Docs

Complete documentation with examples and best practices

Getting Started
Step-by-step guide to start using the Integration API
1

Get API Token

Contact a Prop360 administrator to generate an API token with appropriate permissions for your broker/agent.

2

Explore Available Fields

Use the Fields API to get the list of available fields and their types for your broker/agent.

3

Create Your First Property

Use the Properties API with hierarchical location fields (Region, SubRegion, Area) and user-friendly field names.

4

Upload Images

Use the Image Upload API to add images to your properties with automatic validation.

Resources
Additional resources to help you integrate successfully