### GET /api/v5/authentication/totp/setup Source: https://sport.nubapp.com/api/v5/docs.json Retrieves TOTP (Time-based One-Time Password) setup information for the authenticated user, including the secret key and QR code (if available). This endpoint is used to display setup instructions for 2FA configuration. ```markdown ### Responses #### 200 - TOTP setup information retrieved successfully - **totp_secret** (string): The TOTP secret key for the user (example: "JBSWY3DPEHPK3PXP") - **totp_qr_code** (string): QR code data URI for scanning with authenticator apps (null if TOTP not enabled) (example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...") #### 401 - response - **message** (string) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/authentication/totp/setup" ``` ``` -------------------------------- ### GET /api/v5/activities Source: https://sport.nubapp.com/api/v5/docs.json Get activities of application. ```markdown ### Parameters - **start_timestamp** (string, query, optional) - **end_timestamp** (string, query, optional) ### Responses #### 200 - List of activities - Array of ActivityDTO #### 400 - Invalid dates - **message** (string) (example: "Invalid dates.") - **error** (integer) (example: 7002) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/activities?start_timestamp=string&end_timestamp=string" ``` ``` -------------------------------- ### GET /api/v5/pos/settings Source: https://sport.nubapp.com/api/v5/docs.json Get application pos settings. ```markdown ### Responses #### 200 - List of pos settings. - Array of PosOptions #### 403 - response - **message** (string) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/pos/settings" ``` ``` -------------------------------- ### GET /api/v5/settings/waiting-lists Source: https://sport.nubapp.com/api/v5/docs.json Get waiting lists settings. ```markdown ### Request Body **Content-Type:** application/json - **u** (string) (required) - **p** (string) (required) - **token** (string) (required) - **id_application** (number) (required) - **action_by** (integer) (required) (example: "12") ### Responses #### 200 - OK - **status** (number) (example: 200) - **message** (string) (example: "All right! Here is your data.") - **success** (boolean) (example: true) - **data** (object) - **waiting_list_mode** (integer) (example: 0) - **minutes_to_decide** (integer) (example: 10) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/waiting-lists" \ -H "Content-Type: application/json" \ -d '{ "u": "test", "p": "c44a471bd78cc6c2fea32b9fe028d30a", "token": "string", "id_application": "50441262", "action_by": "12" }' ``` ``` -------------------------------- ### GET /api/v5/activities/tags Source: https://sport.nubapp.com/api/v5/docs.json Get all application activities tags. ```markdown ### Responses #### 200 - Returns all activity tags indexed by id. - **1** (string): Tag name for id 1 (example: "Football") - **2** (string): Tag name for id 2 (example: "Basket") - **3** (string): Tag name for id 3 (example: "Tennis") #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/activities/tags" ``` ``` -------------------------------- ### GET /api/v5/planner/programs/users/ongoing Source: https://sport.nubapp.com/api/v5/docs.json Retrieves all user programs that are currently active (started and not yet ended). ```markdown ### Responses #### 200 - List of ongoing user programs - Array of MainInfoUserProgramDTO #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/planner/programs/users/ongoing" ``` ``` -------------------------------- ### GET /api/v5/settings/general-bookings Source: https://sport.nubapp.com/api/v5/docs.json Retrieves the general booking configuration for the current application, including simultaneous booking limits, start time rules, and unpaid booking policies. ```markdown ### Responses #### 200 - General booking settings retrieved successfully **GeneralBookingSettingsDTO** - **maximum_simultaneous_bookings** (integer): Maximum number of simultaneous bookings allowed per user (example: 3) - **bookings_start** (string): Booking start mode (0: anytime, 1: specific weekday, 2: specific hour) (example: "0") - **bookings_start_weekday** (integer): Day of the week when bookings start (0=Sunday to 6=Saturday) (example: 1) - **bookings_start_hour** (string): Hour when bookings become available (HH:mm format) (example: "08:00") - **apply_booking_options_in_admin_panel** (boolean) (required): Whether booking options apply in the admin panel (example: true) - **unpaid_past_book_option** (integer) (required): Handling option for unpaid past bookings (0: do nothing, 1: schedule at end of month, 2: schedule on specific day) (example: 0) - **schedule_unpaid_past_booking_after_day** (integer): Days after which unpaid past bookings are scheduled (example: 5) - **users_days_can_see_in_advance** (integer): Number of days users can see bookings in advance (example: 7) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/general-bookings" ``` ``` -------------------------------- ### GET /api/v5/get/alive Source: https://sport.nubapp.com/api/v5/docs.json Check if the API works ```markdown ### Responses #### 200 - OK - **message** (string) - **success** (boolean) - **status** (number) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/get/alive" ``` ``` -------------------------------- ### GET /api/v5/settings/addons/active Source: https://sport.nubapp.com/api/v5/docs.json Retrieve all currently active addons with prices for the current application ```markdown ### Responses #### 200 - List of active addons with prices - Array of Addon #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/addons/active" ``` ``` -------------------------------- ### GET /api/v5/settings/bank-accounts Source: https://sport.nubapp.com/api/v5/docs.json Get application bank accounts ```markdown ### Request Body **Content-Type:** application/x-www-form-urlencoded - **u** (string) (required) - **p** (string) (required) - **token** (string) (required) - **id_application** (number) (required) - **action_by** (string) (required) ### Responses #### 200 - OK - **message** (string) - **bankAccountsData** (array (object)) Array items: - **id** (number) - **name** (string) - **iban** (string) - **bic** (string) - **ci** (string) - **verification_status** (integer) - **accounting_account** (string) - **analytic_accounting_code** (string) - **payoff_bank_account** (number) - **success** (boolean) - **status** (number) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/bank-accounts" \ -H "Content-Type: application/json" \ -d '{ "u": "test", "p": "c44a471bd78cc6c2fea32b9fe028d30a", "token": "string", "id_application": "50441262", "action_by": "3" }' ``` ``` -------------------------------- ### GET /api/v5/configuration/sockets Source: https://sport.nubapp.com/api/v5/docs.json API endpoint for GET /api/v5/configuration/sockets ```markdown ### Responses #### default - response ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/configuration/sockets" ``` ``` -------------------------------- ### GET /api/v5/courses/{courseId}/users/{userId}/booking Source: https://sport.nubapp.com/api/v5/docs.json Gets course booking ```markdown ### Parameters - **courseId** (string, path, required) - **userId** (string, path, required) ### Responses #### 200 - List with info of course booking - **** (object) - **id_course** (integer) (example: 14345449) - **booking_code** (string) (example: "A7G7QRDWJ") - **price** (number (float)) (example: 15) - **total_paid** (number (float)) (example: 0) - **total_due_to_pay** (number (float)) (example: 15) - **category** (string) (example: "activity") - **type** (string) (example: "Body pump (2024-10-04 11:00:00 - 2024-10-04 12:00:00)") - **dead_timestamp** (string (date-time)) (example: "2024-10-04 11:00:00") - **course_start_date** (string (date-time)) (example: "2024-10-04 11:00:00") - **course_end_date** (string (date-time)) (example: "2024-10-04 11:00:00") - **booked_at** (string (date-time)) (example: "2024-08-04 11:00:00") - **user_joining_date** (string (date-time)) (example: "2024-10-04 00:00:00") - **user_leaving_date** (string (date-time)) (example: "2024-10-04 00:00:00") - **special_joining_date** (boolean): True if the user has a custom joining date (example: false) - **special_leaving_date** (boolean): True if the user has a custom leaving date (example: false) - **notes** (string) (example: null) - **category_name** (string) (example: "Course Category") - **form** (object): Form data structure - **id** (integer) (example: 508) - **name** (string) (example: "Form") - **components** (array (object)) Array items: - **id** (integer) (example: 3534) - **form_id** (integer) (example: 508) - **type** (string (title|paragraph|image|single|multiple|number|textarea|email|date|time|datetime)): Type of form component (example: "title") ("title"|"paragraph"|"image"|"single"|"multiple"|"number"|"textarea"|"email"|"date"|"time"|"datetime") - **name** (string) (example: "titre") - **content** (string) (example: "Titre") - **place_holder** (string) - **only_admin** (boolean) (example: false) - **required** (boolean) (example: false) - **save_in_notes** (boolean) (example: false) - **multiple_answers** (boolean) (example: false) - **answers** (array (object)) Array items: - **id** (integer) (example: 1786) - **content** (string): References selector value (example: "1") - **value** (string) (example: "1786") - **order** (integer) (example: 1) - **id_application** (integer) (example: 23296917) - **user_value** (string): User selected value (example: "1234") - **created_at** (string) (example: "2025-03-05 08:57:52") - **application_id** (integer) (example: 1111111) #### 404 - Invalid id course or id user - **message** (string) (example: "The booking was not found.") - **code** (string) (example: "ERROR_NOT_FOUND") #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/courses/{courseId}/users/{userId}/booking" ``` ``` -------------------------------- ### GET /api/v5/planner/programs/users Source: https://sport.nubapp.com/api/v5/docs.json Retrieves all user programs assigned in the application. ```markdown ### Responses #### 200 - List of user programs - Array of MainInfoUserProgramDTO #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/planner/programs/users" ``` ``` -------------------------------- ### GET /api/v5/settings/booking-options/templates/courses Source: https://sport.nubapp.com/api/v5/docs.json Retrieve all booking options templates for courses (only ID and name) ```markdown ### Responses #### 200 - List of course booking options templates - Array of BookingOptionsTemplate #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/booking-options/templates/courses" ``` ``` -------------------------------- ### GET /api/v5/settings/terms-conditions Source: https://sport.nubapp.com/api/v5/docs.json Retrieve all terms and conditions documents of application ```markdown ### Responses #### 200 - List of terms and conditions documents - Array of TermsAndConditionsDocument #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/terms-conditions" ``` ``` -------------------------------- ### GET /api/v5/settings/documents Source: https://sport.nubapp.com/api/v5/docs.json Retrieves all documents associated with the current application. ```markdown ### Responses #### 200 - Documents fetched successfully - Array of object - **id_document** (integer): Document identifier (example: 17) - **document_name** (string): Name of the document (example: "Application Document 1") - **document_type_acceptance** (integer): Type of acceptance required (0: not necessary, 1: simple, 2: with signature) (example: 2) - **related_documents** (array (object)): List of related child documents Array items: - **id_document** (integer) (example: 5) - **document_name** (string) (example: "Child Document") - **document_type_acceptance** (integer) (example: 1) - **relation_type** (integer) (example: 1) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/documents" ``` ``` -------------------------------- ### GET /api/v5/budget-items Source: https://sport.nubapp.com/api/v5/docs.json Retrieves all active budget items for the authenticated user application ```markdown ### Responses #### 200 - List of budget items - Array of GetApplicationBudgetItemsDTO #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/budget-items" ``` ``` -------------------------------- ### GET /api/v5/workflows/actions Source: https://sport.nubapp.com/api/v5/docs.json Retrieves all available workflow actions with their configuration options. ```markdown ### Responses #### 200 - List of workflow actions - Array of Action #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/workflows/actions" ``` ``` -------------------------------- ### GET /api/v5/settings/addons/{addonId}/terms Source: https://sport.nubapp.com/api/v5/docs.json Retrieve the terms and conditions for a specific addon ```markdown ### Parameters - **addonId** (integer, path, required): Addon identifier ### Responses #### 200 - Terms and conditions content Empty response body #### 403 - response - **message** (string) #### 404 - Addon not found Addon not found ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/addons/{addonId}/terms" ``` ``` -------------------------------- ### POST /api/v5/settings/addons/{addonId}/activate Source: https://sport.nubapp.com/api/v5/docs.json Activate a specific addon for the current application ```markdown ### Parameters - **addonId** (integer, path, required): Addon identifier ### Request Body **Content-Type:** application/json - **documents** (array (string (binary))): Array of documents to be signed for the addon activation ### Responses #### 200 - Addon successfully activated Empty response body #### 400 - Terms and conditions not signed or addon not available in your country Terms and conditions not signed or addon not available in your country #### 403 - response - **message** (string) #### 404 - Addon not found Addon not found #### 409 - Addon already activated Addon already activated ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/settings/addons/{addonId}/activate" \ -H "Content-Type: application/json" \ -d '{ "documents": [ "string" ] }' ``` ``` -------------------------------- ### POST /api/v5/sessions Source: https://sport.nubapp.com/api/v5/docs.json Creates a new session with all configuration options. ```markdown ### Request Body **Content-Type:** application/json - **intervals** (array (object)) (required): Array of intervals with start/end hours, weekdays and date range - **trainer** (integer): ID of the trainer (example: 123) - **capacity** (integer): Capacity of the session (example: 20) - **id_activity** (integer) (required) - **blocked_facilities** (array (unknown)) (required) - **youtube_live_url** (string) - **zoom_meeting_url** (string) - **zoom_meeting_password** (string) - **waiting_list_capacity** (integer) (required) - **ignored_dates** (string) (required) ### Responses #### 200 - Session created successfully Empty response body #### 403 - response - **message** (string) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/sessions" \ -H "Content-Type: application/json" \ -d '{ "intervals": [ "value" ], "trainer": 123, "capacity": 20, "id_activity": "0", "blocked_facilities": "value", "youtube_live_url": "string", "zoom_meeting_url": "string", "zoom_meeting_password": "string", "waiting_list_capacity": "0", "ignored_dates": "string" }' ``` ``` -------------------------------- ### PUT /api/v5/settings/show-frontend-blog Source: https://sport.nubapp.com/api/v5/docs.json Updates the visibility settings for the frontend blog section. ```markdown ### Request Body **Content-Type:** application/json ### Responses #### 200 - Frontend blog settings updated successfully Empty response body #### 403 - response - **message** (string) ### Example Usage ```bash curl -X PUT "https://sport.nubapp.com/api/v5/settings/show-frontend-blog" \ -H "Content-Type: application/json" \ -d '"value"' ``` ``` -------------------------------- ### GET /api/v5/settings/importations/pending-payments/relations Source: https://sport.nubapp.com/api/v5/docs.json Retrieves pending payment identifiers from an uploaded Excel file by reading a specific column starting from a specified row ```markdown ### Parameters - **file** (string, query, required): Name of the uploaded Excel file - **column** (string, query, required): Excel column to read (e.g., "A", "B", "C") (example: "A") - **start_row** (string, query, required): Row number to start reading from (example: "2") ### Responses #### 200 - Pending payments successfully retrieved from file - **message** (string) (example: "All right! Here is your data.") - **success** (boolean) (example: true) - **data** (object) - **excelUnpaid** (array (string)): List of unique pending payment identifiers extracted from the file - **status** (integer) (example: 200) #### 403 - response - **message** (string) #### 404 - File not found File not found ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/importations/pending-payments/relations?file=string&column=A&start_row=2" ``` ``` -------------------------------- ### POST /api/v5/planner/programs/users Source: https://sport.nubapp.com/api/v5/docs.json Assigns an existing program to a user or creates a new program assignment for the user. May require license upgrade confirmation if user limits are exceeded. ```markdown ### Request Body **Content-Type:** application/json - **day** (integer) (required): Starting day number within the program (example: 1) - **id_user** (integer) (required) - **id_program** (integer) - **start_date** (string) (required) - **end_date** (string) - **id_fee** (integer) - **id_profile** (integer) ### Responses #### 200 - Success response - Program assigned or license upgrade required - **id_user_program** (integer): ID of the created user program assignment (example: 1) #### 400 - Invalid request parameters - **message** (string) (example: "Error") - **error** (integer) (example: 30013) #### 403 - response - **message** (string) #### 404 - Program or resource not found - **message** (string) (example: "Error") - **error** (integer) (example: 30008) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/planner/programs/users" \ -H "Content-Type: application/json" \ -d '{ "day": 1, "id_user": "0", "id_program": "0", "start_date": "string", "end_date": "string", "id_fee": "0", "id_profile": "0" }' ``` ``` -------------------------------- ### POST /api/v5/planner/hire Source: https://sport.nubapp.com/api/v5/docs.json Activates the planner module for the current application. Possible errors:
30024: Planner already hired ```markdown ### Responses #### 200 - Planner hired successfully Empty response body #### 299 - Business logic error - **message** (string) (example: "Error") - **error** (integer) (example: 30024) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/planner/hire" ``` ``` -------------------------------- ### GET /api/v5/application/penalties Source: https://sport.nubapp.com/api/v5/docs.json Get application penalties ```markdown ### Responses #### 200 - List of application penalties - Array of Penalty ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/application/penalties" ``` ``` -------------------------------- ### GET /api/v5/user/resasocial Source: https://sport.nubapp.com/api/v5/docs.json Get resasocial user ```markdown ### Responses #### 200 - OK - **id_social_user** (integer) (example: "7c2411cb-df67-4b65-b90a-f22d312f006f") - **first_name** (string) (example: "John") - **last_name** (string) (example: "Doe") - **full_name** (string) (example: "John Doe") - **username** (string) (example: "johndoe") - **email** (string) (example: "johndoe@example.com") - **avatar** (string) (example: "https://example.com/avatar.jpg") - **applications** (array (object)) Array items: - **id_application** (integer) (example: 11111111) - **application_name** (string) (example: "Example center") - **users** (array (object)) Array items: - **id_language** (integer) (example: 1) - **id_user** (integer) (example: 123456) - **required_fields** (array (object)) Array items: - **id_field** (integer) (example: 1) - **text** (string) (example: "dob") - **section** (integer) (example: 1) - **custom_field** (boolean) (example: false) - **required** (boolean) (example: true) - **field_type** (integer) (example: 4) - **values** (array (string)) - **terms_and_conditions** (object) - **sportclub** (object) - **request_sportclub_terms_and_conditions** (boolean) (example: false) - **nubapp** (object) - **request_nubapp_terms_and_conditions** (boolean) (example: false) - **jwt_token** (string) (example: "eyJ0...") - **username** (string) (example: "johndoe") - **avatar** (string) (example: "https://example.com/avatar.jpg") - **full_name** (string) (example: "John Doe") - **membership_number** (string) (example: "123456") - **jwt_token** (string) (example: "eyJ0...") - **refresh_token** (string) (example: "eyJ0...") #### 404 - Resasocial user not found Resasocial user not found ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/user/resasocial" ``` ``` -------------------------------- ### GET /api/v5/settings/addons Source: https://sport.nubapp.com/api/v5/docs.json Retrieve all addons with prices that are available for the current application based on country and profile ```markdown ### Responses #### 200 - List of addons with prices - Array of Addon #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/settings/addons" ``` ``` -------------------------------- ### GET /api/v5/packs/categories Source: https://sport.nubapp.com/api/v5/docs.json Gets application packs categories. ```markdown ### Responses #### 200 - List of application packs categories. - Array of PackCategory #### 403 - response - **message** (string) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/packs/categories" ``` ``` -------------------------------- ### POST /api/v5/accessControl/timetableProfile Source: https://sport.nubapp.com/api/v5/docs.json Create a new timetable profile ```markdown ### Request Body **Content-Type:** application/json - **id_application** (integer) (required) (example: 123) - **action_by** (integer) (required) (example: 456) - **timetable_profile_name** (string) (required) (example: "Weekdays") ### Responses #### 200 - Successful response - **success** (boolean) (example: true) - **status** (integer) (example: 200) - **message** (string) (example: "All right! Here is your data.") - **timetable** (object) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/accessControl/timetableProfile" \ -H "Content-Type: application/json" \ -d '{ "id_application": 123, "action_by": 456, "timetable_profile_name": "Weekdays" }' ``` ``` -------------------------------- ### GET /api/v5/activities/users/notify Source: https://sport.nubapp.com/api/v5/docs.json Get activities users to notify. ```markdown ### Parameters - **activity_calendar_id** (integer, query, optional) - **id_course** (integer, query, optional) ### Responses #### 200 - OK - **form** (object): Form data structure - **id** (integer) (example: 508) - **name** (string) (example: "Form") - **components** (array (object)) Array items: - **id** (integer) (example: 3534) - **form_id** (integer) (example: 508) - **type** (string (title|paragraph|image|single|multiple|number|textarea|email|date|time|datetime)): Type of form component (example: "title") ("title"|"paragraph"|"image"|"single"|"multiple"|"number"|"textarea"|"email"|"date"|"time"|"datetime") - **name** (string) (example: "titre") - **content** (string) (example: "Titre") - **place_holder** (string) - **only_admin** (boolean) (example: false) - **required** (boolean) (example: false) - **save_in_notes** (boolean) (example: false) - **multiple_answers** (boolean) (example: false) - **answers** (array (object)) Array items: - **id** (integer) (example: 1786) - **content** (string): References selector value (example: "1") - **value** (string) (example: "1786") - **order** (integer) (example: 1) - **id_application** (integer) (example: 23296917) - **user_value** (string): User selected value (example: "1234") - **created_at** (string) (example: "2025-03-05 08:57:52") - **application_id** (integer) (example: 1111111) #### 403 - response - **message** (string) #### 404 - Not found - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/activities/users/notify?activity_calendar_id=0&id_course=0" ``` ``` -------------------------------- ### POST /api/v5/settings/addons/{addonId}/terms/{version}/sign Source: https://sport.nubapp.com/api/v5/docs.json Accept the terms and conditions for a specific addon version ```markdown ### Parameters - **addonId** (integer, path, required): Addon identifier - **version** (integer, path, required): Terms and conditions version ### Responses #### 200 - Terms and conditions successfully signed Empty response body #### 403 - response - **message** (string) #### 404 - Addon or terms and conditions version not found Addon or terms and conditions version not found ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/settings/addons/{addonId}/terms/{version}/sign" ``` ``` -------------------------------- ### POST /api/v5/courses/{courseId}/enrollment-list Source: https://sport.nubapp.com/api/v5/docs.json Add a user to a course enrollment list. Requires admin or employee permissions. ```markdown ### Parameters - **courseId** (integer, path, required): ID of the course ### Request Body **Content-Type:** application/json - **id_user** (integer) (required): ID of the user to enroll (example: 123) - **force** (boolean) (required): Force enrollment even if restrictions apply (example: false) - **id_activity_calendar** (integer): Optional activity calendar ID (example: 456) ### Responses #### 200 - User successfully added to the course Empty response body #### 299 - Business logic error - User cannot be inscribed or no space available - **message** (string) (example: "No space available for booking") #### 403 - Forbidden - The user does not have the required permissions Forbidden - The user does not have the required permissions #### 404 - Course or user not found - **message** (string) (example: "Course not found") #### 409 - User is already enrolled in the course - **message** (string) (example: "User already enrolled in course") #### 480 - Application is blocked - **message** (string) (example: "Application is blocked") ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/courses/{courseId}/enrollment-list" \ -H "Content-Type: application/json" \ -d '{ "id_user": 123, "force": false, "id_activity_calendar": 456 }' ``` ``` -------------------------------- ### GET /api/v5/bookings/all-type-past Source: https://sport.nubapp.com/api/v5/docs.json API endpoint for GET /api/v5/bookings/all-type-past ```markdown ### Request Body **Content-Type:** application/json - **timestamp** (string) - **u** (string) - **id_application** (integer) (required) - **id_user** (integer) (required) - **app_version** (string) ### Responses #### default - response ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/bookings/all-type-past" \ -H "Content-Type: application/json" \ -d '{ "timestamp": "string", "u": "string", "id_application": "0", "id_user": "0", "app_version": "string" }' ``` ``` -------------------------------- ### GET /api/v5/users/{userId}/vouchers Source: https://sport.nubapp.com/api/v5/docs.json Get user vouchers ```markdown ### Parameters - **userId** (string, path, required) ### Responses #### 200 - List of users vouchers - Array of UserVouchersDTO #### 403 - response - **message** (string) #### 404 - Invalid id user - **message** (string) (example: "The user was not found.") - **code** (string) (example: "ERROR_NOT_FOUND") ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/users/{userId}/vouchers" ``` ``` -------------------------------- ### POST /api/v5/planner/programs/users/{userProgramId}/days Source: https://sport.nubapp.com/api/v5/docs.json Creates a new day within a user program, including optional workouts with exercises, time caps, and feedback settings. ```markdown ### Parameters - **userProgramId** (integer, path, required): User program ID ### Request Body **Content-Type:** application/json - **workouts** (array (CreateProgramDayWorkoutRequest)): List of workouts for this day Array items: - **type** (string (warm-up|workout|cooldown|none)): Workout type: warm-up, workout, cooldown, or none (example: "workout") ("warm-up"|"workout"|"cooldown"|"none") - **order** (integer): Display order of the workout (example: 1) - **name** (string): Workout name (example: "Morning Cardio") - **description** (string): Detailed workout description (example: "30 minutes of moderate intensity cardio") - **exercises** (array (integer)): List of exercise IDs (example: [1,2,3]) - **equipment** (array (integer)): List of equipment IDs (example: [1,2]) - **result** (string): Result format: rounds, time, reps, weight, distance, calories, watts, or percentage (example: "reps") - **feedback** (integer): Feedback level (0-6) (example: 1) - **id_workout** (integer) - **time_cap** (integer) (required) - **video_urls** (array (unknown)) - **coach_notes** (string) - **athlete_notes** (string) - **name** (string) (required): Name of the program day (example: "Day 1 - Upper Body") - **day** (integer) (required): Day number in the program (example: 1) - **rest** (boolean) (required) - **action_by** (integer) - **id_application** (integer) - **modify_assigned** (boolean) (required) ### Responses #### 200 - Program day created successfully - **id_day** (integer): Created program day ID (example: 123) #### 299 - Business logic error - **message** (string) (example: "Error") - **error** (integer) (example: 30010) #### 400 - Invalid date format - **message** (string) (example: "Error") - **error** (integer) (example: 7002) #### 403 - response - **message** (string) #### 404 - Program or workout not found - **message** (string) (example: "Error") - **error** (integer) (example: 7003) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/planner/programs/users/{userProgramId}/days" \ -H "Content-Type: application/json" \ -d '{ "workouts": [ "value" ], "name": "Day 1 - Upper Body", "day": 1, "rest": "true", "action_by": "0", "id_application": "0", "modify_assigned": "true" }' ``` ``` -------------------------------- ### GET /api/v5/users/{userId}/penalties Source: https://sport.nubapp.com/api/v5/docs.json Get all user penalties ```markdown ### Parameters - **userId** (string, path, required) ### Responses #### 200 - List of user penalties. - Array of UserPenaltyInfoDTO #### 403 - response - **message** (string) #### default - response - **message** (string) - **status** (number) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/users/{userId}/penalties" ``` ``` -------------------------------- ### POST /api/v5/budget-items Source: https://sport.nubapp.com/api/v5/docs.json Creates a new budget item with name, color, and optional accounting details ```markdown ### Request Body **Content-Type:** application/json - **name** (string) (required): Budget item name (example: "Marketing") - **color** (string) (required): Budget item color in hex format (example: "#FF5733") - **accounting_account** (string): Accounting account code (example: "654321") - **analytic_accounting_code** (string): Analytic accounting code (example: "ANALYTIC456") ### Responses #### 200 - Budget item created successfully - **new_budget_item_id** (integer): ID of the newly created budget item (example: 123) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X POST "https://sport.nubapp.com/api/v5/budget-items" \ -H "Content-Type: application/json" \ -d '{ "name": "Marketing", "color": "#FF5733", "accounting_account": "654321", "analytic_accounting_code": "ANALYTIC456" }' ``` ``` -------------------------------- ### GET /api/v5/users/{idUser}/documents Source: https://sport.nubapp.com/api/v5/docs.json Get user documents. ```markdown ### Parameters - **idUser** (integer, path, required): User ID ### Responses #### 200 - OK - **user_documents** (array (object)) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/users/{idUser}/documents" ``` ``` -------------------------------- ### GET /api/v5/reports/financial/online-revenue Source: https://sport.nubapp.com/api/v5/docs.json Gets total online revenue report ```markdown ### Parameters - **from** (string, query, required): Start date for the report in YYYY-MM-DD format (example: "2024-10-01") - **to** (string, query, required): End date for the report in YYYY-MM-DD format (example: "2024-11-06") - **by_captured_date** (bool, query, required): Whether the date is captured or not (example: "true") ### Responses #### 200 - Total online revenue report got successfully - Array of GetReportTotalOnlineRevenueControllerResponseDTO #### 400 - Invalid date format - **message** (string) (example: "Failed to parse time string (2025 10 31) at position 5 (1): Unexpected character") ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/reports/financial/online-revenue?from=2024-10-01&to=2024-11-06&by_captured_date=true" ``` ``` -------------------------------- ### GET /api/v5/activities/sessions Source: https://sport.nubapp.com/api/v5/docs.json Get activities sessions calendar for a user. ```markdown ### Parameters - **start_timestamp** (string, query, required) - **end_timestamp** (string, query, required) - **last_timestamp** (string, query, optional) - **id_user** (integer, query, optional) - **id_facility** (integer, query, optional) - **id_category_activity** (integer, query, optional) - **last_id_activity_session** (integer, query, optional) ### Responses #### 200 - OK - **activitiesCalendar** (array (object)) Array items: - **id_activity_calendar** (integer) (example: 123456) - **id_activity** (integer) (example: 789) - **id_category_activity** (integer) (example: 10) - **title** (string) (example: "Yoga Class") - **name_activity** (string) (example: "Yoga Class") - **description** (string) (example: "Relaxing yoga session") - **start** (string) (example: "2024-03-20 10:00:00") - **end** (string) (example: "2024-03-20 11:00:00") - **start_time** (string) (example: "10:00") - **end_time** (string) (example: "11:00") - **id_trainer** (integer) (example: 456) - **cancelled** (boolean) (example: false) - **backgroundColor** (string) (example: "#FF5733") - **trainer** (object) - **full_name** (string) (example: "John Doe") - **tags** (array (string)) - **user_info** (object) - **can_join** (boolean) (example: true) - **available_booking_options** (array (object)) - **errors** (integer) (example: 0) - **errors_by_memberships** (array (integer)) - **join_as_normal_user** (boolean) (example: false) - **vouchers** (array (object)) - **voucher_autopay** (boolean) (example: false) - **unableToBookUntilDate** (string) (example: null) - **unableToBookUntilTime** (string) (example: null) - **best_booking_option** (object) - **price** (number (float)) (example: 10.5) - **price_befdis** (number (float)) (example: 15) - **user_attending** (boolean) (example: false) - **user_waiting** (boolean) (example: false) - **can_join** (boolean) (example: true) - **price** (number (float)) (example: 10.5) - **capacity** (integer) (example: 20) - **n_attending** (integer) (example: 15) - **data** (object) - **closedDays** (array (object)) Array items: - **start** (string) (example: "2024-03-25 00:00") - **end** (string) (example: "2024-03-25 23:59") - **title** (string) (example: "Closed") - **className** (string) (example: "calendar_dark_grey") - **type** (string) (example: "SPECIAL_CLOSED") - **editable** (boolean) (example: false) #### 403 - response - **message** (string) ### Example Usage ```bash curl -X GET "https://sport.nubapp.com/api/v5/activities/sessions?start_timestamp=string&end_timestamp=string&last_timestamp=string&id_user=0&id_facility=0&id_category_activity=0&last_id_activity_session=0" ``` ```