Skip to main content

Categories & Addresses

Two foundations sit beneath every listing. A property category groups listings by type — Luxury Homes, Commercial Offices, Waterfront — and is scoped to a propertyType (residential, commercial, or land). A property address is a standalone, verifiable location with geocoordinates that a property then references — so an address can be confirmed once and reused, and listings can be found by city, neighborhood, or a map radius.

Python setup

The Python examples use the property resources instantiated from the client (see the overview):

property_config = client.property_config

Categories​

Create a category​

import { PropertyType } from 'wiil-js';

const category = await client.propertyConfig.createCategory({
name: 'Waterfront Properties',
description: 'Properties with water access or views',
propertyType: PropertyType.RESIDENTIAL,
displayOrder: 1,
isDefault: false,
});

Get, list, update​

const category = await client.propertyConfig.getCategory('cat_123');
const result = await client.propertyConfig.listCategories({ page: 1, pageSize: 20 });

const updated = await client.propertyConfig.updateCategory({
id: 'cat_123',
name: 'Premium Waterfront Properties',
displayOrder: 0,
});

Delete​

Category deletion is exposed through the TypeScript SDK.

await client.propertyConfig.deleteCategory('cat_123');

Batch create​

import { PropertyType } from 'wiil-js';

const categories = await client.propertyConfig.createCategoryBatch([
{ name: 'Luxury Homes', propertyType: PropertyType.RESIDENTIAL, displayOrder: 1 },
{ name: 'Waterfront Properties', propertyType: PropertyType.RESIDENTIAL, displayOrder: 2 },
{ name: 'Commercial Offices', propertyType: PropertyType.COMMERCIAL, displayOrder: 3 },
]);
Limits

Both SDKs cap batch creation at 50 categories per request.

PropertyCategory fields​

FieldTypeRequiredDescription
idstringautoUnique identifier
namestringYesCategory name (e.g. "Luxury Homes")
descriptionstring | nullNoCategory description
propertyTypeenumYesresidential, commercial, or land
displayOrderinteger | nullNoDisplay order in listings
isDefaultbooleanYesWhether this is the default category (default false)
createdAt / updatedAtnumberautoTimestamps

Addresses​

An address is created once, optionally verified, and then referenced by a property via addressId.

Create an address​

const address = await client.propertyConfig.createAddress({
street: '456 Park Avenue',
unit: 'PH-1',
city: 'New York',
state: 'NY',
postalCode: '10022',
country: 'USA',
neighborhood: 'Midtown East',
coordinates: { latitude: 40.7614, longitude: -73.9705 },
isVerified: false,
});

Verify and update​

Verifying an address stamps isVerified and verifiedAt — do this before publishing a listing.

const verified = await client.propertyConfig.verifyAddress('addr_123');

const updated = await client.propertyConfig.updateAddress({
id: 'addr_123',
unit: 'Suite 100',
neighborhood: 'Financial District',
});

Get, list, delete​

Address reads and deletion are exposed through the TypeScript SDK.

const address = await client.propertyConfig.getAddress('addr_123');
const result = await client.propertyConfig.listAddresses({ page: 1, pageSize: 20 });
await client.propertyConfig.deleteAddress('addr_123');

Batch create​

const addresses = await client.propertyConfig.createAddressBatch([
{ street: '123 Ocean Drive', city: 'Miami', state: 'FL', postalCode: '33139', country: 'USA' },
{ street: '456 Park Avenue', city: 'New York', state: 'NY', postalCode: '10022', country: 'USA' },
]);
Limits

Both SDKs cap batch creation at 50 addresses per request.

PropertyAddress fields​

FieldTypeRequiredDescription
idstringautoUnique identifier
streetstringYesStreet address
unitstring | nullNoUnit or apartment number
citystringYesCity
statestringYesState or province
postalCodestring | nullNoPostal/ZIP code
countrystringYesCountry
coordinatesobject | nullNolatitude (−90…90), longitude (−180…180)
neighborhood / districtstring | nullNoLocality detail for search
isVerifiedbooleanYesWhether verified (default false)
verifiedAtnumber | nullNoVerification timestamp
primaryUserAccountIdstring | nullNoManaging user account

Query options​

ResourceFiltersSort fields
PropertyAddresssearch, city, state, country, neighborhood, district, geolocation (latitude, longitude, radiusKm), isVerifiedstreet, city, state, country, createdAt
tip

Add coordinates to every address so listings support map display and radius search, and verify addresses before publishing — an unverified address can block a listing from going active.