Skip to main content

Update Staff

Support avatar
Written by Support
Updated over a year ago

POST [ staff/{people_custom1}

Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/acu/staff/{people_custom1}
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/acu/staff/{people_custom1}

Overview

This endpoint is used to update a staff user’s data for example first_name, last_name, mobile, and many more in the ComplyFlow system.

Authentication instructions

Refer to the Authentication method for Authentication Methods (for Login and Logout).

Permissions Required

The user should poss both below permissions:

  • API User

  • User is Staff

  • Users have View and Edit Staff Permission

  • The user has the same Organisation as the selected Staff

Please also refer to the Permissions Overview guide.

Query parameters

FIELD

TYPE

DESCRIPTION

Example

REQUIRED

DEFAULT

PATTERN

people_custom1

string

Custom ID used to get staff detail data

staff1

YES

[a-zA-Z0-9]

Body properties/Payload

FIELD

TYPE

DESCRIPTION

REQUIRED

first_name

string

Set staff’s first name

No

last_name

string

Set staff’s last name

No

people_custom1

string

Custom ID used to get staff detail data

No

mobile

string

Staff’s mobile phone number without country code (+XX)

(E.g. 123123123)

No

postcode

string

Staff’s address zip code

No

address

string

Staff’s address

No

dob

date

Staff’s date of birth with YYYY-MM-DD Format

(E.g. 2000-01-01)

No

job_title

string

Staff’s job title

No

Request Example

curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/staff/staff1' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]' \
--form 'first_name="staff"' \
--form 'last_name="test"' \
--form 'people_custom1="staffsatu"' \
--form 'mobile="43214321"' \
--form 'postcode="14450"' \
--form 'address="Sana Sini St"' \
--form 'dob="2000-01-01"' \
--form 'job_title="The One"'

Response Example

The API Request returns the status of this API action.

{
"token": "",
"data": {
"success": true
}
}

Response Information

Status

Response

success

status = true

error

status = false

error = 1 of the following

  • people_custom1 not found = "Staff not found"

  • people_custom1 not unique = "Account with the same people_custom1 exists"

error_code (in the same order as the error message above)

  • 4

  • 3

Did this answer your question?