Company Profile

Retrieve Company Profile

get

Retrieve the authenticated user’s company profile

Usage Example

curl -H "Authorization: API-KEY <ID-Token>" \
     -X GET https://api.example.com/company-profile/

Response Structure

  • companyName (string, required) – Official name of the company.

  • ownerName (string) – Full name of the company owner.

  • role (string) – Role/position of the current user within the company.

  • measurement (string) – Preferred measurement system (e.g. metric).

  • companyLogo (string, URI) – Public URL of the logo stored in Firebase.

Notes

  • Requires a valid Firebase ID token in the Authorization header.

  • Returns 404 if no profile document exists for the user.

Authorizations
AuthorizationstringRequired

Enter your bearer token (Firebase auth) in the format: Bearer

Responses
chevron-right
200

Company profile retrieved successfully.

application/json
get
/company-profile/

Create / Replace Company Profile

post

Create a new company profile or replace an existing one

Accepted Content-Types

  • application/json – Supply profile fields directly as JSON.

  • multipart/form-data – Use when uploading a companyLogo file.

Usage Example (JSON)

curl -H "Authorization: API-KEY <ID-Token>" \
     -H "Content-Type: application/json" \
     -d '{"companyName":"Apple Inc.","ownerName":"Mario Rossi"}' \
     -X POST https://api.example.com/company-profile/

Usage Example (Multipart)

curl -H "Authorization: API-KEY <ID-Token>" \
     -F companyName="Apple Inc." \
     -F [email protected] \
     -X POST https://api.example.com/company-profile/

Response Structure (201)

  • companyName (string) – Official name of the company.

  • ownerName (string) – Full name of the company owner.

  • role (string) – Role of the current user in the company.

  • companyLogo (string, URI) – Public URL of the uploaded logo.

Notes

  • companyName, ownerName, and role are required.

  • If a profile already exists, fields are merged (not overwritten entirely).

Authorizations
AuthorizationstringRequired

Enter your bearer token (Firebase auth) in the format: Bearer

Body
companyLogostringOptional

Optional. Image file (jpeg/png).

companyNamestringOptional

Required (POST) – Company name (text field).

ownerNamestringOptional

Full name of the owner (text field).

rolestringOptional

Role of the current user (text field).

measurementstringOptional

Preferred measurement system (metric / imperial).

Responses
post
/company-profile/

Update Company Profile

patch

Partially update one or more profile fields

Accepted Content-Types

  • application/json

  • multipart/form-data (for logo replacement)

Usage Example (clear logo)

curl -H "Authorization: API-KEY <ID-Token>" \
     -H "Content-Type: application/json" \
     -d '{"companyLogo":""}' \
     -X PATCH https://api.example.com/company-profile/

Usage Example (replace logo)

curl -H "Authorization: API-KEY <ID-Token>" \
     -F companyLogo=@new_logo.png \
     -X PATCH https://api.example.com/company-profile/

Response Structure (200)

  • companyName (string) – Official name of the company.

  • ownerName (string) – Full name of the company owner.

  • role (string) – Role of the current user in the company.

  • companyLogo (string, URI) – Public URL of the updated logo.

Notes

  • Only the supplied fields are modified; unspecified fields remain unchanged.

  • Providing an empty string ("") for companyLogo removes the logo.

Authorizations
AuthorizationstringRequired

Enter your bearer token (Firebase auth) in the format: Bearer

Body
companyLogostringOptional

Optional. Image file (jpeg/png).

companyNamestringOptional

Required (POST) – Company name (text field).

ownerNamestringOptional

Full name of the owner (text field).

rolestringOptional

Role of the current user (text field).

measurementstringOptional

Preferred measurement system (metric / imperial).

Responses
chevron-right
200

Profile updated successfully.

application/json
patch
/company-profile/

Retrieve Organization Status

get

Retrieve Organization Status

This endpoint allows an authenticated user (admin or sub-admin) to retrieve organization status details. The response includes various details such as the session number, user UID, role, payment type, and associated activities.

Response Structure (HTTP 200):

  • session_number (integer): The number of sessions associated with the organization.

  • uid (string): The unique identifier of the authenticated user.

  • role (string): The role of the user, which can be either admin or sub_admin.

  • payment_type (string): The type of payment plan for the organization.

  • activity (array of strings): A list of activities associated with the organization.

  • companyName (string or null): The name of the company, if available.

  • name (string or null): The name of the user.

Example Successful Response:

{
  "session_number": 50,
  "uid": "aB3xYz1PqW8LmTnK4R9VfJ0gHsCd",
  "role": "admin",
  "payment_type": "Enterprise",
  "activity": ["Running", "Weightlifting", "VerticalJump", "MobilityAssessment"],
  "companyName": "Apple",
  "name": "Username"
}

Notes:

  • A valid API-KEY token is required to access this endpoint.

  • If the organization status is not found or the data is invalid (e.g. missing session_number), a 404 error is returned.

Authorizations
AuthorizationstringRequired

Enter your bearer token (Firebase auth) in the format: Bearer

Responses
chevron-right
200

Organization status details retrieved successfully.

application/json
get
/company-profile/organization-status/

Last updated

Was this helpful?