Integration API Developer Guide

Complete guide for integrating with Prop360's external API system

API Endpoints
13

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 and contact management
Property 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
Contact Fields API
Get available fields for the contact form
GET /api/integration/contacts/fields
Ready
Contacts API
Complete CRUD operations for CRM contacts
GET/POST /api/integration/contacts
Ready
Contact Details API
Get, partially update, and delete specific contacts
GET/PUT/DELETE /api/integration/contacts/{id}
Ready
Quick Start
Get started with Prop360 Integration API in minutes — Base URL: https://prop360.pro/api/integration/

1. Basic Setup

Integration API Setup
// Initialize API client
const API_TOKEN = 'your_api_token_here';
const BASE_URL = 'https://prop360.pro/api/integration/';

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

// Get available fields (always call this first — field names vary per merchant)
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,
    Bedroom: 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://prop360.pro/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,
    Bedroom: 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://prop360.pro/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://prop360.pro/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
List, Get, Update & Delete
Read and modify existing properties — use the MongoDB id from create/list responses
Property CRUD Example
// List, get, update, and delete properties
const BASE_URL = 'https://prop360.pro/api/integration/';
const headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json'
};

// List properties (paginated)
const listRes = await fetch(`${BASE_URL}properties?page=1&limit=10`, { headers });
const { properties, pagination } = await listRes.json();
console.log(`Found ${pagination.total} properties`);

// Get a single property by MongoDB id
const propertyId = properties[0].id;
const getRes = await fetch(`${BASE_URL}properties/${propertyId}`, { headers });
const { property } = await getRes.json();

// Update a property (send only fields you want to change)
const updateRes = await fetch(`${BASE_URL}properties/${propertyId}`, {
  method: 'PUT',
  headers,
  body: JSON.stringify({
    data: {
      Title: 'Updated Apartment Title',
      Price: 360000,
      isPublic: true
    }
  })
});
const updated = await updateRes.json();

// Delete a property (soft delete — requires delete permission on token)
const deleteRes = await fetch(`${BASE_URL}properties/${propertyId}`, {
  method: 'DELETE',
  headers
});
const deleted = await deleteRes.json();
console.log(deleted.message);
Error Handling
All endpoints return { error: "..." } with standard HTTP status codes
Error Response Handling
// Common error responses
const response = await fetch('https://prop360.pro/api/integration/properties', {
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});

if (!response.ok) {
  const { error } = await response.json();
  switch (response.status) {
    case 401:
      // { error: "Invalid or inactive token" }
      // { error: "No valid authorization header" }
      break;
    case 403:
      // { error: "Token does not have delete permission" }
      break;
    case 404:
      // { error: "Property not found" }
      break;
    case 400:
      // { error: "Invalid location data: ..." }
      break;
    default:
      console.error(error);
  }
}
Contacts API
Manage CRM contacts — create, read, update, and delete using the same API token as properties

Same Token, New Resource

The Contacts API uses your existing API token. No new credentials are needed. PUT requests perform a partial merge — only the fields you send are changed; all other fields are preserved.

GET /api/integration/contacts/fields

List all available contact fields and their types

GET/POST /api/integration/contacts

List contacts (paginated, max 100) or create a new one

GET/PUT/DELETE /api/integration/contacts/{id}

Fetch, partially update, or soft-delete a contact by its MongoDB ID

Contacts API — Create & Update Example
// 1. Get available contact fields
const fieldsRes = await fetch('https://prop360.pro/api/integration/contacts/fields', {
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const { fields } = await fieldsRes.json();

// 2. Create a contact
const contactData = {
  data: {
    "Full Name": "Maria Papadopoulou",
    "Email": "maria@example.com",
    "Phone": "+30 697 000 0000"
  }
};

const response = await fetch('https://prop360.pro/api/integration/contacts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(contactData)
});

const result = await response.json();
// result.contact.id  → MongoDB _id (use for updates/deletes)
// result.contact.pid → Numeric public ID

// 3. Partial update — only sent fields change, others are preserved
await fetch(`https://prop360.pro/api/integration/contacts/${result.contact.id}`, {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ data: { "Phone": "+30 697 111 1111" } })
});

Contacts vs Properties — Key Differences

No isPublic flag — contacts are always private CRM records
No hierarchical location fields — contacts use standard form fields only
PUT is a partial merge — safe to send only the fields you want to change
No image upload endpoint for contacts
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

CRM Contacts

Full CRUD for contacts with safe partial updates via the same API token

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.

5

Manage CRM Contacts

Use the Contacts API with the same token to create and manage client contacts. Call GET /api/integration/contacts/fields first to discover available fields, then POST to create contacts.

Resources
Additional resources to help you integrate successfully
    Prop 360 Real Estate CRM