TrackingTime API

Teams

Since we introduced multi-account support, a user can belong to multiple accounts. The relation between an account and a user is called a Team. This section describes how to manage teams through the API.

Attributes

Type Attribute Description Required
Integer account_id The id of the team account YES
String company The company name of the team account YES
String status The user status within this team: [REGISTERED | INVITED | VERIFIED] YES
String role The role of the user in this team: [ADMIN | PROJECT_MANAGER | CO_WORKER]. Default: CO_WORKER YES
Boolean is_archived Indicates whether the user is archived in this team or not. NO
Boolean is_freelance Indicates whether the user is freelance in this team or not. NO
Boolean is_selected Indicates whether the current team is active in the current user session. Default: false NO
Boolean is_default Flag used to determine if the team is the user's default preference. Default: false NO
Boolean can_edit_time_entries If true, a co-worker can manually add and edit his own time entries. Default: false NO
Boolean can_edit_projects_and_tasks If true, a co-worker can edit project details and tasks assigned to other project members. Default: false NO
Boolean can_view_time_entries_from_others If true, a co-worker can view time entries from other users. Default: false NO
Boolean can_view_others If true, a co-worker can view time entries, tasks and projects from other users. Default: false NO

JSON Object


  {
    "account_id": 5,
    "company": "EstadoDigital",
    "status": "INVITED",
    "role": "CO_WORKER",
    "is_archived": false,
    "is_freelance": false,
    "active": false,
    "id": null,
    "created_at": null,
    "updated_at": null
  }
                

Available Endpoints

List Teams

List all teams the session user belongs to.

Action URL

/teams

JSON Object

{"response":{"status":200,"message":"Request completed successfully."},"data":[
  {
    "account_id": 2,
    "company": "Muen Solutions",
    "status": "VERIFIED",
    "role": "ADMIN",
    "is_archived": false,
    "is_freelance": false,
    "is_selected": false,
    "is_default": true,
    "id": null,
    "created_at": null,
    "updated_at": null
  },
  {
    "account_id": 5,
    "company": "EstadoDigital",
    "status": "INVITED",
    "role": "CO_WORKER",
    "is_archived": false,
    "is_freelance": false,
    "is_selected": false,
    "is_default": false,
    "id": null,
    "created_at": null,
    "updated_at": null
  }
]}

Switch Team

Switch to another team in the current user session.

Action URL

/teams/switch

Type Attribute Description Required
Integer account_id The id of the account you want to switch to YES

Add Team

Add a new account using the same email address.

Action URL

/teams/add

Type Attribute Description Required
YES

Update Team

Update team settings.

Action URL

/teams/update/:id

Type Attribute Description Required
Boolean can_edit_time_entries If true, a co-worker can manually add and edit his own time entries. Default: false NO
Boolean can_edit_projects_and_tasks If true, a co-worker can edit project details and tasks assigned to other project members. Default: false NO
Boolean can_view_time_entries_from_others If true, a co-worker can view time entries from other users. Default: false NO
Boolean can_view_others If true, a co-worker can view time entries, tasks and projects from other users. Default: false NO

Leave Team

Remove yourself from one of your teams.

Action URL

/teams/leave

Type Attribute Description Required
YES

Remove User from Team

Permanently remove a user from your team

Action URL

/teams/add

Type Attribute Description Required
YES