FitnessForce - UFP
Home
Home
  1. Home
  • Introduction
  • Quickstart
  • Webhooks
  • Campaign
    • Get campaign
      GET
    • List campaign
      GET
    • Get campaign by GUID
      GET
    • Get automation by franchise
      GET
    • Get automation by tenant
      GET
    • Get automation by company
      GET
    • Update automation active
      POST
    • Update automation inactive
      POST
    • Update campaign active
      POST
    • Update campaign inactive
      POST
  • Class
    • Get class by id
      GET
    • Delete class
      DELETE
    • Update class
      PUT
    • List classes
      GET
    • Create class
      POST
    • Substitute coach in class
      POST
    • Reschedule class
      POST
    • Cancel class
      POST
    • Mark class as completed
      POST
    • List class bookings by client id
      GET
  • Client
    • Retrieves all client for a Tenant
      GET
    • Creates a new client
      POST
    • Gets client by ID
      GET
    • Gets clients birthday list
      GET
    • Gets clients at risk
      GET
    • Gets client mandatory fields
      GET
    • Adds client to blacklist
      POST
    • Removes client from blacklist
      POST
    • Updates client details
      PUT
    • Used for partial updates of client details
      PATCH
    • Changes client representative
      POST
    • Lists prospects
      GET
    • Lists ex-clients
      GET
    • Resets client password
      POST
    • Changes client representative for multiple clients
      POST
    • Lists prospect effective date history
      GET
    • Transfers prospect
      POST
  • Company
    • Get company details
  • Invoice
    • Get invoice PDF
  • Organisation
    • List organisations
    • Get organisation
  • Search
    • Perform Client Search
    • Search clients by tenant
    • Search clients by provider
    • Search clients by company
  • Tax
    • Get Tax Groups
    • Get Tax Group by ID
    • Get Tax Groups by Tenant IDs
    • Get Tax Line Items
    • Get Tax Line Item by ID
    • List Tax Line Items
    • List Tax Line Types
  • Tenant
    • Get tenant details
    • List tenants
    • Gets list of tenants
    • Updates tenant details
    • Gets tenant details
    • Updates tenant invoice template type
    • Updates tenant payment template type
  • Appointments
    • Create new appointment
    • List appointments
    • Change client membership in appointment
    • Get appointment
    • Update appointment
    • Mark client as checked in
    • Mark client as no-show
    • Substitute coach for appointment
    • Reschedule appointment
    • Cancel appointment
    • List appointments by client ID
    • Create appointment complimentory session
    • Create appointment
    • Reschedule appointment
    • Get appointment
  • Appointment Types
    • Get appointment types list
    • Get appointment type details
  • Authentication
    • Refresh Token exchange
    • Generate authentication token
  • Automation
    • Get automation master
    • List automation types
  • Call Transactions
    • Get call transaction details
    • Log new call transaction
    • Update call transaction
    • Delete call transaction
  • Charge Categories
    • List charge categories
    • Get charge category
  • Charge Master
    • List charge masters
    • Get charge master
    • Calculate charge breakup
  • Recurring Class
    • Create recurring class
    • List recurring class template
    • Update recurring class
    • Get recurring class template
    • Cancel recurring class
    • Reschedule recurring class
    • Substitute coach in recurring class
    • List classes by recurring class template ID
  • Class Booking
    • Books client to class
    • Changes client membership
    • Removes client from class
    • Marks client as no-show
    • Marks client as checked in
    • Adds a trial client to class
  • Class Complimentory
    • Creates complimentary class
  • Class Types
    • List class types
    • Get class type details
  • Company level class types
    • List class types
  • Client Communication
    • Gets email log
    • Gets client interactions
    • Lists unified communication messages
  • Client Tasks
    • Gets client tasks
  • Client Sales
    • Gets client sales returns
    • Gets client payments
    • Lists client refunds
  • Client Waivers
    • Gets client waivers
  • Client Sessions
    • Gets client session inventory
  • Client Referrals
    • Lists client referrals
  • Client Offers
    • Lists eligible client coupons
  • Client Export
    • Exports prospects list
    • Exports ex-clients list
    • Exports active clients list
    • Exports clients at risk list
  • Client Billing
    • Creates charges for a client
    • Creates balance payment for invoice
  • Client Check-in
    • Creates client check-in
    • Lists client check-ins
    • Lists client check-ins by tenant
    • Lists clients who are currently in the club
    • Deletes a client check-in
  • Client Credit Balance
    • Creates a new credit balance order for a client
    • Retrieves the credit balance for a client
    • Retrieves the credit balance for a client
    • Lists client credit balance centerwise
  • Client Documents
    • Uploads client document
    • Gets client document
    • Lists client documents
    • Deletes client document
  • Client Invoices
    • Get invoice by UUID
    • Generate balance UUID for invoice
  • Client Membership
    • Change client membership start date
    • Patch client membership
    • Change client membership end date
    • Get client membership details
  • Client Open API
    • Create prospect
    • Book tour
  • Client Payments
    • Get payment timeline
    • List client payment methods
  • Client Subscriptions
    • List client subscription invoices
    • Get client subscription
    • List client subscriptions
    • Get clients by plan ID
    • Change subscription start date
    • Change subscription end date
    • Void client subscription
    • Send manage subscription link
    • Get client subscription by UUID
    • Get client subscription invoices by UUID
  • Client Memberships
    • Change session owner
    • Get session owners
    • List active client memberships
  • Client Subscription Cancellation
    • Cancel client subscription
    • Reactivate client subscription
  • Client Subscription Freeze
    • Create subscription freeze
    • List subscription freezes
    • Stop subscription freeze
    • Cancel subscription freeze
    • List client freezes
    • Get subscriptions available for freeze
    • Update subscription freeze
    • Get subscription freeze timeline
  • Client Trials
    • List client trials
    • Create client trial
    • Get client trial
    • Update trial
    • Delete client trial
    • Activate client trial
    • Mark trial as inactive
    • Mark trial as active
    • List client trials by tenant
    • Export client trials by tenant
  • Client Upgrade
    • Calculates subscription upgrade
    • Voids subscription upgrade
  • Balance Write Off
    • Creates a write off
    • Gets the list of write offs
    • Voids a write off
  • Email Template
    • Create email template
    • List email templates
    • Update email template
    • Get email template
    • Delete email template
    • Mark email template as inactive
    • Mark email template as active
  • Email Template - Franchise
    • Create email template at franchise level
    • Get list of email templates at franchise level
    • Update email template at franchise level
    • Get email template at franchise level
    • Delete email template at franchise level
    • Mark email template as inactive at franchise level
    • Mark email template as active at franchise level
  • Email Template - Tenant
    • Create email template at tenant level
    • List email templates at tenant level
    • Update email template at tenant level
    • Get email template at tenant level
    • Delete email template at tenant level
    • Mark email template as inactive at tenant level
    • Mark email template as active at tenant level
  • Franchise Groups
    • Get franchise group details
    • List all franchise groups
  • Payment Methods
    • Initiate payment method update by UUID
    • Initiate payment method update by ID
  • Invoices
    • Get invoice
    • List client invoices
    • Void invoice
    • Get invoice PDF
    • Send invoice PDF
    • List invoice details
    • Change invoice sales rep
    • Send invoice clear balance link
  • Offer Master
    • List offer master
    • Get offer master
    • List eligible coupon master
    • List offer master coupon code link
    • List offer master service plan product link
    • List offer master organisation link
  • Online Signup
    • Get subscription plans
    • Get mandatory client fields
    • Get subscription plan details
    • Create client and invoice
  • Subscription
    • Get eligible add-ons
  • Sales
    • Get sales return PDF
  • Staff Availability
    • List staff availability
    • List staff availability by appointment category
    • List next available slots by appointment category
    • Check staff availability
    • Check staff availability for appointment category
    • Check staff availability for recurring schedule
    • Check staff availability for recurring schedule
    • Get staff scheduled unavailability
    • List staff availability for tours
  • Opportunities
    • List opportunities
    • Create opportunity
    • Get opportunity
    • Update opportunity
    • Delete opportunity
    • Change opportunity stage
    • Mark opportunity as won
    • Mark opportunity as lost
    • Mark opportunity as nurture
    • Update opportunity sort order
  • Opportunity Stage Master
    • List opportunity stage masters
    • Get opportunity stage master
  • Payments
    • Get payment details
    • Mark payment as void
    • Get payment PDF
    • Send payment PDF
  • Refunds
    • List refunds
    • Send refund PDF
    • Get refund PDF
  • Reports
    • Reporting Quickstart
    • GET Report Data
  • Report Filter Schedules
    • Create report filter schedule
    • Delete report filter schedule
  • Access Requests
    • Request access via email
  • Rooms
    • List rooms
    • Get room details
  • Sales Returns
    • Get sales return PDF
  • Email Communication
    • Send free form email
  • SMS
    • Send free form SMS
  • Service Categories
    • List service categories
    • Get service category
    • Get service category collections
  • Staff Management
    • Get staff by ID
    • List all staff
    • List staff schedules
    • List staff appointment types
  • Staff Appointment Type Link
    • Gets staff appointment type links
  • Staff Notifications
    • Mark staff notifications as read
    • Mark staff notification as deleted
    • List staff notifications
  • Staff Schedule
    • Lists staff schedules
    • Gets staff schedule
  • Subscription Plans
    • List subscription plans
    • Get subscription plan by ID
    • Get eligible addons
  • Subscription Signup
    • Get Order Summary
    • Validate Referral
    • Get Order Summary Billing Occurrence
    • Get Order Status
    • Get Waivers
    • Get Payment Methods
    • List Empty Client Mandatory Fields
    • Sign Guest Waiver
    • Send Payment Link
    • Send Signup Completion Link
  • Tasks
    • Create task for client
    • Create task for opportunity
    • List tasks
    • Get task details
    • Complete SMS task
    • Bulk reassign tasks
  • Task Categories
    • List task categories
    • Get task category
  • Task Open API
    • Reschedule tour
    • Get tour details
  • Trial Master
    • List trials
    • Get trial
  1. Home

Webhooks

Webhooks are a powerful tool for integrating your applications with the Unified Fitness Platform (UFP). They allow you to receive real-time HTTP notifications about events that happen in your locations, such as a new lead being created, an invoice being paid, or a client being flagged as at-risk.
By subscribing to these events, you can automate workflows, sync data with external systems, trigger custom notifications, and much more.

Key Concepts: Global vs. Location Webhooks#

You can configure webhooks at two different levels, depending on your needs.

Global Webhook (Company Level)#

Receive event notifications from all locations under your brand through a single, centralized webhook.
Use Case: Ideal for centralized systems that need a complete overview of all brand activity, such as a company-wide analytics dashboard or a central data warehouse.

Tenant Webhook ( Specific Tenant)#

Receive event notifications only from this specific location, allowing for more granular control.
Use Case: Perfect for actions tied to a single facility, like notifying a location-specific sales team about a new lead or managing access control for one gym.

Setup and Configuration Guide#

Follow these steps to set up your webhook endpoint.
1.
Navigate to Webhook Settings
Log in as an Admin to your UFP business site (e.g., https://{your_site_subdomain}.staff.unifiedfitnessplatform.ai).
Go to Settings in the main navigation menu.
Click on Webhooks.
2.
Choose Your Webhook Type
Select either Global Webhook or Location Webhook based on your requirements.
3.
Configure Your Endpoint
WEBHOOK URL: Enter the public URL of your application's endpoint that will receive the webhook POST requests from UFP.
SECRET KEY: Enter a secret key. This can be any random string you choose. It will be used to generate a signature for each payload, allowing you to verify its authenticity.
Store your Secret Key securely. You will need it to verify all incoming webhooks.
4.
Subscribe to Events
After saving your URL and secret, you will see a list of all available events.
Click the Subscribe button next to each event you want to receive notifications for. You can update your subscriptions at any time.

Verifying Payload Signatures#

To ensure that webhook requests are authentic and have not been tampered with, UFP signs every payload. The signature is sent in the X-UFP-Signature HTTP header.
You must verify this signature on your server. To do this, generate a HMAC-SHA256 hash using the raw JSON payload from the request body and your securely stored Webhook Secret Key.

Verification Steps:#

1.
Extract the signature from the X-UFP-Signature header of the incoming request.
2.
Read the raw request body. Important: Use the raw body, not a parsed JSON object.
3.
Compute the HMAC-SHA256 hash of the raw request body, using your Webhook Secret Key as the key.
4.
Compare your generated hash (in hex format) with the signature from the header. If they match, the request is valid.
Code examples for verification are provided in the Best Practices section below.

Payload Structure#

All webhook events are sent as a POST request with a JSON body. The structure is as follows:
{
  "webhook_event_type": "new_lead_created",
  "created_at": "11/06/2025 17:22",
  "company_id": 1,
  "tenant_id": 2,
  "payload": {
    "tenant_name": "DEMO TENANT - T1",
    "client_name": "Campaign",
    "phone": "+917455256585",
    "email": "vimit@fitnessforce.com",
    "gender": "Male",
    "dob": "11/06/2000",
    "source": "Referral",
    "channel": "WalkIn",
    "client_rep_name": "Nitin Yadav",
    "created_date_time": "11/06/2025 17.22",
    "client_status": "Prospect",
    "external_id": "",
    "migration_id": "",
    "created_by": 858,
    "track_mode": "StaffWebApp",
    "is_child": "False",
    "relation": "None",
    "parent_id": 0,
    "clt_cp_client_id": ""
  }
}
webhook_event_type (string): The key of the event that was triggered.
created_at (string): The timestamp of when the event occurred.
tenant_id (integer): The ID of the location where the event originated.
payload (object): A JSON object containing the specific data for the event. The structure of this object is different for each event_type.

Webhook Reliability: Retries and Disabling#

It is critical that your application correctly handles incoming webhooks to ensure uninterrupted service.

Acknowledging Events#

Your endpoint must return a 2xx HTTP status code (e.g., 200 OK, 202 Accepted) to signal that you have successfully received the event. This should be done as quickly as possible. If your application needs to perform long-running tasks, process them asynchronously in a background job after sending the 2xx response.

Automatic Retry Policy#

If your endpoint fails to return a 2xx response (due to a server error, network timeout, or any 4xx/5xx response), UFP will consider the delivery a failure and initiate a retry process.
We will attempt to redeliver the event 3 more times over the next 24 hours.
The time interval between retries will increase with each failed attempt.

Webhook Disabling#

⚠️ IMPORTANT: Failure to Acknowledge Events
If all retry attempts for a single event fail, your webhook will be automatically disabled.
A disabled webhook will stop receiving all subsequent event notifications. No new webhooks will be sent to the configured URL until it is manually re-enabled in the UFP admin settings. It is essential to build a resilient endpoint that can handle these requests reliably to avoid service disruption.

Best Practices & Code Examples#

1. Respond Immediately, Process Asynchronously#

Acknowledge the webhook with a 200 OK before doing any complex processing to avoid timeouts.

2. Verify Signatures#

Always verify the signature before trusting the payload.
Node.js
Python (with Flask)

3. Handle Event Idempotency#

It is possible to receive the same event more than once due to retries. Design your system to be idempotent.

4. Secure Your Secret Key#

Treat your webhook secret key like any other password. Store it securely as an environment variable or in a secrets management tool. Do not hardcode it in your application's source code.

Available Webhook Events#

The following is a list of events you can subscribe to. For the most current and detailed list, please visit the webhook configuration section in your UFP staff application:
https://{your_site_subdomain}.staff.unifiedfitnessplatform.ai/#/admin/webhook-configuration/company
Event KeyDescriptionCategory
Sales & Leads
newlead_createdTriggered when a new lead is created in the system.Sales
repeat_enq_createdTriggered when an existing lead or client makes a new enquiry.Sales
tour_bookedTriggered when a facility tour is booked for a lead.Sales
tour_marked_noshowTriggered when a lead is marked as a no-show for their scheduled tour.Sales
trial_createdTriggered when a new trial period is created for a client.Sales
sub_signup_link_generatedTriggered when a unique subscription signup link is created.Sales
Subscriptions
sub_signup_completedTriggered when a client successfully completes the signup process for a subscription.Subscriptions
sub_signup_failedTriggered when a client's subscription signup process fails.Subscriptions
sub_cancellation_requestedTriggered when a client requests to cancel their subscription.Subscriptions
sub_freeze_createdTriggered when a subscription is successfully frozen.Subscriptions
sub_freeze_voidedTriggered when a subscription freeze is voided or cancelled by an admin.Subscriptions
sub_freeze_stoppedTriggered when a subscription freeze ends and the subscription becomes active again.Subscriptions
sub_voidedTriggered when an active subscription is voided by an admin.Subscriptions
transferor_consent_request_initiatedTriggered when a consent request for transferring a subscription is initiated.Subscriptions
Billing & Payment
invoice_createdTriggered when a new invoice is created.Billing & Payment
invoice_voidedTriggered when an existing invoice is voided.Billing & Payment
recurring_payment_receivedTriggered when a recurring payment is successfully processed.Billing & Payment
recurring_payment_failedTriggered when a recurring payment attempt fails.Billing & Payment
non_recurring_payment_receivedTriggered when a non-recurring (one-off) payment is successfully received.Billing & Payment
non_recurring_payment_failedTriggered when a non-recurring payment attempt fails.Billing & Payment
payment_voidedTriggered when a completed payment record is voided.Billing & Payment
sales_return_createdTriggered when a sales return is initiated.Billing & Payment
sales_return_voidedTriggered when a sales return is voided.Billing & Payment
refund_processedTriggered when a refund has been successfully processed for a payment.Billing & Payment
Appointments
single_appt_bookedTriggered when a single (non-recurring) appointment is booked.Appointments
single_appt_cancelledTriggered when a single appointment is cancelled.Appointments
single_appt_rescheduledTriggered when a single appointment is rescheduled.Appointments
single_appt_marked_attendedTriggered when a client is marked as 'attended' for an appointment.Appointments
single_appt_marked_noshowTriggered when a client is marked as a 'no-show' for an appointment.Appointments
recurring_appt_bookedTriggered when a recurring series of appointments is booked.Appointments
recurring_appt_cancelledTriggered when a series of recurring appointments is cancelled.Appointments
recurring_appt_rescheduledTriggered when a series of recurring appointments is rescheduled.Appointments
Classes
class_bookedTriggered when a client books a spot in a class.Classes
class_booking_cancelledTriggered when a client cancels their booking for a specific class session.Classes
class_cancelledTriggered when an entire class schedule (e.g., all future sessions) is cancelled by an admin.Classes
class_rescheduledTriggered when a class session is rescheduled to a new time or date.Classes
class_marked_attendedTriggered when a client's attendance is marked for a class.Classes
class_marked_noshowTriggered when a client is marked as a 'no-show' for a class.Classes
class_waitlist_spot_vacatedTriggered when a spot opens up in a fully booked class that has a waitlist.Classes
class_coach_substitutedTriggered when the coach for a scheduled class is changed.Classes
Client Management & Retention
waiver_completedTriggered when a client signs and completes a liability waiver.Client Management
flagged_clt_at_riskTriggered when a client is manually flagged as being 'at risk' of churning.Retention
app_booking_restrictedTriggered when a client's booking privileges are restricted by an admin.Client Management
app_booking_restriction_liftedTriggered when a client's booking restriction is removed.Client Management
clt_birthdayTriggered on a client's birthday.Notifications
tour_scheduled_dateTriggered on the day a facility tour is scheduled to occur.Notifications
trial_start_dateTriggered on the day a client's trial period is scheduled to begin.Notifications
trial_end_dateTriggered on the day a client's trial period is scheduled to end.Notifications
sub_cancellation_dateTriggered on the date a subscription is scheduled to be officially cancelled.Notifications
sub_freeze_start_dateTriggered on the day a subscription freeze is scheduled to begin.Notifications
sub_freeze_end_dateTriggered on the day a subscription freeze is scheduled to end.Notifications
class_session_dateTriggered on the day of a scheduled class session (can be used for reminders).Notifications
Modified at 2025-06-12 13:47:42
Previous
Quickstart
Next
Get campaign
Built with