# Hydrate Properties
> Source: /api-reference/members/properties/search-hydrate
> Bulk enrichment of property data by property IDs
> Endpoint: POST /members/properties/search/hydrate

## Overview [#overview]

Enriches multiple properties with detailed information in a single request. This endpoint is optimized for hydrating property cards with full details including pricing, availability, amenities, and media.

Use this endpoint when you have property IDs from search results and need complete property details for display.

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Request Body [#request-body]

<ParamField body="propertyIds" type="array" required>
  Array of property IDs to hydrate (maximum 50 properties per request)
</ParamField>

<ParamField body="dates" type="object">
  Check-in and check-out dates for pricing and availability
  
  <Expandable title="properties">
    <ParamField body="checkIn" type="string">
      Check-in date (YYYY-MM-DD)
    </ParamField>
    
    <ParamField body="checkOut" type="string">
      Check-out date (YYYY-MM-DD)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="includeAvailability" type="boolean">
  Whether to include real-time availability data (default: false)
</ParamField>

<ParamField body="includeReviews" type="boolean">
  Whether to include review summaries (default: false)
</ParamField>

<ParamField body="includeMedia" type="boolean">
  Whether to include full media galleries (default: false)
</ParamField>

## Response [#response]

Returns enriched property data for the requested properties.

<ResponseField name="properties" type="array" required>
  Array of hydrated property objects
  
  <Expandable title="property items">
    <ResponseField name="id" type="number" required>
      Property identifier
    </ResponseField>
    
    <ResponseField name="documentId" type="string" required>
      Property document identifier
    </ResponseField>
    
    <ResponseField name="name" type="string" required>
      Property name
    </ResponseField>
    
    <ResponseField name="description" type="string">
      Full property description
    </ResponseField>
    
    <ResponseField name="brandName" type="string">
      Brand or chain name
    </ResponseField>
    
    <ResponseField name="type" type="string" required>
      Property type
    </ResponseField>
    
    <ResponseField name="nightlyCost" type="number" required>
      Cost per night in points
    </ResponseField>
    
    <ResponseField name="guestRating" type="number">
      Average guest rating (1-5 stars)
    </ResponseField>
    
    <ResponseField name="maxGuests" type="number" required>
      Maximum guest capacity
    </ResponseField>
    
    <ResponseField name="address" type="object" required>
      Property location details
      
      <Expandable title="address">
        <ResponseField name="street" type="string">
          Street address
        </ResponseField>
        
        <ResponseField name="city" type="string" required>
          City name
        </ResponseField>
        
        <ResponseField name="state" type="string">
          State or region
        </ResponseField>
        
        <ResponseField name="country" type="string" required>
          Country name
        </ResponseField>
        
        <ResponseField name="postalCode" type="string">
          Postal/ZIP code
        </ResponseField>
        
        <ResponseField name="latitude" type="number" required>
          Latitude coordinate
        </ResponseField>
        
        <ResponseField name="longitude" type="number" required>
          Longitude coordinate
        </ResponseField>
      </Expandable>
    </ResponseField>
    
    <ResponseField name="amenities" type="array">
      Detailed amenity information
      
      <Expandable title="amenity items">
        <ResponseField name="id" type="string" required>
          Amenity identifier
        </ResponseField>
        
        <ResponseField name="name" type="string" required>
          Amenity name
        </ResponseField>
        
        <ResponseField name="category" type="string">
          Amenity category
        </ResponseField>
        
        <ResponseField name="icon" type="string">
          Amenity icon URL
        </ResponseField>
      </Expandable>
    </ResponseField>
    
    <ResponseField name="media" type="object">
      Property images and media (when includeMedia=true)
      
      <Expandable title="media">
        <ResponseField name="hero" type="object">
          Hero/primary image
          
          <Expandable title="hero image">
            <ResponseField name="url" type="string" required>
              Image URL
            </ResponseField>
            
            <ResponseField name="alt" type="string">
              Alt text
            </ResponseField>
          </Expandable>
        </ResponseField>
        
        <ResponseField name="gallery" type="array">
          Additional property images
          
          <Expandable title="gallery images">
            <ResponseField name="url" type="string" required>
              Image URL
            </ResponseField>
            
            <ResponseField name="alt" type="string">
              Alt text
            </ResponseField>
            
            <ResponseField name="category" type="string">
              Image category (room, exterior, amenity, etc.)
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
    
    <ResponseField name="availability" type="object">
      Real-time availability data (when includeAvailability=true)
      
      <Expandable title="availability">
        <ResponseField name="available" type="boolean" required>
          Whether property is available for requested dates
        </ResponseField>
        
        <ResponseField name="roomsAvailable" type="number">
          Number of rooms available
        </ResponseField>
        
        <ResponseField name="restrictions" type="array">
          Any booking restrictions
        </ResponseField>
      </Expandable>
    </ResponseField>
    
    <ResponseField name="reviews" type="object">
      Review summary data (when includeReviews=true)
      
      <Expandable title="reviews">
        <ResponseField name="rating" type="number" required>
          Average rating (1-5 stars)
        </ResponseField>
        
        <ResponseField name="count" type="number" required>
          Total number of reviews
        </ResponseField>
        
        <ResponseField name="breakdown" type="object">
          Rating breakdown by category
          
          <Expandable title="breakdown">
            <ResponseField name="cleanliness" type="number">
              Cleanliness rating
            </ResponseField>
            
            <ResponseField name="service" type="number">
              Service rating
            </ResponseField>
            
            <ResponseField name="location" type="number">
              Location rating
            </ResponseField>
            
            <ResponseField name="value" type="number">
              Value rating
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="notFound" type="array">
  Array of property IDs that could not be found
</ResponseField>

## Example [#example]

```typescript
const response = await fetch('https://api.journey.com/members/properties/search/hydrate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${clerkToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    propertyIds: [123, 456, 789],
    dates: {
      checkIn: '2024-06-15',
      checkOut: '2024-06-17'
    },
    includeAvailability: true,
    includeReviews: true,
    includeMedia: false
  })
});
```

<RequestExample>

```bash cURL
curl -X POST "https://api.journey.com/members/properties/search/hydrate" \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "propertyIds": [123, 456, 789],
    "dates": {
      "checkIn": "2024-06-15",
      "checkOut": "2024-06-17"
    },
    "includeAvailability": true,
    "includeReviews": true,
    "includeMedia": false
  }'
```

</RequestExample>

<ResponseExample>

```json 200 Response
{
  "properties": [
    {
      "id": 123,
      "documentId": "prop_manhattan_boutique",
      "name": "Manhattan Boutique Hotel",
      "description": "A sophisticated boutique hotel in the heart of Manhattan...",
      "brandName": "Journey Urban Collection",
      "type": "Hotel",
      "nightlyCost": 45000,
      "guestRating": 4.6,
      "maxGuests": 4,
      "address": {
        "street": "123 Fifth Avenue",
        "city": "New York",
        "state": "NY",
        "country": "United States",
        "postalCode": "10001",
        "latitude": 40.7128,
        "longitude": -74.0060
      },
      "amenities": [
        {
          "id": "wifi",
          "name": "Free WiFi",
          "category": "Technology",
          "icon": "https://cdn.journey.com/icons/wifi.svg"
        },
        {
          "id": "pool",
          "name": "Rooftop Pool",
          "category": "Recreation",
          "icon": "https://cdn.journey.com/icons/pool.svg"
        }
      ],
      "availability": {
        "available": true,
        "roomsAvailable": 3,
        "restrictions": []
      },
      "reviews": {
        "rating": 4.6,
        "count": 1247,
        "breakdown": {
          "cleanliness": 4.8,
          "service": 4.5,
          "location": 4.9,
          "value": 4.2
        }
      }
    }
  ],
  "notFound": []
}
```

</ResponseExample>

## Usage Notes [#usage-notes]

### Performance Considerations [#performance-considerations]

- **Batch size**: Maximum 50 properties per request
- **Response time**: Varies based on included data (availability checks add ~200ms)
- **Caching**: Property data is cached for 5 minutes, availability for 30 seconds

### Best Practices [#best-practices]

1. **Request only needed data** - Use include flags to control response size
2. **Handle not found properties** - Check the `notFound` array for missing properties
3. **Cache results** - Cache hydrated data to reduce API calls
4. **Parallel requests** - For >50 properties, make parallel requests

## Related Endpoints [#related-endpoints]

- [Search Properties](/api-reference/members/properties/search) - Get property IDs for hydration
