Skip to content

Account Memberships

Each user on an account will have an account membership that describes their relationship to the account. When you add a user to an account, create a new account_membership. When you remove a user from an account, delete their account_membership record.

Fetching a list of Account Memberships

Request

You can request either GET /api/v1/account_memberships.json?only=5 or GET /api/v1/account_memberships/5.json. In both cases, default filters will be applied. Unless you provide the is_active:false filter, you won't receive account membership for inactive users, and will get a 404 status on the "show" route.

This endpoint returns structured Account Membership objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the account_memberships top-level JSON key. Please see our Response Format section for more information.

Query
by_full_namestring

Search account memberships by full name of the user.

by_user_idinteger, (int32)

Only includes account membership for the specified user ID.

can_log_inboolean

Return account memberships based on whether or not the member is allowed to login.

created_afterstring, (date-time)

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_beforestring, (date-time)

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

includestring

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • backup_approver_associations (BackupApproverAssociation) - Retrieves the backup approver associations for the user this account membership is for, which represent a backup time approver for a specific date range. The response will include backup_approver_association_ids, which references the data in the backup_approver_associations top-level key.
  • cost_rates (CostRate) - Retrieves all the cost rates in different currencies for the user this account membership is for. The response will include cost_rate_ids, which references the data in the cost_rates top-level key.
  • default_role (Role) - Retrieves the default role, if any, for this account membership. The response will include default_role_id, which references the data in the roles top-level key.
  • effective_workweek (Workweek) - Retrieves the workweek that is in effect today for the user this account membership is for. The response will include effective_workweek_id, which references the data in the workweeks top-level key.
  • future_billable_utilizations (BillableUtilization) - Retrieves the future billable utilizations for the user this account membership is for. The response will include future_billable_utilization_ids, which references the data in the billable_utilizations top-level key.
  • managees (User) - Retrieves the direct reports of the user this account membership is for. The response will include managee_ids, which references the data in the users top-level key.
  • manager (User) - Retrieves the manager of the user this account membership is for. The response will include manager_id, which references the data in the users top-level key.
  • possible_managees (User) - Retrieves a list of users who can become the direct reports of the user this account membership is for. The response will include possible_managee_ids, which references the data in the users top-level key.
  • possible_managers (User) - Retrieves a list of users who can be set as the manager of the user this account membership is for. The response will include possible_manager_ids, which references the data in the users top-level key.
  • skill_memberships (SkillMembership) - Retrieves the skill memberships for the user this account membership is for, which represent skills assigned to a user. The response will include skill_membership_ids, which references the data in the skill_memberships top-level key.
  • user (User) - Retrieves the user for this account membership. The response will include user_id, which references the data in the users top-level key.
onlystring

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

only_activeboolean

Only includes users with an active membership (disabled_at is null).

only_inactiveboolean

Only includes users with an inactive membership (disabled_at is not null).

optional_fieldsArray of strings

Allows you to request one or more optional fields as an array.

Items Enum:"can_log_in""non_participant"
orderstring

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: bill_rate:asc, bill_rate:desc, cost_rate:asc, cost_rate:desc, created_at:asc, created_at:desc, full_name:asc, full_name:desc, permission:asc, permission:desc, role:asc, role:desc, updated_at:asc, and updated_at:desc.

Default:"created_at:desc"
pageinteger, (int32)
Default:1
per_pageinteger, (int32), <= 200
Default:20
searchstring
updated_afterstring, (date-time)

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_beforestring, (date-time)

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

with_skillsstring

Return only account memberships for users with the specified skills and levels. Provide the skill IDs, level numbers for each skill (if applicable), and whether to filter using AND or OR logic. You can specify multiple skills and multiple levels.

Format as {"ids":[skill_id,skill_id],"skill_id":[level,level],"skill_id":[level],"operation":"<or/and>"} .

Example 1 - Filter by two skills, one which has levels and one which doesn't. Apply AND logic.

{"ids":[234,789],"234":[3,4],"operation":"and"}

Example 2 - Filter by two skills, both of which have levels. Apply OR logic.

{"ids":[123,456],"123":[4,5],"456":[1,2],"operation":"or"}.

with_user_idsstring

Only includes account memberships for the specified user IDs. For example, '1,2,3'.

GET
/account_memberships
curl -i -X GET \
  'https://api.mavenlink.com/api/v1/account_memberships?by_full_name=string&by_user_id=0&can_log_in=true&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&include=string&only=string&only_active=true&only_inactive=true&optional_fields=can_log_in&order=created_at%3Adesc&page=1&per_page=20&search=string&updated_after=2019-08-24T14%3A15%3A22Z&updated_before=2019-08-24T14%3A15%3A22Z&with_skills=string&with_user_ids=string'

Responses

A list of Account Memberships have been retrieved.

Bodyapplication/json
countinteger, (int32)
metaobject
resultsArray of objects
account_membershipsobject
usersobject
rolesobject
workweeksobject
skill_membershipsobject
backup_approver_associationsobject
cost_ratesobject
billable_utilizationsobject
Response
{ "count": 0, "meta": { "count": 0, "page_count": 0, "page_number": 0, "page_size": 0 }, "results": [ { "key": "string", "id": "string" } ], "account_memberships": { "property1": { "backup_approver_association_ids": [ "string" ], "bill_rate_in_cents": 0, "billability_target": 0, "can_create_workspace": true, "can_log_in": true, "can_view_reports": true, "collaborator_only_license": true, "cost_rate_ids": [ "string" ], "cost_rate_in_cents": 0, "created_at": "2019-08-24T14:15:22Z", "default_read_only": true, "default_role_id": "string", "disabled_at": "2019-08-24T14:15:22Z", "effective_workweek_id": "string", "future_billable_utilization_ids": [ "string" ], "is_administrator": true, "is_backup_approver": true, "is_owner": true, "is_project_lead": true, "is_punch_clock_user": true, "managee_ids": [ "string" ], "manager_can_approve": true, "manager_can_edit_skills": true, "manager_id": "string", "non_participant": true, "permission": "string", "possible_managee_ids": [ "string" ], "possible_manager_ids": [ "string" ], "should_show_alert_on_timesheet_submission": true, "skill_membership_ids": [ "string" ], "updated_at": "2019-08-24T14:15:22Z", "user_id": "string" }, "property2": { "backup_approver_association_ids": [ "string" ], "bill_rate_in_cents": 0, "billability_target": 0, "can_create_workspace": true, "can_log_in": true, "can_view_reports": true, "collaborator_only_license": true, "cost_rate_ids": [ "string" ], "cost_rate_in_cents": 0, "created_at": "2019-08-24T14:15:22Z", "default_read_only": true, "default_role_id": "string", "disabled_at": "2019-08-24T14:15:22Z", "effective_workweek_id": "string", "future_billable_utilization_ids": [ "string" ], "is_administrator": true, "is_backup_approver": true, "is_owner": true, "is_project_lead": true, "is_punch_clock_user": true, "managee_ids": [ "string" ], "manager_can_approve": true, "manager_can_edit_skills": true, "manager_id": "string", "non_participant": true, "permission": "string", "possible_managee_ids": [ "string" ], "possible_manager_ids": [ "string" ], "should_show_alert_on_timesheet_submission": true, "skill_membership_ids": [ "string" ], "updated_at": "2019-08-24T14:15:22Z", "user_id": "string" } }, "users": { "property1": { "abbreviated_timezone": "string", "account_membership_id": "string", "bio": "string", "city": "string", "classification": "string", "country": "string", "custom_field_value_ids": [ "string" ], "email_address": "string", "external_reference_ids": [ "string" ], "full_name": "string", "headline": "string", "last_site_activity": "2019-08-24T14:15:22Z", "manager_id": "string", "photo_path": "string", "role_id": "string", "skill_ids": [ "string" ], "skill_membership_ids": [ "string" ], "state": "string", "website": "string", "work_sample_ids": [ "string" ] }, "property2": { "abbreviated_timezone": "string", "account_membership_id": "string", "bio": "string", "city": "string", "classification": "string", "country": "string", "custom_field_value_ids": [ "string" ], "email_address": "string", "external_reference_ids": [ "string" ], "full_name": "string", "headline": "string", "last_site_activity": "2019-08-24T14:15:22Z", "manager_id": "string", "photo_path": "string", "role_id": "string", "skill_ids": [ "string" ], "skill_membership_ids": [ "string" ], "state": "string", "website": "string", "work_sample_ids": [ "string" ] } }, "roles": { "property1": { "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "external_reference_ids": [ "string" ], "name": "string", "updated_at": "2019-08-24T14:15:22Z" }, "property2": { "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "external_reference_ids": [ "string" ], "name": "string", "updated_at": "2019-08-24T14:15:22Z" } }, "workweeks": { "property1": { "created_at": "2019-08-24T14:15:22Z", "default": true, "end_date": "2019-08-24", "friday_minutes": 0, "monday_minutes": 0, "saturday_minutes": 0, "start_date": "2019-08-24", "sunday_minutes": 0, "thursday_minutes": 0, "total_minutes": 0, "tuesday_minutes": 0, "updated_at": "2019-08-24T14:15:22Z", "wednesday_minutes": 0, "workweek_membership_ids": [ "string" ] }, "property2": { "created_at": "2019-08-24T14:15:22Z", "default": true, "end_date": "2019-08-24", "friday_minutes": 0, "monday_minutes": 0, "saturday_minutes": 0, "start_date": "2019-08-24", "sunday_minutes": 0, "thursday_minutes": 0, "total_minutes": 0, "tuesday_minutes": 0, "updated_at": "2019-08-24T14:15:22Z", "wednesday_minutes": 0, "workweek_membership_ids": [ "string" ] } }, "skill_memberships": { "property1": { "cached_skill_name": "string", "created_at": "2019-08-24T14:15:22Z", "creator_id": "string", "level": 0, "max_level": 0, "skill_id": "string", "updated_at": "2019-08-24T14:15:22Z", "user_id": "string" }, "property2": { "cached_skill_name": "string", "created_at": "2019-08-24T14:15:22Z", "creator_id": "string", "level": 0, "max_level": 0, "skill_id": "string", "updated_at": "2019-08-24T14:15:22Z", "user_id": "string" } }, "backup_approver_associations": { "property1": { "approver_id": "string", "backup_approver_id": "string", "end_date": "2019-08-24T14:15:22Z", "start_date": "2019-08-24T14:15:22Z" }, "property2": { "approver_id": "string", "backup_approver_id": "string", "end_date": "2019-08-24T14:15:22Z", "start_date": "2019-08-24T14:15:22Z" } }, "cost_rates": { "property1": { "account_membership_id": 0, "amount_in_subunits": 0, "created_at": "2019-08-24T14:15:22Z", "currency": "string", "in_use": true, "updated_at": "2019-08-24T14:15:22Z" }, "property2": { "account_membership_id": 0, "amount_in_subunits": 0, "created_at": "2019-08-24T14:15:22Z", "currency": "string", "in_use": true, "updated_at": "2019-08-24T14:15:22Z" } }, "billable_utilizations": { "property1": { "account_membership_id": "string", "created_at": "2019-08-24T14:15:22Z", "creator_id": "string", "effective_date": "2019-08-24", "target": 0, "updated_at": "2019-08-24T14:15:22Z" }, "property2": { "account_membership_id": "string", "created_at": "2019-08-24T14:15:22Z", "creator_id": "string", "effective_date": "2019-08-24", "target": 0, "updated_at": "2019-08-24T14:15:22Z" } } }