[#1115] How to set flags (newsletter, ToS, cancellation) during booking (JSONRpc)?

Migrated from Redmine #1115 | Author: Thomas Luzat
Status: Feedback | Priority: High, I’m very impatient | Created: 2023-10-05


I create bookings using the JSONRpc API: API documentation | SimplyBook.me Online Scheduling

In the SimplyBook interface, when booking, there are three checkboxes:

  • Marketing/newsletter (promotion_letters_flag)
  • Terms of service (simplybook_terms_flag)
  • Cancellation terms (cancellation_terms_flag)

How do I submit these using the JSONRpc API? Do I add those to the additional parameters object?

@param array|Object $additional additional params and fields.

Like:

…, {
“promotion_letters_flag”: 1, /* or true? */
“simplybook_terms_flag”: 1,
“cancellation_terms_flag”: 1,
“products”: [{“id”: 1, “qty”: 1}]

}

Or are those client data?

@param Object|array $clientData eg. {name: ‘Name’, email: ‘test@gmail.com’, phone: ‘+38099999999’}

{name: “Name”, email: ‘"est@gmail.com’, phone: ‘+38099999999’, promotion_letters_flags: 1, …}

Thank you!

Val Komarov wrote:

First flag is indeded part of client data, named “allow_notification”.
Second and third are just required to make a booking, so they are not stored

Thomas Luzat wrote:

Val Komarov wrote:

First flag is indeded part of client data, named “allow_notification”.
Second and third are just required to make a booking, so they are not stored

Thanks, allow_notification in client_data works.