update_user_preferences

Update preferences for a user.

Input fields

language_code (LanguageCode)

Optional two letter code indicating the user's preferred language.

notification_delivery (NotificationDeliveryInput)

Optional set of notification delivery preferences.

report_last_updated_logo_id (ID)

Optional ID of the logo this user last used on a report.

report_last_updated_paper_size (PaperSize)

The paper size this user last used on a report.

report_last_updated_signature_id (ID)

Optional ID of the signature this user last used on a report.

sentera_id (ID!)

User ID.

unit_system (UnitSystem)

Optional unit system for display of physical quantities.

Return fields

address_1 (String)

User address line 1.

address_2 (String)

User address line 2.

city (String)

User city.

country_code (String!)

User country code (ISO 3166-1).

email (String!)

The email address for the user.

enterprise_license_agreement (Boolean!)

Has this user's employer opted into the enterprise license agreement.

first_name (String!)

The first name of the user.

last_name (String)

The last name of the user.

license_type (UserLicense!)

The type of license currently assigned to the user.

logos (LogosQueryResult)

A list of logos for this user.

Argument Type Description
pagination Pagination!

Paginate the results.

sentera_id ID

Retrieve the logo with the given Sentera ID.

organization (Organization!)

The organization this user belongs to.

organization_maps (JSON!)
Deprecation notice

Please use the organizations query instead to build the organization hierarchy.

A list of organization hierarchies comprised of the user's home organization and any organizations the user is partnered with, returned as a JSON array of hashes. Available keys in each hash are sentera_id (string), name (string) and children (array). This structure is recursive.

phone_number (String)

The phone number for the user.

preferences (UserPreferences!)

The app preferences for this user.

roles ([UserRole!]!)

An array of all of the user's roles.

sentera_id (ID!)

A system-generated key identifying a specific instance of a user.

signatures (SignaturesQueryResult)

A list of signatures for this user.

Argument Type Description
pagination Pagination!

Paginate the results.

sentera_id ID

Retrieve the signature with the given Sentera ID.

state (String)

User state/province/region code (ISO 3166-2).

status (UserStatus!)

The current status of the user.

zip_code (String)

User zip code.

Examples

Update User Preferences

Updates a user's preferences for language_code and unit_system.

Try this example in GraphiQL
mutation UpdateUserPreferences {
  update_user_preferences(
  sentera_id: "2idjv9o_US_bw1kAcmeOrg_CV_prod_9d89c370_190528_170322"
  language_code: PT
  unit_system: METRIC
  ) {
    sentera_id
    preferences {
      language_code
      unit_system
    }
  }
  }

{
  "data": {
  "update_user_preferences": {
    "preferences": {
      "language_code": "PT",
      "unit_system": "METRIC"
    }
  }
  }
}