Remove the employee's overtime decision preference (user)
Removes the employee level preference so the company level rule applies again. The row is soft deleted, so a later save creates a fresh one.
Returns 404 when the employee has no preference to remove.
Self service only. The request is rejected with 403 when the authenticated user has no access to the tenant or the employee record is not their own.
HTTP:
bearerAuth
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>
pbx_id
path · string · uuid
*
UUID of the PBX tenant.
employee_id
path · string · uuid
*
UUID of the employee. Must be the authenticated user's own employee record.
accept
header · string
example:
application/jsonResponses
The preference was removed.
Response schema
message*string
example:
Your overtime decision preference has been removed.data*null
meta*object
Everything a client needs to render the preference form without hardcoding the enums: the selectable values with their translated labels, the bounds of the cap, and the values that apply when the employee has never saved a preference.
configured*boolean
Whether an employee level preference row exists. False means `data` is null and the company level rule applies.
example:
1options*object
Selectable values keyed by field name. Each entry maps the stored value to its translated label.
auto_decision_policy*object
Free-form object
preferred_decision*object
Free-form object
rest_policy*object
Free-form object
limits*object
Accepted range for the cap, in both units.
min_seconds*integer · int32
example:
3600max_seconds*integer · int32
example:
115200min_hours*number · float
example:
1max_hours*number · float
example:
32defaults*object
The values the form should start from when `configured` is false.
auto_decision_policystring
example:
skip_if_manual_decisionpreferred_decisionstring
example:
pay_up_torest_policystring
example:
add_to_balancemax_secondsinteger · int32
example:
3600max_hoursnumber · float
example:
1is_activeboolean
example:
1Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example:
Authorization Token is missingThe authenticated user has no access to the requested tenant, or the requested employee record does not belong to the authenticated user.
Response schema
No response body.
The employee was not found, or has no overtime decision preference to remove.
Response schema
message*string
example:
No overtime decision preference has been set for this employee.
delete
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference
Base URL
Request sample
curl -X DELETE 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.delete('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'DELETE',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"message": "Your overtime decision preference has been removed.",
"data": null,
"meta": { … }
"configured": false,
"options": { … },
"auto_decision_policy": { … },
"skip_if_manual_decision": "Skip if manual decision exists",
"force_auto_decision": "Force auto-decision (override manual)",
"force_zero_overtime": "Force zero overtime (not eligible)"
},
"preferred_decision": { … },
"pay_up_to": "Pay up to X hours (specify max time)",
"increment_up_to": "Increment balance up to X hours (specify max time)"
},
"rest_policy": { … }
"add_to_balance": "Add to balance",
"drop": "Drop (ignore remaining hours)"
}
},
"limits": { … },
"min_seconds": 3600,
"max_seconds": 115200,
"min_hours": 1,
"max_hours": 32
},
"defaults": { … }
"auto_decision_policy": "skip_if_manual_decision",
"preferred_decision": "pay_up_to",
"rest_policy": "add_to_balance",
"max_seconds": 3600,
"max_hours": 1,
"is_active": true
}
}
}
{ … }
"error": "Authorization Token is missing"
}
Cache-Control
string
example:
private, must-revalidate
Connection
string
example:
keep-alive
Content-Type
string
example:
application/json
Vary
string
example:
Origin
X-RateLimit-Limit
integer
Max requests allowed in the current rate-limit window.
example:
60
X-RateLimit-Remaining
integer
Requests remaining in the current rate-limit window.
example:
57No example for this status.
No example for this status.