Common Patterns
Hướng dẫn các pattern thường dùng khi tích hợp với External API.
Pagination
Tất cả list endpoints hỗ trợ pagination qua query params:
GET /api/v1/external/listings?page=1&limit=20
Response:
{
"items": [
{ "id": "uuid", "name": "Villa Đà Lạt" }
],
"total": 100,
"page": 1,
"limit": 20,
"total_pages": 5
}
Best Practice: Sử dụng cursor-based pagination nếu available để tránh skip items khi có changes trong khi paginate.
Filtering
Một số endpoints hỗ trợ filtering: