Update Users

PUT /users

This API call is used to update all fields of existing users.

Note:

  • The following fields are not updatable: userName, password, userAccess.AccessAutomation, userAccess.AccessCertification, userAccess.AccessComplete, userAccess.AccessOperationalMatching.
  • A limit of 1000 user records are allowed per request to allow processing within request timeout value.
application/json

Body Required

  • userName string Required

    The username of the user.

  • name object Required
    Hide name attributes Show name attributes object
    • firstName string Required

      The first name of the user.

      Maximum length is 32. Format should match the following pattern: ^(\w|\s|'|-)+$.

    • The middle name of the user.

      Maximum length is 32.

    • lastName string Required

      The last name of the user.

      Maximum length is 32. Format should match the following pattern: ^(\w|\s|\'|-)+$.

    • displayName string Required

      The display name of the user.

      Maximum length is 50.

  • email string Required

    The email address must be unique within the system and adhere to the email format requirements.

    Maximum length is 128. Format should match the following pattern: ^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,})$.

  • The phone number of the user.

    Maximum length is 20.

  • roles array[object]
    One of:
  • Hide userAccess attributes Show userAccess attributes object
    • Specifies whether the user has read only access to R2R Console. Value must be JSON boolean and not string.

    • r2RAdmin boolean

      Specifies whether the user has admin access to R2R Console. Value must be JSON boolean and not string.

    • r2rEnabled boolean

      Specifies whether the user has access to R2R Console. Value must be JSON boolean and not string.

    • Specifies whether the user has access to Close. Value must be JSON boolean and not string.

    • Specifies whether the user has access to Compliance. Value must be JSON boolean and not string.

  • This value must be a department code configured in Certification.

    Maximum length is 15.

  • This value must be a location code configured in Certification.

    Maximum length is 15.

  • This value must be a program admin role configured in Certification.

    Maximum length is 15.

  • lockedOut boolean

    Indicates whether the user is locked out from accessing the system.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • Number of users processed from request.

    • Number of users successfully processed.

    • Number of users failed to process.

    • successResults array[object]

      Success result details.

      Hide successResults attributes Show successResults attributes object
    • failedResults array[object]

      Failed result details.

      Hide failedResults attributes Show failedResults attributes object
  • 400 application/json

    Failed Response

    Hide response attributes Show response attributes object
    • Number of users processed from request.

    • Number of users successfully processed.

    • Number of users failed to process.

    • successResults array[object]

      Success result details.

      Hide successResults attributes Show successResults attributes object
    • failedResults array[object]

      Failed result details.

      Hide failedResults attributes Show failedResults attributes object
  • 401 application/json

    Authentication Error. Invalid credentials.

    Hide response attributes Show response attributes object
  • Authorization Error. Invalid role for request.

PUT /users
curl \
 --request PUT 'https://localhost:8080/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[{"name":{"lastName":"User1","firstName":"Test","middleName":"A","displayName":"Test User1"},"email":"testuser1@localhost.local","roles":[{"type":"Close","value":"CloseAdmin"},{"type":"Certification","value":"Reconciler"},{"type":"Certification","value":"ProgramAdmin"},{"type":"JournalEntry","value":"Preparer"}],"userName":"testuser1","locationId":"Americas","userAccess":{"r2RAdmin":false,"r2REnabled":true,"accessClose":true,"r2RReadOnly":true,"accessCompliance":true},"phoneNumber":"555-555-5555","departmentId":"SALES","programAdminId":"Admin"},{"name":{"lastName":"User2","firstName":"Test","middleName":"A","displayName":"Test User2"},"email":"testuser2@localhost.local","userName":"testuser2"}]'
Request example
[
  {
    "name": {
      "lastName": "User1",
      "firstName": "Test",
      "middleName": "A",
      "displayName": "Test User1"
    },
    "email": "testuser1@localhost.local",
    "roles": [
      {
        "type": "Close",
        "value": "CloseAdmin"
      },
      {
        "type": "Certification",
        "value": "Reconciler"
      },
      {
        "type": "Certification",
        "value": "ProgramAdmin"
      },
      {
        "type": "JournalEntry",
        "value": "Preparer"
      }
    ],
    "userName": "testuser1",
    "locationId": "Americas",
    "userAccess": {
      "r2RAdmin": false,
      "r2REnabled": true,
      "accessClose": true,
      "r2RReadOnly": true,
      "accessCompliance": true
    },
    "phoneNumber": "555-555-5555",
    "departmentId": "SALES",
    "programAdminId": "Admin"
  },
  {
    "name": {
      "lastName": "User2",
      "firstName": "Test",
      "middleName": "A",
      "displayName": "Test User2"
    },
    "email": "testuser2@localhost.local",
    "userName": "testuser2"
  }
]
Response examples (200)
{
  "sucessCount": 1,
  "failureCount": 1,
  "failureResults": [],
  "successResults": [
    {
      "id": "f1666d0e-b1ff-4367-b678-ca711623715c",
      "action": "Updated",
      "username": "testuser1"
    },
    {
      "id": "b8c7fd11-10b5-454d-93a4-c854fcdaae81",
      "action": "Updated",
      "username": "testuser2"
    }
  ],
  "totalProcessed": 2
}
Response examples (400)
{
  "sucessCount": 0,
  "failureCount": 2,
  "failureResults": [
    {
      "messages": [
        "Invalid value for DepartmentId. Allowable values: ENG, SALES."
      ],
      "username": "testuser1"
    },
    {
      "messages": [
        "Invalid value for LocationId. Allowable values: Americas, APAC, CON, Corporate, EMEA, Europe."
      ],
      "username": "testuser2"
    }
  ],
  "successResults": [],
  "totalProcessed": 2
}
Response examples (401)
{
  "code": "900901",
  "message": "Invalid Credentials",
  "description": "Access failure for API: /api/admin/v1.1.0, version: v1.1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"
}