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.
The Python examples use the property resources instantiated from the client (see the overview):
property_config = client.property_config
Categories
Create a category
- TypeScript
- Python
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,
});
from wiil.models.business_mgt import CreatePropertyCategory
category = property_config.create_category(
CreatePropertyCategory(
name="Luxury Homes",
description="High-end residential listings",
property_type="residential",
display_order=1,
)
)
Get, list, update
- TypeScript
- Python
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,
});
from wiil.models.business_mgt import UpdatePropertyCategory
from wiil.types import PaginationRequest
category = property_config.get_category("cat_123")
categories = property_config.list_categories(PaginationRequest(page=1, page_size=20))
updated = property_config.update_category(
UpdatePropertyCategory(id="cat_123", name="Premium Commercial")
)
Delete
Category deletion is exposed through the TypeScript SDK.
await client.propertyConfig.deleteCategory('cat_123');
Batch create
- TypeScript
- Python
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 },
]);
from wiil.models.business_mgt import CreatePropertyCategory
categories = property_config.create_category_batch([
CreatePropertyCategory(name="Apartments", property_type="residential", display_order=1),
CreatePropertyCategory(name="Houses", property_type="residential", display_order=2),
CreatePropertyCategory(name="Commercial", property_type="commercial", display_order=3),
])
Both SDKs cap batch creation at 50 categories per request.
PropertyCategory fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | auto | Unique identifier |
name | string | Yes | Category name (e.g. "Luxury Homes") |
description | string | null | No | Category description |
propertyType | enum | Yes | residential, commercial, or land |
displayOrder | integer | null | No | Display order in listings |
isDefault | boolean | Yes | Whether this is the default category (default false) |
createdAt / updatedAt | number | auto | Timestamps |
Addresses
An address is created once, optionally verified, and then referenced by a property via addressId.
Create an address
- TypeScript
- Python
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,
});
from wiil.models.business_mgt import CreatePropertyAddress
address = property_config.create_address(
CreatePropertyAddress(
street="456 Park Avenue",
city="New York",
state="NY",
postal_code="10022",
country="USA",
is_verified=False,
)
)
Verify and update
Verifying an address stamps isVerified and verifiedAt — do this before publishing a listing.
- TypeScript
- Python
const verified = await client.propertyConfig.verifyAddress('addr_123');
const updated = await client.propertyConfig.updateAddress({
id: 'addr_123',
unit: 'Suite 100',
neighborhood: 'Financial District',
});
from wiil.models.business_mgt import UpdatePropertyAddress
address = property_config.verify_address("addr_123")
address = property_config.update_address(
UpdatePropertyAddress(id="addr_123", neighborhood="Midtown East")
)
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
- TypeScript
- Python
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' },
]);
from wiil.models.business_mgt import CreatePropertyAddress
addresses = property_config.create_address_batch([
CreatePropertyAddress(street="123 Main St", city="New York", state="NY", postal_code="10001", country="US"),
CreatePropertyAddress(street="456 Oak Ave", city="Los Angeles", state="CA", postal_code="90001", country="US"),
])
Both SDKs cap batch creation at 50 addresses per request.
PropertyAddress fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | auto | Unique identifier |
street | string | Yes | Street address |
unit | string | null | No | Unit or apartment number |
city | string | Yes | City |
state | string | Yes | State or province |
postalCode | string | null | No | Postal/ZIP code |
country | string | Yes | Country |
coordinates | object | null | No | latitude (−90…90), longitude (−180…180) |
neighborhood / district | string | null | No | Locality detail for search |
isVerified | boolean | Yes | Whether verified (default false) |
verifiedAt | number | null | No | Verification timestamp |
primaryUserAccountId | string | null | No | Managing user account |
Query options
| Resource | Filters | Sort fields |
|---|---|---|
PropertyAddress | search, city, state, country, neighborhood, district, geolocation (latitude, longitude, radiusKm), isVerified | street, city, state, country, createdAt |
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.