Skip to main content

Add New Staff

Support avatar
Written by Support
Updated over a year ago

POST [ staff/add ]

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

Overview

This endpoint adds a Staff user to the ComplyFlow system (i.e. in an Enterprise Client account).

Authentication instructions

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

Permissions Required

The user should possess the permissions below:

  • API User

  • User is Staff

  • Users have Access to View and Edit Staff Permission

Please also refer to the Permissions Overview guide.

Body properties/Payload

FIELD

TYPE

DESCRIPTION

REQUIRED

username

string

Email used for login

Yes

password

string

Password used for login

Yes

first_name

string

Set staff’s first name

Yes

last_name

string

Set staff’s last name

Yes

people_custom1

string

Custom ID used to get staff detail data

No

mobile

string

Staff’s mobile phone number

(E.g. +62123123123)

Yes

sites

string

Assign staff to desired Site ID with comma delimited

(E.g. 38,41)

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/add' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]' \
--form 'username="cfdemo-sn-staff1@complyflow.com"' \
--form 'password="asdASD123\$"' \
--form 'first_name="Shughi"' \
--form 'last_name="Staff1"' \
--form 'people_custom1="staff1"' \
--form 'mobile="+62123123123"' \
--form 'sites="41"' \
--form 'postcode="14450"' \
--form 'address="Jalan sana sini"' \
--form 'dob="2000-01-01"' \
--form 'job_title="The One"'

Response Example

The API Request returns the status of this API action.

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

Response Information

Status

Response

success

status = true

error

status = false

error = 1 of the following

  • required field not filled = “Please fill in all fields“

  • username already exists = "Account with the same username exists"

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

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

  • 1

  • 2

  • 3

Did this answer your question?