{"info":{"title":"GiayToNha — API tin đăng","version":"1.0.0","description":"Đọc các tin đăng công khai của bạn để hiển thị trên website riêng. Mỗi khóa được gửi tối đa 60 yêu cầu mỗi 60 giây."},"servers":[{"url":"https://api.giaytonha.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Khóa API tạo tại trang Hồ sơ (Quản lý khóa API), gửi trong header Authorization: Bearer <khóa>. Một khóa đọc mọi không gian làm việc được cấp cho nó."}}},"security":[{"apiKey":[]}],"openapi":"3.2.0","paths":{"/public/v1/listings":{"get":{"operationId":"propertyListingApi.list","summary":"Danh sách tin đăng","description":"Các tin đăng công khai của không gian làm việc sở hữu khóa API, mới nhất trước.","tags":["Tin đăng","API công khai"],"parameters":[{"in":"query","name":"searchText","schema":{"description":"Tìm theo tên, địa chỉ, phường/xã hoặc tỉnh/thành.","type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"province","schema":{"description":"Lọc theo tỉnh/thành phố, đúng như trong tin đăng.","type":"string"},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"ward","schema":{"description":"Lọc theo phường/xã, đúng như trong tin đăng.","type":"string"},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"assetType","schema":{"type":"string","enum":["APARTMENT","HOUSE","BUILDING"],"description":"Loại tài sản. APARTMENT: Căn hộ; HOUSE: Nhà đất; BUILDING: Toà nhà/ Toà CHDV/ Dãy trọ"},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"minArea","schema":{"description":"Diện tích tối thiểu (m²).","type":"number","minimum":0},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"maxArea","schema":{"description":"Diện tích tối đa (m²).","type":"number","minimum":0},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"bedrooms","schema":{"description":"Số phòng ngủ.","type":"integer","minimum":0,"maximum":9007199254740991},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"availability","schema":{"type":"string","enum":["PENDING_SIGNATURE","OCCUPIED","ENDING_SOON","VACANT"],"description":"Tình trạng cho thuê. PENDING_SIGNATURE: Chờ ký; OCCUPIED: Đã cho thuê; ENDING_SOON: Sắp trống; VACANT: Còn trống"},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"page","schema":{"description":"Trang, bắt đầu từ 1. Mặc định 1.","type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"perPage","schema":{"description":"Số tin mỗi trang, tối đa 24. Mặc định 12.","type":"integer","minimum":1,"maximum":24},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Mã tin đăng, dùng để lấy chi tiết."},"name":{"type":"string","description":"Tên tài sản."},"assetType":{"type":"string","enum":["APARTMENT","HOUSE","BUILDING"],"description":"Loại tài sản. APARTMENT: Căn hộ; HOUSE: Nhà đất; BUILDING: Toà nhà/ Toà CHDV/ Dãy trọ"},"address":{"type":"string","description":"Địa chỉ."},"ward":{"type":"string","description":"Phường/xã."},"province":{"type":"string","description":"Tỉnh/thành phố."},"areaFrom":{"description":"Diện tích nhỏ nhất (m²) trong các phòng đang chào thuê, hoặc diện tích cả tài sản.","type":["number","null"]},"areaTo":{"description":"Diện tích lớn nhất (m²). Bằng areaFrom khi chỉ có một con số.","type":["number","null"]},"bedrooms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Số phòng ngủ."},"bathrooms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Số phòng tắm."},"rentFrom":{"description":"Giá thuê thấp nhất (VND mỗi kỳ thanh toán).","type":["number","null"]},"rentTo":{"description":"Giá thuê cao nhất (VND mỗi kỳ thanh toán). Bằng rentFrom khi chỉ có một mức.","type":["number","null"]},"billingCycle":{"anyOf":[{"type":"string","enum":["MONTH","QUARTER","HALF_YEAR","YEAR"],"description":"Kỳ thanh toán tiền thuê. MONTH: hàng tháng; QUARTER: hàng quý; HALF_YEAR: 6 tháng một lần; YEAR: hàng năm"},{"type":"null"}]},"listedUnitCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Số phòng đang chào thuê; 0 khi cho thuê nguyên căn."},"availability":{"type":"string","enum":["PENDING_SIGNATURE","OCCUPIED","ENDING_SOON","VACANT"],"description":"Tình trạng cho thuê. PENDING_SIGNATURE: Chờ ký; OCCUPIED: Đã cho thuê; ENDING_SOON: Sắp trống; VACANT: Còn trống"},"termEndsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Ngày cuối cùng hợp đồng đang ràng buộc còn giữ tài sản (ISO 8601), nếu có: ngày hết hạn hợp đồng, hoặc ngày bàn giao khi hợp đồng đã chấm dứt."},"description":{"description":"Mô tả của tài sản do chủ nhà soạn, hoặc null khi không có.","type":["string","null"]},"imageUrls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Địa chỉ ảnh cố định, dùng trực tiếp trong thẻ <img> mà không cần khóa API. Danh sách chỉ trả ảnh đại diện; chi tiết trả toàn bộ ảnh."},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"description":"Họ tên.","type":["string","null"]},"phone":{"description":"Số điện thoại.","type":["string","null"]},"verified":{"type":"boolean","description":"Đã xác thực danh tính (eKYC)."}},"required":["name","phone","verified"],"additionalProperties":false},"description":"Người liên hệ về tin đăng, theo thứ tự nên gọi."}},"required":["id","name","assetType","address","ward","province","areaFrom","areaTo","bedrooms","bathrooms","rentFrom","rentTo","billingCycle","listedUnitCount","availability","termEndsAt","description","imageUrls","contacts"],"additionalProperties":false},"description":"Tin đăng của trang được yêu cầu."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tổng số tin đăng khớp bộ lọc, trên mọi trang."}},"required":["data","total"],"additionalProperties":false}}}}}}},"/public/v1/listings/{id}":{"get":{"operationId":"propertyListingApi.getById","summary":"Chi tiết tin đăng","description":"Một tin đăng với toàn bộ ảnh, các phòng đang chào thuê và tình trạng của từng phòng.","tags":["Tin đăng","API công khai"],"parameters":[{"in":"path","required":true,"name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Mã tin đăng."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Mã tin đăng, dùng để lấy chi tiết."},"name":{"type":"string","description":"Tên tài sản."},"assetType":{"type":"string","enum":["APARTMENT","HOUSE","BUILDING"],"description":"Loại tài sản. APARTMENT: Căn hộ; HOUSE: Nhà đất; BUILDING: Toà nhà/ Toà CHDV/ Dãy trọ"},"address":{"type":"string","description":"Địa chỉ."},"ward":{"type":"string","description":"Phường/xã."},"province":{"type":"string","description":"Tỉnh/thành phố."},"areaFrom":{"description":"Diện tích nhỏ nhất (m²) trong các phòng đang chào thuê, hoặc diện tích cả tài sản.","type":["number","null"]},"areaTo":{"description":"Diện tích lớn nhất (m²). Bằng areaFrom khi chỉ có một con số.","type":["number","null"]},"bedrooms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Số phòng ngủ."},"bathrooms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Số phòng tắm."},"rentFrom":{"description":"Giá thuê thấp nhất (VND mỗi kỳ thanh toán).","type":["number","null"]},"rentTo":{"description":"Giá thuê cao nhất (VND mỗi kỳ thanh toán). Bằng rentFrom khi chỉ có một mức.","type":["number","null"]},"billingCycle":{"anyOf":[{"type":"string","enum":["MONTH","QUARTER","HALF_YEAR","YEAR"],"description":"Kỳ thanh toán tiền thuê. MONTH: hàng tháng; QUARTER: hàng quý; HALF_YEAR: 6 tháng một lần; YEAR: hàng năm"},{"type":"null"}]},"listedUnitCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Số phòng đang chào thuê; 0 khi cho thuê nguyên căn."},"availability":{"type":"string","enum":["PENDING_SIGNATURE","OCCUPIED","ENDING_SOON","VACANT"],"description":"Tình trạng cho thuê. PENDING_SIGNATURE: Chờ ký; OCCUPIED: Đã cho thuê; ENDING_SOON: Sắp trống; VACANT: Còn trống"},"termEndsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Ngày cuối cùng hợp đồng đang ràng buộc còn giữ tài sản (ISO 8601), nếu có: ngày hết hạn hợp đồng, hoặc ngày bàn giao khi hợp đồng đã chấm dứt."},"description":{"description":"Mô tả của tài sản do chủ nhà soạn, hoặc null khi không có.","type":["string","null"]},"imageUrls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Địa chỉ ảnh cố định, dùng trực tiếp trong thẻ <img> mà không cần khóa API. Danh sách chỉ trả ảnh đại diện; chi tiết trả toàn bộ ảnh."},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"description":"Họ tên.","type":["string","null"]},"phone":{"description":"Số điện thoại.","type":["string","null"]},"verified":{"type":"boolean","description":"Đã xác thực danh tính (eKYC)."}},"required":["name","phone","verified"],"additionalProperties":false},"description":"Người liên hệ về tin đăng, theo thứ tự nên gọi."},"units":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Mã phòng."},"name":{"type":"string","description":"Tên phòng."},"area":{"description":"Diện tích (m²).","type":["number","null"]},"rentPrice":{"description":"Giá thuê (VND mỗi kỳ thanh toán).","type":["number","null"]},"billingCycle":{"anyOf":[{"type":"string","enum":["MONTH","QUARTER","HALF_YEAR","YEAR"],"description":"Kỳ thanh toán tiền thuê. MONTH: hàng tháng; QUARTER: hàng quý; HALF_YEAR: 6 tháng một lần; YEAR: hàng năm"},{"type":"null"}]},"availability":{"type":"string","enum":["PENDING_SIGNATURE","OCCUPIED","ENDING_SOON","VACANT"],"description":"Tình trạng cho thuê. PENDING_SIGNATURE: Chờ ký; OCCUPIED: Đã cho thuê; ENDING_SOON: Sắp trống; VACANT: Còn trống"},"termEndsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Ngày cuối cùng hợp đồng đang ràng buộc còn giữ tài sản (ISO 8601), nếu có: ngày hết hạn hợp đồng, hoặc ngày bàn giao khi hợp đồng đã chấm dứt."},"description":{"description":"Mô tả của phòng do chủ nhà soạn, hoặc null khi không có.","type":["string","null"]}},"required":["id","name","area","rentPrice","billingCycle","availability","termEndsAt","description"],"additionalProperties":false},"description":"Các phòng đang chào thuê; rỗng khi cho thuê nguyên căn."},"furniture":{"type":"array","items":{"type":"string"},"description":"Nội thất và thiết bị đi kèm."},"furnishingStatus":{"anyOf":[{"type":"string","enum":["FULLY_FURNISHED","SEMI_FURNISHED","UNFURNISHED"]},{"type":"null"}],"description":"Mức nội thất. FULLY_FURNISHED: Nội thất đầy đủ; SEMI_FURNISHED: Nội thất cơ bản; UNFURNISHED: Không có nội thất"},"maxOccupants":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Số người ở tối đa."},"petsAllowed":{"description":"Có cho nuôi thú cưng không.","type":["boolean","null"]},"parkingSlots":{"description":"Chỗ đậu xe.","type":["string","null"]}},"required":["id","name","assetType","address","ward","province","areaFrom","areaTo","bedrooms","bathrooms","rentFrom","rentTo","billingCycle","listedUnitCount","availability","termEndsAt","description","imageUrls","contacts","units","furniture","furnishingStatus","maxOccupants","petsAllowed","parkingSlots"],"additionalProperties":false}}}}}}}}}