Withdraw a request you raised (user)
Withdraw a request you raised yourself. No body.
One route for all three kinds. v1 spells this three different ways - a POST with the id
in the path for absences, a POST without it for home office, and a PUT setting
status: canceled for corrections - and all three are v1-only, which left the employee
half of the feature straddling two API versions while the validator half did not.
Never a hard delete, and the row you get back is not always the one you sent. What withdrawing means depends on how far the request got:
Absence and home office (absences, home-office):
| State | What happens | Response describes |
|---|---|---|
| Still pending | Cancelled outright, pending approvals dropped | the cancelled request |
| Already approved | A removal request is opened for a validator to decide, because the days are booked and giving them back is itself a decision | the new removal request |
| A pending removal | Revoked, original restored exactly as a validator rejecting the removal would leave it | the restored original |
So read the returned request rather than assuming the id you sent is now cancelled.
status and progress say which branch happened.
Taking back a removal works from either id - the removal's own, or the original's
while it sits at pending_removal. Both answer with the restored original, so a client
can use whichever it is holding.
Corrections (time-point-corrections) take a pending correction only, and answer
400 for anything else.
An accepted correction has already changed the timeline, and undoing it means raising a
reversal correction that a validator approves - a new request with its own decision
behind it, not a withdrawal. v1's PUT .../corrections/{id} raises that reversal
implicitly; this endpoint refuses instead of creating something the caller did not ask
for.
The asymmetry with absence is deliberate: removal is a modelled part of the absence lifecycle, with its own statuses and validator-queue entries, while a correction reversal is a synthesised row - so it stays an explicit act rather than a side effect of cancelling.
Requester only. A validator's way of stopping a request is to reject it, which is recorded against them; withdrawing leaves no decision behind. A validator gets 403 here even on a request they are asked to decide.
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>
absences home-office time-point-corrections application/jsonResponses
absences home-office time-point-correctionsabsencesprogress*object | null
Team lead31waiting_on*array<object>
550e8400-e29b-41d4-a716-446655440031Muller Jonasapproved_by*array<object>
550e8400-e29b-41d4-a716-446655440030Lemaire Faridnext_stepobject | null
HR2steps*array<object>
1Team leadpending active completed bypassed rejectedcompletedApproved by Lemaire Farid11validatorsarray<object>
550e8400-e29b-41d4-a716-446655440030Lemaire Faridpending accepted rejectedacceptedsupervisors*array<object>
550e8400-e29b-41d4-a716-446655440032Weber Inespending accepted rejectedpending1Authorization Token is missinghttps://cockpit.voxbi.com/api/v1/v2/{pbx}/requests/{kind}/{id}/cancel
curl -X POST 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/requests/{kind}/{id}/cancel' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/requests/{kind}/{id}/cancel', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/v2/{pbx}/requests/{kind}/{id}/cancel',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
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",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/v2/{pbx}/requests/{kind}/{id}/cancel', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057