Skip to content

Widgets

Widgets are small pieces of your app that appear inside Camping.care, for example on the reservation or contact screen. They run sandboxed in an iframe and can communicate with the platform in two ways: through the API, or directly with the interface using postMessage events.

  • App URL: your app’s main page, opened from the App Store.
  • Reservation: a widget on the reservation popup or page.
  • Reservation tab: a full tab on the reservation popup or page, with more space.
  • Contact: a widget on the contact (guest) popup or page.
  • Contact tab: a full tab on the contact (guest) popup or page.
  • Dashboard: a widget on the user’s dashboard.
  • Online booking form: a widget inside the Booking Engine form.

Some widgets receive data that tells you which object the widget is loaded for. On a reservation this can be the reservation ID, and on a contact the contact ID, for example https://example.app/widgets/reservation?id=12345&authtoken=...... Each widget page lists its query parameters.

Your widget can also send information back to the interface, such as how tall the widget should be, or a command to refresh the object (for example a reservation or contact) after you’ve changed it through the API. Each widget page lists the events it supports, and the App URL page shows how to send them.