Skip to main content

Update Competency (Online Training)

Support avatar
Written by Support
Updated over 6 months ago

POST [ staff/{people_custom1}/complete-training ]

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

Overview

This endpoint adds a competency (online training) to a staff user in the current Organisation in the ComplyFlow system.

{people_custom1} can be renamed to any parameter for the account that makes sense, e.g. Internal Staff ID

Authentication instructions

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

Permissions Required

The user will require the permissions below:

  • 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]

The Custom ID needs to be configured on each Staff User’s profile - the ID needs to be unique

Body properties/Payload

FIELD

TYPE

DESCRIPTION

REQUIRED

id_training_course

integer

Training Course ID

Yes

result_from

date

Date of training course result from (DD-MM-YYYY)

No

valid_to

date

Date of training course valid to (DD-MM-YYYY)

Yes

Request Example

curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/staff/shughi/complete-training' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]' \
--form 'id_training_course="103"' \
--form 'valid_to="03-09-2024"'


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"

  • id_training_course not found = "Training course not found"

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

  • 4

  • 10

Did this answer your question?