Delete deduction
Delete a driver deduction record by ID through the Alvys Public API, removing the deduction from payroll settlements and future driver pay statements.
curl --request DELETE \
--url https://integrations.alvys.com/api/p/v{version}/deductions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/deductions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/deductions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/deductions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/deductions/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://integrations.alvys.com/api/p/v{version}/deductions/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"Id": "<string>",
"Type": "<string>",
"GroupId": "<string>",
"Description": "<string>",
"Category": "<string>",
"Amount": {
"Amount": 123,
"Currency": 123
},
"Date": "2023-11-07T05:31:56Z",
"IsPaid": true,
"CreatedAt": "2023-11-07T05:31:56Z",
"DriverId": "<string>",
"TruckId": "<string>",
"OwnerOperatorId": "<string>",
"CreatedBy": "<string>",
"ExternalId": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}Request Parameters
The following parameters are required in the URL path:| Parameter | Type | Required | Description |
|---|---|---|---|
| version | String | Yes | The API version to use. |
| id | String | Yes | The unique identifier (Id) of the deduction to delete. |
Permissions Required
Only users or client credentials with Delete access to the Deductions resource can perform deletions. If the API client lacks sufficient privileges, a403 Forbidden response will be returned.
Example CURL Request
curl --location --request DELETE 'https://integrations.alvys.com/api/p/v1/deductions/3243fdfd-7403-0000-b8ea-e028cd36e7d7' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Example Response (Success)
{
"Id": "00000000-dd44-0000-0000-8a1fa91b607a",
"Type": "Deduction",
"GroupId": "344571de-57b4-4163-a0cc-d7981fa65994",
"Description": "Drug Test Fee",
"Category": "Drug Test",
"Amount": {
"Amount": -50,
"Currency": 840
},
"DriverId": "DR2517534557938191",
"OwnerOperatorId": "DR25165000003445290",
"Date": "2025-10-07",
"IsPaid": false,
"CreatedAt": "2025-10-09T08:30:54.873Z",
"CreatedBy": "MhAeS5345435fbvccvbfUdTdXOMgVSGyp",
"ExternalId": null
}
Example Response (Error)
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Not Found",
"status": 404,
"traceId": "00-2ea901xgrtg4et43ab20a37057df4c54-8fe88954ae45a964-01"
}
Versioning
Theversion parameter in the URL path specifies which version of the API you are using.
Including the version number ensures that your integration remains stable as the API evolves.
For more details, refer to the Versioning page.
Rate Limits
All endpoints are subject to standard rate limits to ensure consistent API performance. For details, see the Rate Limits section.Authorizations
OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.
Path Parameters
API version (e.g., 1.0)
"1.0"
Response
OK
Show child attributes
Show child attributes
The ExternalId stored with this record, or null when none was supplied. On a driver credit (Type "Credit") this is the idempotency key from POST /credits/driver. On a deduction, it is a plain caller-supplied reference id with no uniqueness enforcement. Also carries an internal asset-maintenance:-prefixed value for deductions generated from asset maintenance records.
curl --request DELETE \
--url https://integrations.alvys.com/api/p/v{version}/deductions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/deductions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/deductions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/deductions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/deductions/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://integrations.alvys.com/api/p/v{version}/deductions/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"Id": "<string>",
"Type": "<string>",
"GroupId": "<string>",
"Description": "<string>",
"Category": "<string>",
"Amount": {
"Amount": 123,
"Currency": 123
},
"Date": "2023-11-07T05:31:56Z",
"IsPaid": true,
"CreatedAt": "2023-11-07T05:31:56Z",
"DriverId": "<string>",
"TruckId": "<string>",
"OwnerOperatorId": "<string>",
"CreatedBy": "<string>",
"ExternalId": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}