Keeping Reservations Updated with Resly

To maintain constant synchronization with Resly's reservation data, it is important to utilize a combination of endpoints and webhooks. This guide explains the steps to ensure your integration stays in sync efficiently and accurately.

Step 1: Initial Data Retrieval

When your integration first connects to Resly, use the GET /reservations endpoint to retrieve all future reservations and store them in your system.

Endpoint Details:

  • Method: GET
  • Endpoint: /reservations
  • Purpose: Designed to retrieve all future reservations for initial setup and periodic data validation.

📘

This endpoint is optimized for first-time use and periodic validation only. Avoid calling it frequently, as excessive calls may impact performance and lead to rate limits.


Step 2: Setting Up the Webhook for Reservation Updates

To ensure your integration receives updates for all future reservation changes, set up a webhook subscription for reservations. The webhook will send you real-time updates whenever a reservation is created, updated, or canceled.

Webhook Setup Guidelines:

  • Purpose: Receive updates for all future reservation changes.
  • Field: Use the id field as the unique identifier for each reservation to prevent duplication.
  • Recommended Actions:
    • Listen for incoming updates.
    • Compare the id field with your stored data.
    • Update or store the reservation data based on the received event.

Webhook Payload Example:

{
  "reslyAccountId": "resly-hotel",
  "reslyWebhookType": "reservation",
  "hotelId": "resly-hotel",
  "portfolioId": "",
  "reservationId": "e4fVl48C0NEyLfesdgME",
  "currency": "AUD",
  "status": "confirmed",
  "reservationRef": "5350",
  "checkIn": "2024-11-12",
  "checkOut": "2024-11-13",
  "createdOn": "2024-11-10",
  "roomId": "TAYLOR-ST-13",
  "roomName": "13 Taylor Street",
  "roomTypeId": "TAYLOR-ST-13",
  "roomTypeName": "13 Taylor Street",
  "agentId": "airbnb",
  "agentName": "Airbnb",
  "agentReference": "Esse omnis ea provid",
  "ratePlanId": "3N-TAYLOR-ST-13",
  "ratePlanName": "3 Nights Min",
  "bookingDate": "2024-11-10",
  "comments": "Perferendis facere e",
  "firstName": "Indigo",
  "lastName": "Hutchinson",
  "adults": 1,
  "children": 0,
  "email": "[email protected]",
  "mobile": "043597840",
  "phone": "045512010",
  "company": "Knapp Kirkland Associates",
  "address": "Corporis voluptas si",
  "city": "Vero numquam dolorem",
  "state": "Saepe labore velit ",
  "country": "Fugiat et adipisicin",
  "postCode": "5521",
  "isCheckedIn": false,
  "isCheckedOut": false,
  "arrivalTime": "3:00PM - 4:00PM",
  "departureTime": "8:00AM - 9:00AM",
  "doNotEmail": false,
  "depositAmount": 499.5,
  "depositDueDate": "2024-11-11",
  "balanceDueDate": "2024-10-13",
  "accommodationTotal": 999,
  "otherTotal": 0,
  "grandTotal": 999,
  "balance": -999,
  "timestampCancelled": null,
  "timestampLastModified": "2024-11-10T06:22:53+00:00",
  "roomTypeAddress": "656 Rocky Old Avenue",
  "roomTypeCity": "fdsf",
  "roomTypeState": "QLD",
  "roomTypeCountry": "AU",
  "roomTypePostCode": "3225",
  "userCreated": "Rico C",
  "pinNumber": "",
  "pinStatus": ""
}

Key Points:

  • Use the id field to identify the reservation.
  • Validate incoming data to ensure consistency.

Best Practices for Synchronization

  1. Efficient Data Retrieval:

    • Use the GET /reservations endpoint sparingly, such as during initial integration or periodic audits to validate data consistency.
  2. Leverage Webhooks:

    • Depend primarily on the webhook for real-time updates to stay synchronized without overloading the system.
  3. Handle Duplications:

    • Always check the id field to avoid creating duplicate records.
  4. Error Handling:

    • Implement retry logic for webhook failures or data discrepancies.
  5. Scalability:

    • Design your integration to handle high-frequency updates from the webhook efficiently.

By following these steps and best practices, your integration with Resly will maintain an up-to-date, reliable synchronization of reservation data.