This guide will walk you through the essential steps to get up and running with the UFP API: authenticating and making your first API call.Prerequisites#
Before you begin, make sure you have:1.
API Credentials: Your staff account email and password.
2.
Company UUID & Tenant IDs: The unique UUID for your company and the specific tenant (location/branch) you want to interact with. If you don't have these, please contact your account manager.
3.
An API Client: A tool like Postman or a command-line tool like curl to make HTTP requests. The examples below use curl. Step 1: Authentication#
The UFP API uses JWT (JSON Web Tokens) for authentication. To make any authenticated request, you must first obtain an access token and include it in the Authorization header of your subsequent requests.To get your token, you'll make a POST request to the /token endpoint.Request#
Here is an example using curl:Replace your_email@example.com, your_password, and 16386DBE-1612-4180-81EC-6458712B51FD with your actual credentials.Response#
A successful request will return a JSON object containing your token and refresh_token.{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"refresh_token": "def50200f4911d38b73f8a0e36b8e3a246d849221191a206a5b4815a51a8775e",
"success": true,
"errors": []
}
Store the token & refresh_token securely. You will need it for API calling and for refreshing your token.Refresh Token#
To get a new access token using your refresh token , you'll make a POST request to the /refresh endpoint.Request#
Here is an example using curl:Replace refresh_token, with your actual saved refresh token.Response#
A successful request will return a JSON object containing your token and refresh_token.{
"token": "eyBHsGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQs32asA",
"refresh_token": "bbhd50200f4911d38b73f8a0e36b7f3a246d849221191a206a5b4815a51a8213c",
"success": true,
"errors": []
}
again Store the token & refresh_token securely.Step 2: Make Your First API Call#
Now that you have an access token, you can make authenticated requests to the API. Let's try a simple one: listing all clients for a specific tenant.We'll use the GET /tenants/{tenant_id}/clients endpoint.Request#
To make an authenticated request, you must include the Authorization header with the Bearer scheme, followed by your token.Replace YOUR_TENANT_ID with the ID of the tenant you want to query.
Replace YOUR_JWT_TOKEN with the token you received in Step 1.
Response#
If the request is successful, you'll receive a 200 OK status code and a JSON response containing a paginated list of clients for that tenant.{
"items": [
{
"id": 101,
"company_id": 123,
"client_status": "Client",
"full_name": "Jane Doe",
"mobile_number": 9876543210,
"email_id": "jane.doe@example.com"
},
{
"id": 102,
"company_id": 123,
"client_status": "Prospect",
"full_name": "John Smith",
"mobile_number": 9876543211,
"email_id": "john.smith@example.com"
}
],
"total_items": 2,
"total_pages": 1,
"current_page": 1
}
Next Steps#
Congratulations! You've successfully authenticated and made your first API call.Now you're ready to explore the rest of the API. Here are a few suggestions:Dive into Billing & Subscriptions to manage client plans.
Explore the Scheduling endpoints to create and manage classes and appointments.
Check out the Reporting endpoints to pull sales and payment data.
Refer to the full API documentation for details on every available endpoint, its parameters, and response schemas. If you encounter any errors, check the HTTP status code and the JSON response body for detailed error messages. Modified at 2025-06-12 13:16:39