Clock In

Requires authentication

HTTP Request

POST connector/api/clock-in

Body Parameters

Parameter Type Status Description
user_id integer required id of the user
clock_in_time string optional Clock in time.If not given current date time will be used Fromat: Y-m-d H:i:s
clock_in_note string optional Clock in note.
ip_address string optional IP address.

Example request:

curl -X POST \
"http://erp.dstadvertising.com/connector/api/clock-in" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"user_id":1,"clock_in_time":"2000-06-13 13:13:00","clock_in_note":"et","ip_address":"unde"}'

Example response (200):

{
"success": true,
"msg": "Clocked In successfully",
"type": "clock_in"
}

javascript

const url = new URL(
"http://erp.dstadvertising.com/connector/api/clock-in"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 1,
"clock_in_time": "2000-06-13 13:13:00",
"clock_in_note": "et",
"ip_address": "unde"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));