StaffEdit

StaffAdd (
    object Staff,
    bool InviteUser,
    bool WebhookEvaluate
)

Edit a staff user.

Note: available since RPM23.

Request

Request Data:

  • (bool) InviteUser (optional, default: false) – whether to send an email to the new user so they can finish setting up their account.
  • (bool) WebhookEvaluate (optional, default: false) – whether RPM should issue webhook requests
  • (object) Staff (required) – the data for the user
    • (int) StaffID (required) – identify the staff user to modify
    • (bool) Enabled (optional, default: false) – whether the user can login
    • (int) RoleID (required) – identify the role to assign to the user
    • (array) Groups (optional) – a list of staff groups following structure:
      • (int) ID (optional) – the group ID.
    • (object) Contact (required) – contact an user information:
      • (string) Salutation (optional) – one of “Mr.”, “Ms.” or “Dr.”
      • (string) FirstName (required) – the person’s name
      • (string) LastName (required) – the person’s last name
      • (string) Title (optional) – the person’s title
      • (string) Email (required) – the person’s email
      • (array) PhoneNumbers (optional) – a list of up to 4 phone numbers, each using the following structure:
        • (string) Number (optional) – the phone number.
        • (enum) Type (optional) – number indicating the type phone number it is: 1-Business, 2-Home, 3-Fax, 4-Other. There cannot be repeated types.
    • (array) Fields (optional) – a list of basic fields to fill in, each using the following structure:
      • (string) Field (optional) – the field name.
      • (string) Value (optional) – the field value.
{
	"InviteUser": <bool>,
	"WebhookEvaluate": <bool>,
	"Staff": {
        "StaffID": <int>,
		"Enabled": <bool>,
		"RoleID": <int>,
		"Groups": [
            {
				"ID": <int>
			}, // ... more groups
		],
		"Contact": {
			"Salutation": <string>,
			"FirstName": <string>,
			"LastName": <string>,
			"Title": <string>,
			"Email": <string>,
			"PhoneNumbers": [
                {
                    "PhoneNumberID": <int>,
                    "Type": <enum 1=Business, 2=Home, 3=Fax, 6=Other>,
                    "Number": <string>
                }, // ... 3 more (1 per Type)
			]
		},
		"Fields": [
            {
				"Field": <string>,
				"Value": <string>
			},  // ... more fields
		]
	}
}

Response

{
    "Result": {
        "Username": <string>,
        "UserID": <int>,
        "Enabled": <bool>,
        "StaffID": <int>,
        "Name": <string>,
        "RoleID": <int>,
        "Role": <string>,
        "Groups": [],
        "Added": <string>,
        "Contact": {
            "ContactID": <int>,
            "Salutation": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "Title": <string>,
            "Email": <string>,
            "PhoneNumbers": [
                {
                    "PhoneNumberID": <int>,
                    "Type": <int>,
                    "Number": <string>
                }
            ]
        },
        "Fields": []
    }
}

Errors

  • “Staff not found”
  • “RoleID is required”
  • “Contact.FirstName is required”
  • “Contact.LastName is required”
  • “Invite requires an email address”
  • “Edit super user by API is not allowed”
  • “Edit locked user by API is not allowed”
  • “Edit guest user by API is not allowed”
%d bloggers like this: