Skip to main content
PUT
Update partner user

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

partnerId
string
required

String, required. The ID of the partner (32-character hex string), as returned in the id field of the partner endpoints. Lookup by externalSourceId is not supported for partners.

UUID without dashes (32-character hex string)

Pattern: ^[0-9a-fA-F]{32}$
userId
string
required

String, required. The user's internal ID (32-character hex string) or its externalSourceId (supports externalId). When a user's internal ID and another user's externalSourceId are the same value, the internal ID takes precedence.

Example:

"8a66aa549e6a3672019e73b79f8e1a7f"

Body

application/json

The properties of a partner user to change. Only the properties in the body are changed: a property that is left out keeps its value, and null clears an optional property. String properties are trimmed, and may be at most 255 characters long. The read-only properties of the response (id, lastInvitationDate, invite, dateCreated, employeeOrganizations) are ignored. At least one known property is required, otherwise 400 NO_KNOWN_JSON_PROPERTIES.

The user must stay linked to the partner: as an administrator of the partner, as an accounting consultant of at least one of its organizations, or as an administrator of at least one of its organizations the user isn't employed by. A change that removes every link answers 400 INVALID_JSON_PROPERTY_VALUE; use DELETE to remove a user.

firstName, lastName, externalSourceId, mobilePhone and language belong to the person behind the user, and the partner role set by isPartnerAdministrator and supportRole belongs to the user's account. When that person is also employed by, administers or consults an organization of another partner, or administers another partner, they are shared with someone else and can't be changed here: a changed value answers 400 INVALID_JSON_PROPERTY_VALUE, while a value sent unchanged is accepted.

firstName
string

String, optional. The first name of the user. Can't be empty or null.

Maximum string length: 255
lastName
string

String, optional. The last name of the user. Can't be empty or null.

Maximum string length: 255
email
string<email>

String, optional. Can't be changed: the email address is the user's login. Accepted only when it equals the user's current email address (case-insensitive), otherwise 400 INVALID_JSON_PROPERTY_VALUE.

Maximum string length: 255
externalSourceId
string | null

String, optional. The user's id in an external system. Must not be used by another user in the client application, otherwise 400 EMPLOYEE_ALREADY_EXISTS. null clears it.

Maximum string length: 255
mobilePhone
string | null

String, optional. The mobile phone number of the user, e.g. +46701234567; it is stored in international format. Must be a valid number that no other user has verified. A number the user has verified for signing in can't be changed (400 INVALID_JSON_PROPERTY_VALUE). null clears it.

Maximum string length: 255
language
string | null

String, optional. The user's language as a language variant, e.g. sv_SE or en_GB. null clears it.

Maximum string length: 255
isPartnerAdministrator
boolean

Boolean, optional. True makes the user an administrator of the partner, with the partner manager role unless supportRole is true. False removes the user from the partner's administrators and its template organizations; the partner roles are then removed too, unless the user administers another partner. Can't be null.

supportRole
boolean

Boolean, optional. True gives a partner administrator the partner support role instead of the partner manager role, false the partner manager role. Can only be true when the user is, or becomes, an administrator of the partner. When left out, a partner administrator keeps its role. Can't be null. Only a caller with a role above partner support may give the partner manager role, otherwise 403.

administratorOrganizations
string[] | null

Array, optional. The partner's organizations the user administers. Each entry is a string holding the organization's internal ID or its externalSourceId (supports externalId). Unlike the create partner user endpoint, organization objects aren't accepted here: an entry that isn't a string answers 400 INVALID_JSON_BODY. The list replaces the user's administrator links to the partner's organizations; an empty list or null removes them all. Every organization must be one of the partner's organizations and not deleted, otherwise 404 ORGANIZATION_NOT_FOUND. Links to other partners' organizations aren't changed.

String. The organization's internal ID or its externalSourceId.

consultantOrganizations
string[] | null

Array, optional. The partner's organizations the user is an accounting consultant of. Each entry is a string holding the organization's internal ID or its externalSourceId (supports externalId). Unlike the create partner user endpoint, organization objects aren't accepted here: an entry that isn't a string answers 400 INVALID_JSON_BODY. The list replaces the user's consultant links to the partner's organizations; an empty list or null removes them all. Every organization must be one of the partner's organizations and not deleted, otherwise 404 ORGANIZATION_NOT_FOUND. Links to other partners' organizations aren't changed.

String. The organization's internal ID or its externalSourceId.

Response

OK — returns the updated user

A user of a partner. Unlike an organization user it is not employed by the partner, so id and externalSourceId are the person's own. A person is a user of the partner when it is an administrator of the partner, an accounting consultant of one of the partner's organizations, or an administrator of one of the partner's organizations without being employed there. Api keys are never returned as users. Every property is always present; properties without a value are null.

id
string
required

UUID without dashes (32-character hex string)

Pattern: ^[0-9a-fA-F]{32}$
externalSourceId
string | null
required

String. The user's id in an external system, unique within the client application. Null when not set.

firstName
string
required

String. The first name of the user.

lastName
string
required

String. The last name of the user.

email
string<email>
required

String. The email address of the user.

mobilePhone
string | null
required

String. The mobile phone number of the user. Null when not set.

language
string | null
required

String. The user's language as a language variant, e.g. sv_SE or en_GB. Null when not set.

lastInvitationDate
string<date-time> | null
required

String, ISO-8601 date-time in UTC. When the user was last invited. Null when never invited.

invite
boolean
required

Boolean. True when the user's account is pending activation, whether or not an invitation was sent; see lastInvitationDate for when the user was last invited.

isPartnerAdministrator
boolean
required

Boolean. True when the user is an administrator of the partner.

supportRole
boolean
required

Boolean. True when the user is an administrator of the partner and has the partner support role; always false when isPartnerAdministrator is false.

dateCreated
string<date-time>
required

String, ISO-8601 date-time in UTC. When the user was created.

administratorOrganizations
object[]
required

Array. The partner's organizations the user is an administrator of, ordered by name. Empty when none.

consultantOrganizations
object[]
required

Array. The partner's organizations the user is an accounting consultant of, ordered by name. Empty when none.

employeeOrganizations
object[]
required

Array. The partner's organizations the user is employed in, ordered by name. Empty when none. Employment alone doesn't make a person a partner user; the list shows it for users who are also linked in one of the ways above.