# Partially update a user

Endpoint: PATCH /buyers/{buyerID}/users/{userID}
Version: 1.0.445.36017
Security: OAuth2

## Path parameters:

  - `buyerID` (string, required)
    ID of the buyer.

  - `userID` (string, required)
    ID of the user.

## Request fields (application/json):

  - `ID` (string)

  - `Username` (string)
    Must be unique across all organizations.

  - `Password` (string)

  - `FirstName` (string)

  - `LastName` (string)

  - `Email` (string)

  - `Phone` (string)

  - `TermsAccepted` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Active` (boolean)
    If false, authentication is prohibited.

  - `xp` (object)
    Example: {}

## Response 200 fields (application/json):

  - `FailedLoginAttempts` (integer)
    Number of times the user failed authentication due to incorrect password since last successful attempt, or since being unlocked.

  - `ID` (string)

  - `CompanyID` (string)

  - `Username` (string)
    Must be unique across all organizations.

  - `Password` (string)

  - `FirstName` (string)

  - `LastName` (string)

  - `Email` (string)

  - `Phone` (string)

  - `TermsAccepted` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Active` (boolean)
    If false, authentication is prohibited.

  - `xp` (object)
    Example: {}

  - `AvailableRoles` (array)
    List of roles currently available to the user via all security profile assignments.
    Example: [""]

  - `Locale` (object)
    Most specific locale assigned to the user, if any.
    Example: {"ID":"","OwnerID":"","Currency":"","Language":""}

  - `Locale.ID` (string)

  - `Locale.OwnerID` (string)
    ID of the organization that owns the Locale. Only the marketplace owner can override the OwnerID on create.

  - `Locale.Currency` (string)
    We recommend using ISO-4217 currency codes for compatibility with tax and payment processors.

  - `Locale.Language` (string)
    We recommend using ISO-639 language code - ISO-3166 Country code (e.g. en-US).

  - `DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `LastActive` (string)
    Accurate within a few minutes. Includes impersonation activity.
    Example: "2018-01-01T00:00:00-06:00"

  - `PasswordLastSetDate` (string)
    Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules.
    Example: "2018-01-01T00:00:00-06:00"

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


