# Client Management

## Retrieve a Paginated List of Users

> \### Retrieve a Paginated List of Users\
> \
> This endpoint allows an administrator to retrieve a paginated list of users under their account. The response includes detailed information for each user such as personal attributes, contact details, and metadata related to their account.\
> \
> \*\*Usage Example:\*\*\
> Send a \`GET\` request to \`client-management/clients/\` with the appropriate API-KEY token in the Authorization header.\
> \
> \*\*Response Structure:\*\*\
> \- \*\*users\*\* \*(array)\*: A list of user objects, where each object includes the following fields:\
> &#x20; \- \*\*created\_at\*\* \*(string, date-time)\*: Timestamp when the user was created.\
> &#x20; \- \*\*weight\*\* \*(number)\*: The user’s weight.\
> &#x20; \- \*\*age\*\* \*(string)\*: The user’s age.\
> &#x20; \- \*\*ycom\*\* \*(number)\*: The user’s YCOM value.\
> &#x20; \- \*\*height\*\* \*(number)\*: The user’s height.\
> &#x20; \- \*\*phone\*\* \*(string)\*: The user’s phone number.\
> &#x20; \- \*\*leg\_length\*\* \*(number)\*: The user’s leg length.\
> &#x20; \- \*\*display\_name\*\* \*(string)\*: The user’s display name.\
> &#x20; \- \*\*shoeSize\*\* \*(string)\*: The user’s shoe size.\
> &#x20; \- \*\*email\*\* \*(string)\*: The user’s email address.\
> &#x20; \- \*\*gender\*\* \*(string)\*: The user’s gender.\
> &#x20; \- \*\*brand\*\* \*(string)\*: The brand associated with the user.\
> &#x20; \- \*\*shoeModel\*\* \*(string)\*: The model of the user’s shoe.\
> &#x20; \- \*\*user\_uid\*\* \*(string)\*: The unique identifier for the user.\
> \
> \*\*Notes:\*\*\
> \- A valid API-KEY token is required to access this endpoint.\
> \- If there are no users or an error occurs, an appropriate error message is returned.

```json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/":{"get":{"operationId":"client-management_clients_list","summary":"Retrieve a Paginated List of Users","description":"### Retrieve a Paginated List of Users\n\nThis endpoint allows an administrator to retrieve a paginated list of users under their account. The response includes detailed information for each user such as personal attributes, contact details, and metadata related to their account.\n\n**Usage Example:**\nSend a `GET` request to `client-management/clients/` with the appropriate API-KEY token in the Authorization header.\n\n**Response Structure:**\n- **users** *(array)*: A list of user objects, where each object includes the following fields:\n  - **created_at** *(string, date-time)*: Timestamp when the user was created.\n  - **weight** *(number)*: The user’s weight.\n  - **age** *(string)*: The user’s age.\n  - **ycom** *(number)*: The user’s YCOM value.\n  - **height** *(number)*: The user’s height.\n  - **phone** *(string)*: The user’s phone number.\n  - **leg_length** *(number)*: The user’s leg length.\n  - **display_name** *(string)*: The user’s display name.\n  - **shoeSize** *(string)*: The user’s shoe size.\n  - **email** *(string)*: The user’s email address.\n  - **gender** *(string)*: The user’s gender.\n  - **brand** *(string)*: The brand associated with the user.\n  - **shoeModel** *(string)*: The model of the user’s shoe.\n  - **user_uid** *(string)*: The unique identifier for the user.\n\n**Notes:**\n- A valid API-KEY token is required to access this endpoint.\n- If there are no users or an error occurs, an appropriate error message is returned.","responses":{"200":{"description":"Successfully retrieved the list of users.","content":{"application/json":{"schema":{"required":["users"],"type":"object","properties":{"users":{"description":"An array of user objects.","type":"array","items":{"required":["created_at","weight","age","ycom","height","phone","leg_length","display_name","shoeSize","email","gender","brand","shoeModel","user_uid"],"type":"object","properties":{"created_at":{"description":"Timestamp when the user was created.","type":"string","format":"date-time"},"weight":{"description":"The user’s weight.","type":"number"},"age":{"description":"The user’s age.","type":"string"},"ycom":{"description":"The user’s YCOM value.","type":"number"},"height":{"description":"The user’s height.","type":"number"},"phone":{"description":"The user’s phone number.","type":"string"},"leg_length":{"description":"The user’s leg length.","type":"number"},"display_name":{"description":"The user’s display name.","type":"string"},"shoeSize":{"description":"The user’s shoe size.","type":"string"},"email":{"description":"The user’s email address.","type":"string","format":"email"},"gender":{"description":"The user’s gender.","type":"string"},"brand":{"description":"Brand associated with the user.","type":"string"},"shoeModel":{"description":"Model of the user's shoe.","type":"string"},"profile_photo":{"description":"Public URL of the user’s profile photo.","type":"string","format":"uri"},"user_uid":{"description":"Unique identifier for the user.","type":"string"}}}}}}}}},"400":{"description":"Bad Request - Invalid query parameters or missing required data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Unauthorized error message.","type":"string"}}}}}},"403":{"description":"Forbidden - User does not have the required permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Forbidden error message.","type":"string"}}}}}},"404":{"description":"Not Found - Users not found or retrieval failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message when no users are found.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"]}}}}
```

## Create a New User

> \### Create a New User\
> \
> This endpoint allows an authenticated admin to create a new user under their account. The admin must provide the user's email and display name, and may optionally include other fields. \
> \
> \*\*Usage Example:\*\*\
> Send a \`POST\` request to \`/clients/\` with a JSON payload containing the required fields. A valid API-KEY token must be included in the Authorization header.\
> \
> \### Request parameters\
> \- \*\*display\_name\*\* (string)\
> \- \*\*email\*\* (string, valid email)\
> \- \*\*age\*\* (integer)\
> \- \*\*gender\*\* (male | female)\
> \- \*\*shoeSize\*\* (float)\
> \- \*\*weight\*\* (float)\
> \- \*\*height\*\* (float)\
> \
> \*\*Response Structure:\*\*\
> Upon success (HTTP 201), the endpoint returns a JSON object with a \`userData\` field containing the following keys and data types:\
> \- \*\*user\_uid\*\* \*(string)\*: A unique identifier for the newly created user.\
> \- \*\*display\_name\*\* (string)\
> \- \*\*email\*\* (string, valid email)\
> \- \*\*age\*\* (integer)\
> \- \*\*gender\*\* (male | female)\
> \- \*\*shoeSize\*\* (float)\
> \- \*\*weight\*\* (float)\
> \- \*\*height\*\* (float)\
> \
> \- \*\*profile\_photo\*\* \*(file, JPEG/PNG)\* - optional image; only available with \`multipart/form-data\`.\
> \
> In case of an error (e.g., missing parameters, unauthorized access, or an internal error), a JSON object with an \`error\` field (string) is returned.

```json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/":{"post":{"operationId":"client-management_clients_create","summary":"Create a New User","description":"### Create a New User\n\nThis endpoint allows an authenticated admin to create a new user under their account. The admin must provide the user's email and display name, and may optionally include other fields. \n\n**Usage Example:**\nSend a `POST` request to `/clients/` with a JSON payload containing the required fields. A valid API-KEY token must be included in the Authorization header.\n\n### Request parameters\n- **display_name** (string)\n- **email** (string, valid email)\n- **age** (integer)\n- **gender** (male | female)\n- **shoeSize** (float)\n- **weight** (float)\n- **height** (float)\n\n**Response Structure:**\nUpon success (HTTP 201), the endpoint returns a JSON object with a `userData` field containing the following keys and data types:\n- **user_uid** *(string)*: A unique identifier for the newly created user.\n- **display_name** (string)\n- **email** (string, valid email)\n- **age** (integer)\n- **gender** (male | female)\n- **shoeSize** (float)\n- **weight** (float)\n- **height** (float)\n\n- **profile_photo** *(file, JPEG/PNG)* - optional image; only available with `multipart/form-data`.\n\nIn case of an error (e.g., missing parameters, unauthorized access, or an internal error), a JSON object with an `error` field (string) is returned.","responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"userData":{"required":["user_uid","email","display_name"],"type":"object","properties":{"user_uid":{"type":"string"},"display_name":{"type":"string"},"email":{"type":"string"},"age":{"type":"integer"},"gender":{"type":"string"},"shoeSize":{"type":"number","format":"float"},"weight":{"type":"number","format":"float"},"height":{"type":"number","format":"float"},"profile_photo":{"description":"Public URL of the user’s profile photo.","type":"string","format":"uri"},"preferable_activities":{"description":"List of preferred activities.","type":"array","items":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request - Missing or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message describing the input issue.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the token is missing or invalid.","type":"string"}}}}}},"403":{"description":"Forbidden - User is not authorized to create users.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - User creation limit reached for Pro plan.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"User creation limit reached for Pro plan","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"email":{"type":"string"},"age":{"type":"integer"},"gender":{"type":"string"},"shoeSize":{"type":"number"},"weight":{"type":"number"},"height":{"type":"number"},"preferable_activities":{"type":"string","description":"Optional JSON-encoded list of preferred activity types. Allowed values: 'Running', 'Vertical Jump', 'Weightlifting', 'Mobility Assessment'.\n\nExample: `[\"Running\", \"Weightlifting\"]`"},"profile_photo":{"type":"string","description":"Optional JPEG/PNG image."}},"required":["display_name","email","age","gender","shoeSize","weight","height"]}}}}}}}}
```

## Delete a User

> \### Delete a User\
> \
> This endpoint allows an authenticated admin to delete a user from their account. The admin must supply the unique identifier of the user to be deleted in the request body.\
> \
> \*\*Request Body:\*\*\
> \- \*\*user\_uid\*\* \*(string, required)\*: The unique identifier of the user to be deleted.\
> \
> \*\*Response Structure:\*\*\
> Upon success (HTTP 200), the endpoint returns a JSON object with a \*\*message\*\* field of type string confirming the deletion. In case of an error (for example, if the user UID is missing, the user is not found, or an internal error occurs), a JSON object with an \*\*error\*\* field (string) is returned.

```json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/":{"delete":{"operationId":"client-management_clients_delete","summary":"Delete a User","description":"### Delete a User\n\nThis endpoint allows an authenticated admin to delete a user from their account. The admin must supply the unique identifier of the user to be deleted in the request body.\n\n**Request Body:**\n- **user_uid** *(string, required)*: The unique identifier of the user to be deleted.\n\n**Response Structure:**\nUpon success (HTTP 200), the endpoint returns a JSON object with a **message** field of type string confirming the deletion. In case of an error (for example, if the user UID is missing, the user is not found, or an internal error occurs), a JSON object with an **error** field (string) is returned.","parameters":[{"schema":{"type":"string"},"name":"user_uid","in":"query","description":"UID of the user to delete","required":true}],"responses":{"200":{"description":"User deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Confirmation message indicating that the user has been deleted.","type":"string"}}}}}},"400":{"description":"Bad Request - Missing required user UID.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message indicating that the user UID is missing.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the token is missing or invalid.","type":"string"}}}}}},"403":{"description":"Forbidden - User is not authorized to delete users.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - User not found or not under admin.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the user is not found under the admin's account.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"]}}}}
```

## Update User Information

> \### Update User Information\
> \
> This endpoint lets an authenticated admin update \*\*selected fields\*\* of an existing user, using \*\*query-string parameters\*\*.\
> \
> \*\*Required query parameter\*\*\
> \- \*\*user\_uid\*\* \*(string)\* - the UID of the user being updated.\
> \
> \*\*Optional query parameters\*\* - supply one or more of the following:\
> \- \*\*display\_name\*\* \*(string)\* - new display name\
> \- \*\*email\*\* \*(string, valid email)\* - new email address\
> \- \*\*age\*\* \*(integer)\*\
> \- \*\*gender\*\* \*(string, one of \`male\`, \`female\`)\*\
> \- \*\*shoeSize\*\* \*(float)\*\
> \- \*\*weight\*\* \*(float)\*\
> \- \*\*height\*\* \*(float)\*\
> \
> \*\*Response (HTTP 200)\*\*\
> \`\`\`json\
> { "message": "User information updated successfully." }\
> \`\`\`\
> \
> If validation fails or the user is not found, the response contains an \*\*error\*\* field with details.

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/":{"put":{"operationId":"client-management_clients_update","summary":"Update User Information","description":"### Update User Information\n\nThis endpoint lets an authenticated admin update **selected fields** of an existing user, using **query-string parameters**.\n\n**Required query parameter**\n- **user_uid** *(string)* - the UID of the user being updated.\n\n**Optional query parameters** - supply one or more of the following:\n- **display_name** *(string)* - new display name\n- **email** *(string, valid email)* - new email address\n- **age** *(integer)*\n- **gender** *(string, one of `male`, `female`)*\n- **shoeSize** *(float)*\n- **weight** *(float)*\n- **height** *(float)*\n\n**Response (HTTP 200)**\n```json\n{ \"message\": \"User information updated successfully.\" }\n```\n\nIf validation fails or the user is not found, the response contains an **error** field with details.","responses":{"200":{"description":"User information updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Confirmation message indicating successful update.","type":"string"}}}}}},"400":{"description":"Bad Request - Missing required fields or invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message describing what went wrong.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the token is missing or invalid.","type":"string"}}}}}},"403":{"description":"Forbidden - User is not authorized to update user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"user_uid":{"type":"string"},"display_name":{"type":"string"},"email":{"type":"string"},"age":{"type":"integer"},"gender":{"type":"string"},"shoeSize":{"type":"number"},"weight":{"type":"number"},"height":{"type":"number"},"preferable_activities":{"type":"string","description":"Optional JSON-encoded list of preferred activity types. Allowed values: 'Running', 'Vertical Jump', 'Weightlifting', 'Mobility Assessment'.\n\nExample: `[\"Running\", \"Weightlifting\"]`"},"profile_photo":{"type":"string","description":"Optional JPEG/PNG image."}},"required":["user_uid"]}}}}}}}}
````

## Set / replace a note for a client

> Stores \*\*one\*\* note per client. If \*note\* is omitted or empty, the previous note is cleared (saved as \`null\`).\
> \
> Document structure:\
> \`\`\`json\
> "notes": {\
> &#x20; "text": "Hamstring strain - reduce speed work for 2 wks",  // or null\
> &#x20; "updated\_at": "2025-07-14T09:32:11.123Z"\
> }\
> \`\`\`

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/save-notes/{user_uid}":{"post":{"operationId":"client-management_clients_save-notes_create","summary":"Set / replace a note for a client","description":"Stores **one** note per client. If *note* is omitted or empty, the previous note is cleared (saved as `null`).\n\nDocument structure:\n```json\n\"notes\": {\n  \"text\": \"Hamstring strain - reduce speed work for 2 wks\",  // or null\n  \"updated_at\": \"2025-07-14T09:32:11.123Z\"\n}\n```","parameters":[{"schema":{"type":"string"},"name":"user_uid","in":"path","description":"The unique identifier of the user.","required":true}],"responses":{"200":{"description":"Note saved / replaced successfully.","content":{"application/json":{"schema":{"required":["message"],"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request - The user UID is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message describing the problem.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that authentication failed.","type":"string"}}}}}},"403":{"description":"Forbidden - The requester does not have admin privileges.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - The user is not found or is not under the admin.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the user was not found.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"],"requestBody":{"content":{"application/json":{"schema":{"required":["note"],"type":"object","properties":{"note":{"description":"Free-form note text (≤ 100 kB). If omitted or empty, the note is cleared.","type":"string"}}}}},"required":true}}}}}
````

## Filter and Paginate Users

> \### Filter and Paginate Users\
> \
> This endpoint allows an authenticated admin to filter and paginate through the users under their account. You can optionally specify query parameters to control pagination:\
> \
> \- \*\*start\_after\_id\*\* \*(string, optional)\*: The UID after which to start retrieving users (for forward pagination).\
> \- \*\*limit\*\* \*(integer, optional)\*: The maximum number of users to retrieve. Defaults to 5 if not provided.\
> \
> You can also filter users based on various criteria such as:\
> \
> \- \*\*admin\_uid\*\* \*(string, optional)\*: The UID of the admin to filter users by.\
> \- \*\*start\_date\*\* \*(string, optional)\*: Lower bound (inclusive) for the user's last session in \`YYYY-MM-DD\` format.\
> \- \*\*end\_date\*\* \*(string, optional)\*: Upper bound (inclusive) for the user's last session in \`YYYY-MM-DD\` format.\
> \- \*\*gender\*\* \*(string, optional)\*: Filter by gender (\`male\` or \`female\`).\
> \- \*\*preferable\_activities\*\* \*(array, optional)\*: Filter by user's preferable activities.\
> \*\*Response Structure (HTTP 200):\*\*\
> The response returns a JSON object with the following fields:\
> \
> \- \*\*query\_count\*\* \*(integer)\*: Total number of users under the admin.\
> \- \*\*users\*\* \*(array)\*: An array of user objects. Each user object contains:\
> &#x20; \- \*\*created\_at\*\* \*(string, date-time)\*: User creation timestamp.\
> &#x20; \- \*\*weight\*\* \*(number)\*: The user's weight.\
> &#x20; \- \*\*age\*\* \*(string)\*: The user's age.\
> &#x20; \- \*\*ycom\*\* \*(number)\*: The user's YCOM value.\
> &#x20; \- \*\*height\*\* \*(number)\*: The user's height.\
> &#x20; \- \*\*phone\*\* \*(string)\*: The user's phone number.\
> &#x20; \- \*\*leg\_length\*\* \*(number)\*: The user's leg length.\
> &#x20; \- \*\*display\_name\*\* \*(string)\*: The user's display name.\
> &#x20; \- \*\*shoeSize\*\* \*(string)\*: The user's shoe size.\
> &#x20; \- \*\*email\*\* \*(string)\*: The user's email address.\
> &#x20; \- \*\*gender\*\* \*(string)\*: The user's gender.\
> &#x20; \- \*\*brand\*\* \*(string)\*: The brand associated with the user.\
> &#x20; \- \*\*shoeModel\*\* \*(string)\*: The model of the user's shoe.\
> &#x20; \- \*\*user\_uid\*\* \*(string)\*: The unique identifier of the user.\
> \
> \- \*\*first\_uid\*\* \*(string)\*: The UID of the first user in the current page.\
> \- \*\*last\_uid\*\* \*(string)\*: The UID of the last user in the current page.\
> \
> \*\*Notes:\*\*\
> \- A valid API-KEY token is required.\
> \- If no users are found, an error message is returned with status code 404.

```json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/filter/":{"get":{"operationId":"client-management_clients_filter_list","summary":"Filter and Paginate Users","description":"### Filter and Paginate Users\n\nThis endpoint allows an authenticated admin to filter and paginate through the users under their account. You can optionally specify query parameters to control pagination:\n\n- **start_after_id** *(string, optional)*: The UID after which to start retrieving users (for forward pagination).\n- **limit** *(integer, optional)*: The maximum number of users to retrieve. Defaults to 5 if not provided.\n\nYou can also filter users based on various criteria such as:\n\n- **admin_uid** *(string, optional)*: The UID of the admin to filter users by.\n- **start_date** *(string, optional)*: Lower bound (inclusive) for the user's last session in `YYYY-MM-DD` format.\n- **end_date** *(string, optional)*: Upper bound (inclusive) for the user's last session in `YYYY-MM-DD` format.\n- **gender** *(string, optional)*: Filter by gender (`male` or `female`).\n- **preferable_activities** *(array, optional)*: Filter by user's preferable activities.\n**Response Structure (HTTP 200):**\nThe response returns a JSON object with the following fields:\n\n- **query_count** *(integer)*: Total number of users under the admin.\n- **users** *(array)*: An array of user objects. Each user object contains:\n  - **created_at** *(string, date-time)*: User creation timestamp.\n  - **weight** *(number)*: The user's weight.\n  - **age** *(string)*: The user's age.\n  - **ycom** *(number)*: The user's YCOM value.\n  - **height** *(number)*: The user's height.\n  - **phone** *(string)*: The user's phone number.\n  - **leg_length** *(number)*: The user's leg length.\n  - **display_name** *(string)*: The user's display name.\n  - **shoeSize** *(string)*: The user's shoe size.\n  - **email** *(string)*: The user's email address.\n  - **gender** *(string)*: The user's gender.\n  - **brand** *(string)*: The brand associated with the user.\n  - **shoeModel** *(string)*: The model of the user's shoe.\n  - **user_uid** *(string)*: The unique identifier of the user.\n\n- **first_uid** *(string)*: The UID of the first user in the current page.\n- **last_uid** *(string)*: The UID of the last user in the current page.\n\n**Notes:**\n- A valid API-KEY token is required.\n- If no users are found, an error message is returned with status code 404.","parameters":[{"schema":{"type":"string"},"name":"admin_uid","in":"query","description":"UID of the admin (who created the user) to filter users by.","required":false},{"schema":{"type":"string"},"name":"start_date","in":"query","description":"Lower bound (inclusive) for *last_session* in `YYYY-MM-DD`.","required":false},{"schema":{"type":"string"},"name":"end_date","in":"query","description":"Upper bound (inclusive) for *last_session* in `YYYY-MM-DD`.","required":false},{"schema":{"type":"string","enum":["male","female"]},"name":"gender","in":"query","description":"Filter by gender (`male` or `female`).","required":false},{"schema":{"type":"string"},"name":"preferable_activities","in":"query","description":"JSON array of preferred activities.","required":false},{"schema":{"type":"string"},"name":"start_after_id","in":"query","required":false},{"schema":{"type":"integer"},"name":"limit","in":"query","required":false}],"responses":{"200":{"description":"Successfully retrieved the filtered list of users.","content":{"application/json":{"schema":{"required":["query_count","users","first_uid","last_uid"],"type":"object","properties":{"query_count":{"description":"Total number of users under the admin.","type":"integer"},"users":{"description":"An array of user objects.","type":"array","items":{"required":["created_at","weight","age","ycom","height","phone","leg_length","display_name","shoeSize","email","gender","brand","shoeModel","user_uid"],"type":"object","properties":{"created_at":{"description":"User creation timestamp.","type":"string","format":"date-time"},"weight":{"description":"User's weight.","type":"number"},"age":{"description":"User's age.","type":"string"},"ycom":{"description":"User's YCOM value.","type":"number"},"height":{"description":"User's height.","type":"number"},"phone":{"description":"User's phone number.","type":"string"},"leg_length":{"description":"User's leg length.","type":"number"},"display_name":{"description":"User's display name.","type":"string"},"shoeSize":{"description":"User's shoe size.","type":"string"},"email":{"description":"User's email address.","type":"string","format":"email"},"gender":{"description":"User's gender.","type":"string"},"brand":{"description":"The brand associated with the user.","type":"string"},"shoeModel":{"description":"The model of the user's shoe.","type":"string"},"profile_photo":{"description":"Public URL of the user’s profile photo.","type":"string","format":"uri"},"user_uid":{"description":"Unique identifier for the user.","type":"string"}}}},"first_uid":{"description":"UID of the first user in the current page.","type":"string"},"last_uid":{"description":"UID of the last user in the current page.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Authentication error message.","type":"string"}}}}}},"403":{"description":"Forbidden - The requester does not have admin privileges.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - No users found under the admin or an error occurred during retrieval.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating the issue.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred during retrieval.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"]}}}}
```

## Retrieve Details for a Specific User

> \### Retrieve User Details\
> \
> This endpoint allows an authenticated admin to retrieve detailed information for a specific user under their account. The user is identified by the unique \`user\_uid\` provided in the URL.\
> \
> \*\*Path Parameter:\*\*\
> \- \*\*user\_uid\*\* \*(string, required)\*: The unique identifier of the user.\
> \
> \*\*Response Structure (HTTP 200):\*\*\
> Returns a JSON object with the following fields and data types:\
> \
> \- \*\*created\_at\*\* \*(string, date-time)\*: Timestamp when the user was created.\
> \- \*\*weight\*\* \*(number)\*: The user's weight.\
> \- \*\*age\*\* \*(string)\*: The user's age.\
> \- \*\*ycom\*\* \*(number)\*: The user's YCOM value.\
> \- \*\*height\*\* \*(number)\*: The user's height.\
> \- \*\*phone\*\* \*(string)\*: The user's phone number.\
> \- \*\*leg\_length\*\* \*(number)\*: The user's leg length.\
> \- \*\*display\_name\*\* \*(string)\*: The user's display name.\
> \- \*\*shoeSize\*\* \*(string)\*: The user's shoe size.\
> \- \*\*email\*\* \*(string)\*: The user's email address.\
> \- \*\*gender\*\* \*(string)\*: The user's gender.\
> \- \*\*brand\*\* \*(string)\*: The brand associated with the user.\
> \- \*\*shoeModel\*\* \*(string)\*: The model of the user's shoe.\
> \- \*\*user\_uid\*\* \*(string)\*: The unique identifier for the user.\
> \
> \*\*Example Successful Response:\*\*\
> \`\`\`json\
> {\
> &#x20; "created\_at": "2024-12-02T19:17:30.371Z",\
> &#x20; "weight": 79,\
> &#x20; "age": "30",\
> &#x20; "ycom": 1.1,\
> &#x20; "height": 177,\
> &#x20; "phone": "92039023232",\
> &#x20; "leg\_length": 0.9,\
> &#x20; "display\_name": "User1",\
> &#x20; "shoeSize": "8",\
> &#x20; "email": "<user1@gmail.com>",\
> &#x20; "gender": "Male",\
> &#x20; "brand": "Nike",\
> &#x20; "shoeModel": "Peak-smart",\
> &#x20; "user\_uid": "hoEwsdv2fsFs2fav"\
> }\
> \`\`\`\
> \
> \*\*Notes:\*\*\
> \- A valid API-KEY token with admin privileges is required.\
> \- If the specified user does not exist or is not under the admin, a 404 error is returned.

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/client-management/clients/{user_uid}":{"get":{"operationId":"client-management_clients_read","summary":"Retrieve Details for a Specific User","description":"### Retrieve User Details\n\nThis endpoint allows an authenticated admin to retrieve detailed information for a specific user under their account. The user is identified by the unique `user_uid` provided in the URL.\n\n**Path Parameter:**\n- **user_uid** *(string, required)*: The unique identifier of the user.\n\n**Response Structure (HTTP 200):**\nReturns a JSON object with the following fields and data types:\n\n- **created_at** *(string, date-time)*: Timestamp when the user was created.\n- **weight** *(number)*: The user's weight.\n- **age** *(string)*: The user's age.\n- **ycom** *(number)*: The user's YCOM value.\n- **height** *(number)*: The user's height.\n- **phone** *(string)*: The user's phone number.\n- **leg_length** *(number)*: The user's leg length.\n- **display_name** *(string)*: The user's display name.\n- **shoeSize** *(string)*: The user's shoe size.\n- **email** *(string)*: The user's email address.\n- **gender** *(string)*: The user's gender.\n- **brand** *(string)*: The brand associated with the user.\n- **shoeModel** *(string)*: The model of the user's shoe.\n- **user_uid** *(string)*: The unique identifier for the user.\n\n**Example Successful Response:**\n```json\n{\n  \"created_at\": \"2024-12-02T19:17:30.371Z\",\n  \"weight\": 79,\n  \"age\": \"30\",\n  \"ycom\": 1.1,\n  \"height\": 177,\n  \"phone\": \"92039023232\",\n  \"leg_length\": 0.9,\n  \"display_name\": \"User1\",\n  \"shoeSize\": \"8\",\n  \"email\": \"user1@gmail.com\",\n  \"gender\": \"Male\",\n  \"brand\": \"Nike\",\n  \"shoeModel\": \"Peak-smart\",\n  \"user_uid\": \"hoEwsdv2fsFs2fav\"\n}\n```\n\n**Notes:**\n- A valid API-KEY token with admin privileges is required.\n- If the specified user does not exist or is not under the admin, a 404 error is returned.","parameters":[{"schema":{"type":"string"},"name":"user_uid","in":"path","description":"The unique identifier of the user.","required":true}],"responses":{"200":{"description":"User details retrieved successfully.","content":{"application/json":{"schema":{"required":["created_at","weight","age","ycom","height","phone","leg_length","display_name","shoeSize","email","gender","brand","shoeModel","user_uid"],"type":"object","properties":{"created_at":{"description":"Timestamp when the user was created.","type":"string","format":"date-time"},"weight":{"description":"The user's weight.","type":"number"},"age":{"description":"The user's age.","type":"string"},"ycom":{"description":"The user's YCOM value.","type":"number"},"height":{"description":"The user's height.","type":"number"},"phone":{"description":"The user's phone number.","type":"string"},"leg_length":{"description":"The user's leg length.","type":"number"},"display_name":{"description":"The user's display name.","type":"string"},"shoeSize":{"description":"The user's shoe size.","type":"string"},"email":{"description":"The user's email address.","type":"string","format":"email"},"gender":{"description":"The user's gender.","type":"string"},"brand":{"description":"The brand associated with the user.","type":"string"},"shoeModel":{"description":"The model of the user's shoe.","type":"string"},"profile_photo":{"description":"Public URL of the profile photo.","type":"string","format":"uri"},"user_uid":{"description":"The unique identifier for the user.","type":"string"}}}}}},"400":{"description":"Bad Request - The user UID is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message describing the problem.","type":"string"}}}}}},"401":{"description":"Unauthorized - Missing or invalid token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that authentication failed.","type":"string"}}}}}},"403":{"description":"Forbidden - The requester does not have admin privileges.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating insufficient privileges.","type":"string"}}}}}},"404":{"description":"Not Found - The user is not found or is not under the admin.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Error message indicating that the user was not found.","type":"string"}}}}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"description":"Detailed error message.","type":"string"}}}}}}},"tags":["client-management"]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aikynetix.app/api-documentation/developer-resources-and-api-reference/api-reference/client-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
