### Run Example Script Source: https://github.com/wellnessliving/wl-sdk/blob/master/README.md Executes the example SDK script. This involves configuring application credentials and staff login details in separate PHP files before running the script via the command line. ```php composer.json); composer config repositories.wellnessliving/wl-sdk git https://github.com/wellnessliving/wl-sdk && composer require 'wellnessliving/wl-sdk:>=1.0.0' && composer install ``` -------------------------------- ### Batching API Requests with WlModelMultiModel Source: https://github.com/wellnessliving/wl-sdk/blob/master/WellnessLiving/doc/multi-model.md This example shows how to initialize multiple model instances, add them to a WlModelMultiModel container, and execute them in a single batch request. It includes the necessary steps for user authentication using NotepadModel and EnterModel to maintain session cookies. ```php namespace WlSdkExample; use WellnessLiving\Core\Passport\Login\Enter\EnterModel; use WellnessLiving\Core\Passport\Login\Enter\NotepadModel; use WellnessLiving\Wl\Catalog\CatalogList\ElementModel; use WellnessLiving\WlAssertException; use WellnessLiving\WlModelMultiModel; use WellnessLiving\WlUserException; require_once __DIR__.'/WellnessLiving/wl-autoloader.php'; require_once __DIR__.'/example-config.php'; try { $o_config=new ExampleConfig(); $o_notepad=new NotepadModel($o_config); $o_notepad->s_login='//* Put your login here */'; $o_notepad->get(); $o_enter=new EnterModel($o_config); $o_enter->cookieSet($o_notepad->cookieGet()); $o_enter->s_login='//* Put your login here */'; $o_enter->s_notepad=$o_notepad->s_notepad; $o_enter->s_password=$o_notepad->hash('//* Put your password here */'); $o_enter->post(); $model_1=new ElementModel( $o_config); $model_1->cookieSet($o_notepad->cookieGet()); $model_1->k_id='//* Put your product id here */'; $model_1->k_location='//* Put your location key here */'; $model_1->id_sale='//* Put your sale id here */'; $model_2=new ElementModel( $o_config); $model_2->cookieSet($o_notepad->cookieGet()); $model_2->k_id='//* Put your product id here */'; $model_2->k_location='//* Put your location key here */'; $model_2->id_sale='//* Put your sale id here*/'; $o_multi_model=new WlModelMultiModel($o_config); $o_multi_model->add($model_1); $o_multi_model->add($model_2); $o_multi_model->getMulti(); print_r($model_1->a_data); print_r($model_2->a_data); } catch(WlAssertException $e) { echo $e; return; } catch(WlUserException $e) { echo $e->getMessage()."\n"; return; } ``` -------------------------------- ### Get Available Services (Appointments) using PHP Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Lists all bookable appointment services for a specific location, including pricing, duration, and availability. Requires location key, service category, and configuration. Outputs service details or an error message. ```php cookieSet($o_cookie); $o_services->k_location = '67890'; // Location key $o_services->k_service_category = '0'; // 0 for all categories $o_services->is_backend = false; // Client-facing view try { $o_services->get(); foreach ($o_services->a_service as $k_service => $a_service) { echo "Service: " . $a_service['s_service'] . "\n"; echo " Duration: " . $a_service['s_duration'] . "\n"; echo " Online Price: $" . $a_service['f_online'] . "\n"; echo " Can Book Online: " . ($a_service['is_bookable'] ? 'Yes' : 'No') . "\n"; echo " Requires Deposit: $" . $a_service['f_deposit'] . "\n"; echo " Service Key: " . $k_service . "\n"; if (!empty($a_service['a_image']) && !$a_service['a_image']['is_empty']) { echo " Image URL: " . $a_service['a_image']['s_url'] . "\n"; } echo "\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Get Staff Members List using PHP Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Fetches all staff members for a business, including their services, positions, and profile information. Requires a business key and configuration. Outputs staff details or an error message. ```php cookieSet($o_cookie); $o_staff_list->k_business = '12345'; try { $o_staff_list->get(); foreach ($o_staff_list->a_staff as $k_staff => $a_staff) { echo "Staff: " . $a_staff['text_name_full'] . "\n"; echo " Position: " . $a_staff['s_position'] . "\n"; echo " Staff Key: " . $k_staff . "\n"; echo " Provides Appointments: " . ($a_staff['is_appointment'] ? 'Yes' : 'No') . "\n"; echo " Provides Classes: " . ($a_staff['is_class'] ? 'Yes' : 'No') . "\n"; echo " Photo URL: " . ($a_staff['url_image'] ?: 'No photo') . "\n\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### GET /services Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Lists all bookable appointment services for a location with pricing, duration, and availability information. ```APIDOC ## GET /services ### Description Lists all bookable appointment services for a location with pricing, duration, and availability information. ### Method GET ### Endpoint /services ### Parameters #### Query Parameters - **k_location** (string) - Required - The unique key of the location. - **k_service_category** (string) - Optional - Category filter, use '0' for all. ### Response #### Success Response (200) - **a_service** (array) - List of services including s_service, s_duration, f_online, and is_bookable. ``` -------------------------------- ### GET /schedule Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Retrieves a list of class sessions within a date range for scheduling and booking purposes. ```APIDOC ## GET /schedule ### Description Retrieves a list of class sessions within a date range for scheduling and booking purposes. ### Method GET ### Endpoint /schedule ### Parameters #### Query Parameters - **k_business** (string) - Required - The unique key of the business. - **dt_date** (string) - Required - Start date in UTC MySQL format. - **dt_end** (string) - Required - End date in UTC MySQL format. ### Response #### Success Response (200) - **a_session** (array) - List of class sessions. - **a_calendar** (array) - Calendar view of available dates. ``` -------------------------------- ### Get Business Locations using PHP Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Retrieves all locations for a business, including address, timezone, coordinates, and logo. Requires a business key and configuration. Outputs location details or an error message. ```php cookieSet($o_cookie); $o_location_list->k_business = '12345'; // Your business key try { $o_location_list->get(); foreach ($o_location_list->a_location as $k_location => $a_location) { echo "Location: " . $a_location['s_title'] . "\n"; echo " Address: " . $a_location['text_address'] . "\n"; echo " Timezone: " . $a_location['a_timezone']['text_name'] . "\n"; echo " Latitude: " . $a_location['f_latitude'] . "\n"; echo " Longitude: " . $a_location['f_longitude'] . "\n"; echo " Location Key: " . $k_location . "\n\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Get Class Schedule using PHP Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Retrieves a list of class sessions within a specified date range for scheduling and booking. Requires business key, date range, and configuration. Outputs session details, calendar availability, or an error message. ```php cookieSet($o_cookie); $o_schedule->k_business = '12345'; $o_schedule->dt_date = '2024-01-15 00:00:00'; // Start date in UTC MySQL format $o_schedule->dt_end = '2024-01-21 23:59:59'; // End date in UTC MySQL format $o_schedule->is_tab_all = true; // Include all class tabs $o_schedule->show_event = true; // Include events try { $o_schedule->get(); foreach ($o_schedule->a_session as $a_session) { echo "Class: " . $a_session['s_title'] . "\n"; echo " Date/Time (UTC): " . $a_session['dt_date'] . "\n"; echo " Local Time: " . $a_session['dtl_date'] . "\n"; echo " Duration: " . $a_session['i_duration'] . " minutes\n"; echo " Is Virtual: " . ($a_session['is_virtual'] ? 'Yes' : 'No') . "\n"; echo " Booking URL: " . $a_session['url_book'] . "\n"; echo " Class Key: " . $a_session['k_class'] . "\n"; echo " Period Key: " . $a_session['k_class_period'] . "\n\n"; } // Calendar view of available dates echo "Days with classes:\n"; foreach ($o_schedule->a_calendar as $s_date => $a_info) { echo " - " . $s_date . "\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### GET /staff Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Returns all staff members working for a business, including their services, positions, and profile information. ```APIDOC ## GET /staff ### Description Returns all staff members working for a business, including their services, positions, and profile information. ### Method GET ### Endpoint /staff ### Parameters #### Query Parameters - **k_business** (string) - Required - The unique key of the business. ### Response #### Success Response (200) - **a_staff** (array) - List of staff objects containing text_name_full, s_position, is_appointment, is_class, and url_image. ``` -------------------------------- ### Get or Create Client Profile (PHP) Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Retrieves profile fields for an existing user or creates a new client profile with custom field support. It handles user data retrieval and creation, including custom fields and password management. Dependencies include the WellnessLiving SDK and configuration objects. ```php cookieSet($o_cookie); $o_profile->k_business = '12345'; $o_profile->uid = '11111'; // User key, or '' for new user form try { $o_profile->get(); foreach ($o_profile->a_structure as $k_field => $a_field) { echo "Field: " . $a_field['s_title'] . "\n"; echo " Required: " . ($a_field['is_require'] ? 'Yes' : 'No') . "\n"; echo " Value: " . print_r($a_field['x_value'], true) . "\n"; echo " Field Key: " . $k_field . "\n\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } // POST: Create a new client $o_new_profile = new EditModel($o_config); $o_new_profile->cookieSet($o_cookie); $o_new_profile->k_business = '12345'; $o_new_profile->uid = ''; // Empty for new user // Field values keyed by k_field from the GET response $o_new_profile->a_new = [ 'k_field_email' => ['s_mail' => 'newuser@example.com', 'is_inherit' => false], 'k_field_firstname' => 'Jane', 'k_field_lastname' => 'Smith', 'k_field_phone' => '555-987-6543', 'k_field_birthday' => '1990-05-15', 'k_field_address' => [ 's_address' => '123 Main Street', 's_city' => 'New York', 'k_city' => '12345', 's_postal' => '10001', ], ]; $o_new_profile->text_password = 'SecurePassword123!'; $o_new_profile->is_sing_in = true; // Auto sign-in after creation try { $o_new_profile->post(); echo "New client created with UID: " . $o_new_profile->uid . "\n"; } catch (WellnessLiving\WlUserException $e) { if ($o_new_profile->a_error_list) { foreach ($o_new_profile->a_error_list as $a_error) { echo "Validation Error: " . print_r($a_error, true) . "\n"; } } echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### GET /locations Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Retrieves all locations belonging to a business, including address, timezone, coordinates, and logo information. ```APIDOC ## GET /locations ### Description Retrieves all locations belonging to a business, including address, timezone, coordinates, and logo information. ### Method GET ### Endpoint /locations ### Parameters #### Query Parameters - **k_business** (string) - Required - The unique key of the business. ### Response #### Success Response (200) - **a_location** (array) - List of location objects containing s_title, text_address, a_timezone, f_latitude, and f_longitude. ``` -------------------------------- ### Switch to Production Environment Source: https://github.com/wellnessliving/wl-sdk/blob/master/README.md Configures the SDK to use the production environment. By default, the SDK uses the staging environment via `WlConfigDeveloper`. This snippet shows how to switch to production by inheriting `WlConfigProduction`. ```php cookieSet($o_cookie); $o_business->text_title = 'Sunrise Fitness Studio'; $o_business->text_phone = '+1-555-FITGYM'; $o_business->k_business_type = '1'; $o_business->id_locale = LocaleSid::US; $o_business->k_office_city = '12345'; $o_business->text_office_address = '456 Wellness Blvd'; $o_business->text_office_postal = '90210'; $o_business->is_location_create = true; $o_business->a_staff_member = [ 'text_mail' => 'owner@sunrisefitness.com', 'text_name_first' => 'Sarah', 'text_name_last' => 'Johnson', 'is_enter' => true, ]; try { $o_business->post(); echo "Business created successfully!\n"; echo "Business Key: " . $o_business->k_business . "\n"; } catch (WellnessLiving\WlUserException $e) { echo "Error creating business: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Configure WellnessLiving SDK Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Sets up the configuration for the WellnessLiving SDK, including application credentials and environment settings. Developers must extend either WlConfigDeveloper or WlConfigProduction based on their deployment environment. Supports multiple data center regions. ```php get(); } catch (WlAssertException $e) { echo "SDK Configuration Error: " . $e->getMessage() . "\n"; } catch (WlUserException $e) { echo "API Error: " . $e->getMessage() . "\n"; echo "Error Code: " . $e->getCode() . "\n"; $o_request = $o_model->lastRequest(); if ($o_request) { echo "Request URL: " . $o_request->url . "\n"; echo "HTTP Protocol:\n" . $o_request->httpProtocol() . "\n"; } } ``` -------------------------------- ### Book an Appointment using WellnessLiving SDK Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Completes the booking process for a service appointment. It supports both existing users via a user key and new client registration by providing contact details. ```php cookieSet($o_cookie); $o_booking->k_business = '12345'; $o_booking->k_location = '67890'; $o_booking->uid = '11111'; // Existing user key, or '0' for new user // Booking details $o_booking->a_book_data = [ 'dt_date' => '2024-01-20 14:00:00', // Appointment time in location timezone 'k_service' => '55555', // Service to book 'k_staff' => '22222', // Staff member conducting appointment 'id_class_tab' => 1, // Booking tab type ]; // For new clients (when uid is '0'), provide user details $o_booking->a_user = [ 'text_mail' => 'newclient@example.com', 'text_name_first' => 'John', 'text_name_last' => 'Doe', 'text_phone' => '+1-555-123-4567', 'a_note' => ['VIP customer', 'Referred by existing member'], ]; // Optional: Recurring appointment setup $o_booking->a_book_data['a_repeat'] = [ 'i_period' => 1, // Repeat frequency 'id_period' => 7, // 7 = weekly (ADurationSid::WEEK) 'a_week' => [1, 3, 5], // Monday, Wednesday, Friday 'i_occurrence' => 10, // Stop after 10 occurrences ]; $o_booking->id_mode = ModeSid::WEB_CLIENT; try { $o_booking->post(); echo "Booking successful!\n"; foreach ($o_booking->a_appointment as $a_appointment) { echo "Appointment Key: " . $a_appointment['k_appointment'] . "\n"; } echo "Visit Keys: " . implode(', ', $o_booking->a_visit) . "\n"; } catch (WellnessLiving\WlUserException $e) { echo "Booking failed: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Include SDK Autoloader Source: https://github.com/wellnessliving/wl-sdk/blob/master/README.md Includes the WellnessLiving SDK autoloader in your project. This allows the SDK classes to be automatically loaded when needed, simplifying integration. ```php require_once __DIR__.'/WellnessLiving/wl-autoloader.php'; ``` -------------------------------- ### Capture and Debug API Exceptions Source: https://github.com/wellnessliving/wl-sdk/blob/master/WellnessLiving/doc/problems.txt Demonstrates how to catch WlUserException during API requests to retrieve detailed debug information. This is essential for reporting network-related errors to WellnessLiving support. ```php try { // API request logic here } catch(WlUserException $e) { echo $e->getMessage(); } ``` -------------------------------- ### Authenticate User with WellnessLiving SDK Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Handles the user authentication process using a cryptographic notepad mechanism. This involves fetching a notepad, hashing the password client-side with SHA3-512, and then submitting the login request. It includes error handling for login failures and CAPTCHA requirements. ```php s_login = 'user@example.com'; $o_notepad->get(); // Step 2: Hash the password using the notepad $s_password_hash = $o_notepad->hash('user-plain-text-password'); // Step 3: Perform the login $o_enter = new EnterModel($o_config); $o_enter->cookieSet($o_notepad->cookieGet()); // Transfer session cookies $o_enter->s_login = 'user@example.com'; $o_enter->s_notepad = $o_notepad->s_notepad; $o_enter->s_password = $s_password_hash; $o_enter->s_remember = ''; // '' = don't remember, 'login' = remember login, 'password' = remember both try { $o_enter->post(); echo "Login successful!\n"; // Save cookies for subsequent requests $o_cookie = $o_enter->cookieGet(); } catch (WellnessLiving\WlUserException $e) { if ($o_enter->url_captcha) { echo "Captcha required. Image URL: " . $o_enter->url_captcha . "\n"; } else { echo "Login failed: " . $e->getMessage() . "\n"; } } ``` -------------------------------- ### Retrieve Classes and Events for a Location Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Fetches a comprehensive list of classes and events available at a specific location. Allows for optional image dimension configuration for the returned class data. ```php cookieSet($o_cookie); $o_classes->k_location = '67890'; $o_classes->i_image_width = 300; // Request images at specific size $o_classes->i_image_height = 200; try { $o_classes->get(); foreach ($o_classes->a_class as $a_class) { echo "Class: " . $a_class['text_title'] . "\n"; echo " Description: " . $a_class['text_description'] . "\n"; echo " Is Event: " . ($a_class['is_event'] ? 'Yes' : 'No') . "\n"; echo " Is Active: " . ($a_class['is_active'] ? 'Yes' : 'No') . "\n"; echo " Class Key: " . $a_class['k_class'] . "\n"; if (!empty($a_class['m_price_total'])) { echo " Total Price: $" . $a_class['m_price_total'] . "\n"; } echo "\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Client Profile Management Source: https://context7.com/wellnessliving/wl-sdk/llms.txt This API allows for retrieving profile fields for an existing user or creating a new client profile with support for custom fields. ```APIDOC ## GET /api/client/profile ### Description Retrieves profile fields for an existing user. ### Method GET ### Endpoint /api/client/profile ### Parameters #### Query Parameters - **k_business** (string) - Required - The business key. - **uid** (string) - Required - The user key. Use an empty string for a new user form. ### Request Example ```php cookieSet($o_cookie); $o_profile->k_business = '12345'; $o_profile->uid = '11111'; $o_profile->get(); ?> ``` ### Response #### Success Response (200) - **a_structure** (array) - An array of profile fields with their properties and current values. #### Response Example ```json { "a_structure": { "k_field_email": { "s_title": "Email", "is_require": true, "x_value": "existing@example.com", "k_field": "k_field_email" }, "k_field_firstname": { "s_title": "First Name", "is_require": true, "x_value": "John", "k_field": "k_field_firstname" } } } ``` ## POST /api/client/profile ### Description Creates a new client profile with custom field support. ### Method POST ### Endpoint /api/client/profile ### Parameters #### Query Parameters - **k_business** (string) - Required - The business key. - **uid** (string) - Required - Should be an empty string to indicate a new user. #### Request Body - **a_new** (object) - Required - An object containing the new client's field values, keyed by field key. - **text_password** (string) - Optional - The password for the new client. - **is_sing_in** (boolean) - Optional - Whether to auto-sign-in the user after creation. ### Request Example ```php cookieSet($o_cookie); $o_new_profile->k_business = '12345'; $o_new_profile->uid = ''; // Empty for new user $o_new_profile->a_new = [ 'k_field_email' => ['s_mail' => 'newuser@example.com', 'is_inherit' => false], 'k_field_firstname' => 'Jane', 'k_field_lastname' => 'Smith', 'k_field_phone' => '555-987-6543', 'k_field_birthday' => '1990-05-15', 'k_field_address' => [ 's_address' => '123 Main Street', 's_city' => 'New York', 'k_city' => '12345', 's_postal' => '10001', ], ]; $o_new_profile->text_password = 'SecurePassword123!'; $o_new_profile->is_sing_in = true; $o_new_profile->post(); ?> ``` ### Response #### Success Response (200) - **uid** (string) - The unique identifier of the newly created client. #### Response Example ```json { "uid": "new_user_id_123" } ``` ``` -------------------------------- ### Shopping Cart Operations (PHP) Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Manages the catalog shopping cart, including adding items, applying discounts, calculating taxes, and handling reward points. It allows for retrieval of cart details and proposed rewards. Dependencies include the WellnessLiving SDK and configuration objects. ```php cookieSet($o_cookie); $o_cart->k_location = '67890'; $o_cart->uid = '11111'; $o_cart->text_discount_code = 'SUMMER20'; // Optional discount code // Define cart items $o_cart->a_item = [ [ 'id_sale' => WlSaleSid::PURCHASE_ITEM, // Sale item type 'k_id' => '99999', // Product/service key 'i_quantity' => 2, // Quantity 'k_shop_product_option' => '', // Product option if applicable ], [ 'id_sale' => WlSaleSid::APPOINTMENT, 'k_id' => '88888', 'i_quantity' => 1, 'k_shop_product_option' => '', ], ]; try { $o_cart->get(); echo "Cart Summary:\n"; echo " Subtotal: $" . $o_cart->m_subtotal . "\n"; echo " Discount: $" . $o_cart->m_discount_total . "\n"; echo " Tax: $" . $o_cart->m_tax . "\n"; echo " Total: $" . $o_cart->m_total . "\n"; echo " Reward Points: " . $o_cart->i_score . "\n"; // Available rewards that can be applied if (!empty($o_cart->a_reward_propose)) { echo "\nAvailable Rewards:\n"; foreach ($o_cart->a_reward_propose as $a_reward) { echo " - " . $a_reward['text_discount'] . " " . $a_reward['text_title'] . "\n"; } } // Tax breakdown echo "\nTax Breakdown:\n"; foreach ($o_cart->a_tax_list as $k_tax => $m_amount) { echo " Tax $k_tax: $" . $m_amount . "\n"; } } catch (WellnessLiving\WlUserException $e) { echo "Error: " . $e->getMessage() . "\n"; } ``` -------------------------------- ### Shopping Cart Operations Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Manages the catalog shopping cart, including adding items, applying discounts, calculating taxes, and managing reward points. ```APIDOC ## GET /api/cart ### Description Retrieves the current state of the shopping cart, including items, totals, discounts, taxes, and available rewards. ### Method GET ### Endpoint /api/cart ### Parameters #### Query Parameters - **k_location** (string) - Required - The key of the location for the cart. - **uid** (string) - Required - The user key. - **text_discount_code** (string) - Optional - A discount code to apply to the cart. ### Request Example ```php cookieSet($o_cookie); $o_cart->k_location = '67890'; $o_cart->uid = '11111'; $o_cart->text_discount_code = 'SUMMER20'; $o_cart->a_item = [ [ 'id_sale' => WlSaleSid::PURCHASE_ITEM, 'k_id' => '99999', 'i_quantity' => 2, 'k_shop_product_option' => '', ], [ 'id_sale' => WlSaleSid::APPOINTMENT, 'k_id' => '88888', 'i_quantity' => 1, 'k_shop_product_option' => '', ], ]; $o_cart->get(); ?> ``` ### Response #### Success Response (200) - **m_subtotal** (float) - The subtotal of the cart before discounts and taxes. - **m_discount_total** (float) - The total discount applied to the cart. - **m_tax** (float) - The total tax amount for the cart. - **m_total** (float) - The final total amount of the cart. - **i_score** (integer) - The number of reward points associated with the cart. - **a_reward_propose** (array) - An array of available rewards that can be applied. - **a_tax_list** (object) - An object detailing the tax breakdown by type. #### Response Example ```json { "m_subtotal": 150.00, "m_discount_total": 15.00, "m_tax": 10.50, "m_total": 145.50, "i_score": 50, "a_reward_propose": [ { "text_discount": "10%", "text_title": "Summer Sale" } ], "a_tax_list": { "VAT": 10.50 } } ``` ``` -------------------------------- ### Sign Out User from WellnessLiving SDK Source: https://context7.com/wellnessliving/wl-sdk/llms.txt Terminates the current user session and clears authentication cookies. This function requires the session cookies obtained from a successful login. ```php cookieSet($o_cookie); // From previous login try { $o_signout->post(); echo "User signed out successfully.\n"; } catch (WellnessLiving\WlUserException $e) { echo "Sign out failed: " . $e->getMessage() . "\n"; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.