Reference

Field Schema

Dynamic field schema for different property types

The schema API has two endpoints: a base schema that returns all possible types and constraints, and a contextual schema that returns the exact fields and options for a specific property type combination.

Why You Need the Schema

  • Validation — verify data before submission to avoid rejected requests
  • Correct payloads — know exactly which fields and values are accepted for each property type
  • Up-to-date — always get current constraints and options directly from the API

Get Base Schema

GET /api/v1/reference/schema/base

Returns the general structure: listing types, property categories, all form fields, and constraints. No parameters required. Use this to initialize your form and understand the data model.

const response = await fetch('https://crm.rentix.md/api/v1/reference/schema/base', {
  headers: { 'Authorization': 'ApiKey YOUR_API_KEY' }
});
const schema = await response.json();

// Available property types for rental
console.log(schema.propertySecondaryType.rent.residential);
// → ["apartment", "house", "room", "other"]
Response
{
  "announcementType": ["rent", "sale"],
  "propertyType": ["residential", "commercial", "parking"],
  "propertySecondaryType": {
    "rent": {
      "residential": ["apartment", "house", "room", "other"],
      "commercial": ["office", "trade", "warehouse", "..."],
      "parking": ["underground-parking", "open-parking", "..."]
    },
    "sale": { "..." }
  },
  "announcementCurrency": ["EUR", "USD", "MDL"],
  "announcementStatus": ["draft", "active", "pending_active", "publish_failed", "expired", "hidden", "completed", "blocked"],
  "formFields": [
    "propertyType", "propertySecondaryType", "propertyQuantitySize",
    "propertyArea", "propertyFloorNumber", "propertyCoordinates",
    "announcementType", "announcementValue", "announcementCurrency",
    "announcementDescription", "fileIds"
    // ...and other fields
  ],
  "constraints": {
    "propertyArea": { "min": 1, "max": 50000, "step": 0.01 },
    "propertyFloorNumber": { "min": -10, "max": 100, "step": 1 },
    "announcementValue": { "min": 1, "max": 1000000000, "step": 1 },
    "announcementDescription": { "minLength": 40, "maxLength": 2000 },
    "propertyCoordinates": { "lat": { "min": -90, "max": 90 }, "lng": { "min": -180, "max": 180 } },
    "fileIds": { "minItems": 3, "maxItems": 20, "maxVideoFiles": 2, "maxVideoDuration": 300 }
    // ...and other fields
  }
}

Base Schema Fields

FieldDescription
announcementTypeAvailable listing types (rent, sale)
propertyTypeProperty categories (residential, commercial, parking)
propertySecondaryTypeNested map: announcementTypepropertyType → subtypes
announcementCurrencySupported currencies for prices
announcementStatusAll listing statuses
formFieldsAll form field keys
constraintsNumeric bounds for constrained fields

Get Contextual Schema

GET /api/v1/reference/schema

Pass a specific combination of listing type, property type, and subtype to get the complete field definition. Each field includes its type, whether it's required, and the available options or constraints. Fields that don't apply to the given combination are returned as null.

const params = new URLSearchParams({
  announcementType: 'rent',
  propertyType: 'residential',
  propertySecondaryType: 'apartment'
});

const response = await fetch(
  `https://crm.rentix.md/api/v1/reference/schema?${params}`,
  { headers: { 'Authorization': 'ApiKey YOUR_API_KEY' } }
);
const schema = await response.json();

// Check if a field is available
if (schema.fields.propertyVisualState) {
  console.log(schema.fields.propertyVisualState.options);
  // → ["classic-renovation", "euro-renovation", "design-renovation"]
}

Parameters

ParameterTypeDescription
announcementTypeenumrent or sale
propertyTypeenumresidential, commercial, or parking
propertySecondaryTypeenumSubtype (must be valid for the given combination)
All three parameters are required. Together they determine the exact set of available fields and their options.
Response
{
  "context": {
    "announcementType": "rent",
    "propertyType": "residential",
    "propertySecondaryType": "apartment"
  },
  "fields": {
    "propertyQuantitySize": {
      "type": "enum",
      "required": true,
      "options": ["apartment-studio", "custom-value"]
    },
    "propertyQuantitySizeValue": {
      "type": "number",
      "required": false,
      "constraints": { "min": 1, "max": 100, "step": 1 }
    },
    "propertyArea": {
      "type": "number",
      "required": true,
      "constraints": { "min": 1, "max": 50000, "step": 0.01 }
    },
    "propertyLandArea": null,
    "propertyCoordinates": {
      "type": "coordinates",
      "required": true,
      "constraints": { "lat": { "min": -90, "max": 90 }, "lng": { "min": -180, "max": 180 } }
    },
    "propertyAvailabilityDate": {
      "type": "date",
      "required": true,
      "format": "YYYY-MM-DD"
    },
    "propertyAttributes": {
      "type": "enum-array",
      "required": false,
      "options": ["animals-allowed", "conditioner", "balcony", "wifi", "..."]
    },
    "announcementValue": {
      "type": "number",
      "required": true,
      "constraints": { "min": 1, "max": 1000000000, "step": 1 }
    },
    "announcementPayPeriod": {
      "type": "enum",
      "required": true,
      "options": ["monthly", "daily", "hourly"]
    },
    "fileIds": {
      "type": "number-array",
      "required": false,
      "constraints": { "minItems": 3, "maxItems": 20, "maxVideoFiles": 2, "maxVideoDuration": 300 }
    }
    // ...and other fields
  }
}
A null field value means it is not available for the given context. Non-required fields can be omitted or sent as null.

Field Types

Each field in the contextual schema has a type that determines its structure:

TypePropertiesDescription
enumrequired, optionsSingle value from a list
enum-arrayrequired, optionsMultiple values from a list
numberrequired, constraints (min, max, step)Numeric value within bounds
stringrequired, constraints (minLength, maxLength)Text with length limits
daterequired, formatDate in the specified format
coordinatesrequired, constraints (lat, lng with min/max)Geographic coordinates
number-arrayrequired, constraints (minItems, maxItems, maxVideoFiles, maxVideoDuration)Array of numeric IDs (media files)

Field Reference

Property Fields

These fields depend on the selected propertySecondaryType — they may be null for some combinations.

FieldTypeDescription
propertyQuantitySizeenumRoom type (apartment-studio, custom-value)
propertyQuantitySizeValuenumberCustom room count (when custom-value is selected)
propertyVisualStateenumRenovation condition (euro-renovation, design-renovation, ...)
propertyHousingMarketenumMarket type (secondary, new-build)
propertyBuildingMaterialenumConstruction material (brick, monolithic, panel, ...)
propertyLayoutenumLayout/series (102, brezhnevka, cheska, ...)
propertyParkingSpaceenumParking type (underground, open, garage, covered)
propertyFloorNumbernumberFloor number
propertyFloorsTotalnumberTotal floors in the building
propertyAreanumberTotal area in m²
propertyLandAreanumberLand area in m² (houses and land plots)
propertyCeilingHeightnumberCeiling height in meters
propertyAttributesenum-arrayAmenities and rules (pets, WiFi, balcony, ...)
propertyCoordinatescoordinatesMap location (latitude, longitude)
propertyAddressstringStreet address, geocoded to coordinates (CRM-only, max 500 chars). Either propertyCoordinates or propertyAddress is required. Recommended format: City, Street Block (e.g. Chișinău, str. Columna 81/1)
propertyAvailabilityDatedateAvailable from date (YYYY-MM-DD)

Announcement Fields

These fields are always present (never null), though some apply only to rent listings.

FieldTypeDescription
announcementStatusenumListing status (draft, active, hidden, ...)
announcementValuenumberPrice
announcementCurrencyenumPrice currency (EUR, USD, MDL)
announcementDescriptionstringListing description text
announcementBargainenumBargain allowed (yes, no)
announcementPayPeriodenumPayment period, rent type (monthly, daily, hourly)
announcementMinRentPeriodnumberMinimum rent period in hours (720 = 1 month), rent type
announcementPrepaymentenumPrepayment option, rent type
announcementPrepaymentValuenumberCustom prepayment amount, rent type (when custom-amount)
announcementRentDepositenumDeposit option, rent type
announcementRentDepositValuenumberCustom deposit amount, rent type (when custom-amount)
fileIdsnumber-arrayMedia file IDs attached to the listing

Property Types

Residential

ValueDescription
apartmentApartment
houseHouse
roomRoom
residential-landLand plot (sale only)
otherOther

Commercial

ValueDescription
officeOffice
tradeRetail space
warehouseWarehouse
free-purposeMulti-purpose
productionProduction
businessReady business
commercial-landCommercial land
legal-addressLegal address
otherOther

Parking

ValueDescription
underground-parkingUnderground parking
open-parkingOpen parking
garageGarage
covered-parkingCovered parking
otherOther
Copyright © 2026