Create a timepoint correction for an employee, edit alias (user)
Back-compat alias of POST .../corrections/edit. Prefer the explicit
intent endpoints: /corrections/add (add a missing timepoint),
/corrections/edit (amend an existing one), /corrections/delete (remove
one).
Creates a pending Tempus time point correction for the authenticated
employee. A correction always amends an existing time point, so
timepoint_id is required and must reference one of the employee's own
time points in this tenant. On acceptance the referenced time point is
updated in place (no duplicate). A null new_time requests removal of
that time point.
Any earlier pending correction for the same timepoint_id is automatically
canceled before the new one is created. Pending validator approvals are
generated after the correction is persisted.
The created correction is returned as a single object serialized by the
StoreUserCorrectionResource (not wrapped in a data envelope). Server-set
fields such as pbx_id, employee_id, the resolved old values, and
status are not accepted in the request body.
User bearer token. Default authentication for customer-facing endpoints.
Obtain a token by calling POST /login with your credentials, then send it
on every subsequent request as Authorization: Bearer <token>. The token
inherits the permissions and PBX scope of the authenticated user.
- HTTP Authorization Scheme
bearer- Bearer format
Bearer <token>
Request body · required
550e8400-e29b-41d4-a716-446655440002550e8400-e29b-41d4-a716-446655440004550e8400-e29b-41d4-a716-446655440005550e8400-e29b-41d4-a716-4466554400102024-03-01 08:30:00Forgot to clock in after lunch break.Corrected start time per manager approval.Responses
550e8400-e29b-41d4-a716-446655440000550e8400-e29b-41d4-a716-446655440001550e8400-e29b-41d4-a716-446655440002550e8400-e29b-41d4-a716-446655440003550e8400-e29b-41d4-a716-446655440004550e8400-e29b-41d4-a716-446655440005550e8400-e29b-41d4-a716-446655440006550e8400-e29b-41d4-a716-446655440007550e8400-e29b-41d4-a716-446655440010550e8400-e29b-41d4-a716-446655440011old_locationobject | null
550e8400-e29b-41d4-a716-446655440011HQ Luxembourg49.60086.133150new_locationobject | null
550e8400-e29b-41d4-a716-446655440010Remote office49.6126.132002024-03-01T09:00:00.000000Z2024-03-01T08:30:00.000000ZForgot to clock out at the end of the shift.Manual entry approved by supervisor.pending accepted rejected canceled rejected_closedpending2024-03-01T08:29:07.000000Z2024-03-01T08:29:07.000000Z10accepted_by*array<object>
550e8400-e29b-41d4-a716-446655440004pending accepted rejectedpendingtimepointobject
550e8400-e29b-41d4-a716-446655440002550e8400-e29b-41d4-a716-446655440001550e8400-e29b-41d4-a716-446655440003550e8400-e29b-41d4-a716-4466554400042024-03-01T08:30:00.000000Zlegacy-tp-10293statusobject
550e8400-e29b-41d4-a716-446655440004550e8400-e29b-41d4-a716-446655440001Workingla la-briefcase#ffffff#2e7d32status-working0 101clock_inlegacy-status-7substatusesarray<object>
550e8400-e29b-41d4-a716-446655440005550e8400-e29b-41d4-a716-446655440001Client meetingla la-users#000000#bbdefbsubstatus-meeting0 10Authorization Token is missingmessagearray<string>
The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/corrections
curl -X POST 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/corrections' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"timepoint_id":"550e8400-e29b-41d4-a716-446655440002","new_status_id":"550e8400-e29b-41d4-a716-446655440004","new_location_id":"550e8400-e29b-41d4-a716-446655440010","new_time":"2024-03-01 08:30:00","correction_comment":"Forgot to clock in after lunch break."}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/corrections', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"timepoint_id": "550e8400-e29b-41d4-a716-446655440002",
"new_status_id": "550e8400-e29b-41d4-a716-446655440004",
"new_location_id": "550e8400-e29b-41d4-a716-446655440010",
"new_time": "2024-03-01 08:30:00",
"correction_comment": "Forgot to clock in after lunch break."
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/corrections',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"timepoint_id": "550e8400-e29b-41d4-a716-446655440002",
"new_status_id": "550e8400-e29b-41d4-a716-446655440004",
"new_location_id": "550e8400-e29b-41d4-a716-446655440010",
"new_time": "2024-03-01 08:30:00",
"correction_comment": "Forgot to clock in after lunch break."
}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
'content' => '{
\"timepoint_id\": \"550e8400-e29b-41d4-a716-446655440002\",
\"new_status_id\": \"550e8400-e29b-41d4-a716-446655440004\",
\"new_location_id\": \"550e8400-e29b-41d4-a716-446655440010\",
\"new_time\": \"2024-03-01 08:30:00\",
\"correction_comment\": \"Forgot to clock in after lunch break.\"
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/corrections', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057