User Profiles Queries

Query user profiles and their permissions.

CurrentUserProfile - Returns the current authenticated user profile

query {
  CurrentUserProfile {
    id
    user_id
    company_id
    active
    label
    prevent_negative_inventory
    selling_price_level_id
    selling_price_level { id }
    tax_type
    location_id
    location { id }
    account_representative_id
    account_representative { id }
    tax_codes { id }
    employee_id
    employee { id }
    cart_items { id }
    last_accessed_at
    company { id }
    user { id }
    has_booked_call
    impersonating_user_profile { id }
  }
}

UserProfile - Returns a single user profile based on the id provided

query GetUserProfile($id: ID) {
  UserProfile(id: $id) {
    id
    user_id
    company_id
    active
    label
    prevent_negative_inventory
    selling_price_level_id
    selling_price_level { id }
    tax_type
    location_id
    location { id }
    account_representative_id
    account_representative { id }
    tax_codes { id }
    employee_id
    employee { id }
    cart_items { id }
    last_accessed_at
    company { id }
    user { id }
    has_booked_call
    impersonating_user_profile { id }
  }
}
{
  "id": 100012
}

UserProfiles - Returns a list of user profiles based on filters and ordering

query UserProfiles(
  $where: QueryUserProfilesWhereWhereConditions,
  $orderBy: [QueryUserProfilesOrderByOrderByClause!]
) {
  UserProfiles(
    where: $where
    orderBy: $orderBy
  ) {
    id
    user_id
    company_id
    active
    label
    selling_price_level_id
    location_id
    account_representative_id
    employee_id
    last_accessed_at
  }
}
{
  "where": {
    "AND": [
      { "column": "ACTIVE", "operator": "EQ", "value": true }
    ]
  },
  "orderBy": [
    { "column": "ID", "order": "ASC" }
  ]
}

PartnerCompanyUserProfiles - Returns a list of user profiles for partner companies, with filters and ordering

query PartnerCompanyUserProfiles(
  $where: QueryPartnerCompanyUserProfilesWhereWhereConditions,
  $orderBy: [QueryPartnerCompanyUserProfilesOrderByOrderByClause!]
) {
  PartnerCompanyUserProfiles(
    where: $where
    orderBy: $orderBy
  ) {
    id
    user_id
    company_id
    active
    label
    selling_price_level_id
    location_id
    account_representative_id
    employee_id
    last_accessed_at
  }
}
{
  "where": {
    "AND": [
      { "column": "COMPANY_ID", "operator": "EQ", "value": 2001 }
    ]
  },
  "orderBy": [
    { "column": "ID", "order": "ASC" }
  ]
}

Available fields

FieldTypeDescription
idIntUnique identifier of the user profile.
user_idIntAssociated user identifier.
company_idIntAssociated company identifier.
activeBooleanIf true, the user profile is active.
labelStringDisplay label of the user profile.
prevent_negative_inventoryBooleanIf true, prevents negative inventory operations.
selling_price_level_idIntIdentifier of the selected selling price level.
selling_price_levelPriceLevelLinked selling price level entity.
tax_typeTaxTypeTax type for this profile (enum TaxType).
location_idIntIdentifier of the selected location.
locationLocationLinked location entity.
account_representative_idIntIdentifier of the account representative.
account_representativeAccountRepresentativeLinked account representative entity.
tax_codes[TaxCode]Linked tax codes for this profile.
employee_idIntIdentifier of the linked employee.
employeeEmployeeLinked employee entity.
cart_items[CartItem]Items currently in the user's cart.
last_accessed_atDateTimeTimestamp of last access.
permissions[String]Permissions granted to the profile (may be hidden to public).
is_adminBooleanIndicates if the profile has admin rights (may be hidden to public).
companyCompanyLinked company entity.
userUserLinked user entity.
impersonating_user_profileUserProfileCurrently impersonated user profile, if any.
api_tokenObjectAPI token info (may be hidden to public).
has_booked_callBooleanIndicates if a call has been booked.
views[View]Views associated to the profile.

Filters

You can create filters based on following fields

id - Int
Example: { "column": "ID", "operator": "EQ", "value": 100012 }
user_id - Int
Example: { "column": "USER_ID", "operator": "EQ", "value": 42 }
company_id - Int
Example: { "column": "COMPANY_ID", "operator": "EQ", "value": 2001 }
active - Boolean
Example: { "column": "ACTIVE", "operator": "EQ", "value": true }

Sorting

You can sort data based on following fields: id

query SortUserProfiles(
  $where: QueryUserProfilesWhereWhereConditions
) {
  UserProfiles(
    where: $where
    orderBy: [{ column: ID, order: ASC }]
  ) {
    id
    user_id
    company_id
    active
    label
    selling_price_level_id
    location_id
    account_representative_id
    employee_id
    last_accessed_at
  }
}

Example of data returned

{
  "data": {
    "UserProfiles": [
      {
        "id": 100001,
        "user_id": 42,
        "company_id": 2001,
        "active": true,
        "label": "Admin - Company A",
        "prevent_negative_inventory": true,
        "selling_price_level_id": 10,
        "tax_type": "VAT",
        "location_id": 300,
        "account_representative_id": 15,
        "tax_codes": [{ "id": 5001 }],
        "employee_id": 77,
        "cart_items": [{ "id": 90001 }],
        "last_accessed_at": "2025-10-08T09:14:00Z"
      },
      {
        "id": 100002,
        "user_id": 43,
        "company_id": 2002,
        "active": false,
        "label": "User - Company B",
        "selling_price_level_id": 11,
        "location_id": 301,
        "account_representative_id": 16,
        "last_accessed_at": "2025-10-07T17:05:00Z"
      }
    ]
  }
}

TaxType

ValueDescription
exclusiveTax calculated on top of the net price.
inclusiveTax included in the displayed price.