Get deduction
Retrieve a single driver deduction record by ID, including deduction type, amount, frequency, effective dates, and the driver settlement it applies to.
curl --request GET \
--url https://integrations.alvys.com/api/p/v{version}/deductions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', 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.get(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 => "GET",
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("GET", 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.get("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 or query:| Parameter | Type | Required | Description |
|---|---|---|---|
| version | String | Yes | The API version to use. |
| id | String | Yes | The unique identifier (Id) of the deduction to retrieve. |
Example CURL Request
curl --location 'https://integrations.alvys.com/api/p/v1/deductions/00000000-dd44-0000-0000-8a1fa91b607a' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Response Body Parameters
The following parameters are included in the response body:| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | String | Yes | The unique identifier of the deduction. |
| Type | String | Yes | Type of record: "Deduction", or "Credit" for a driver credit created through Create driver credit. |
| GroupId | String | Yes | Group ID if the deduction belongs to a recurring group or rule. |
| Description | String | Yes | Description of the deduction. |
| Category | String | Yes | Deduction category (e.g., Fuel, Advance, Drug Test). |
| Amount.Amount | Number | Yes | Deduction amount (negative for deductions). |
| Amount.Currency | Integer | Yes | ISO numeric currency code (e.g., 840 for USD). |
| DriverId | String | Conditionally | The Driver ID linked to the deduction. |
| TruckId | String | Conditionally | The Truck ID linked to the deduction. |
| OwnerOperatorId | String | No | The Owner Operator ID of the truck or driver. |
| Date | String (Date) | Yes | The effective date of the deduction (date only, without time). |
| IsPaid | Boolean | No | Indicates whether the deduction has been paid. |
| CreatedAt | String (Date-Time) | No | Timestamp when the deduction was created (UTC). |
| CreatedBy | String | No | Client ID or User ID of the person who created the deduction. |
| ExternalId | String | No | The ExternalId the record was created with, or null when none was supplied. On a deduction this is a plain caller-supplied reference id; on a driver credit (Type “Credit”) it is the idempotency key from Create driver credit. Deductions generated from asset maintenance records carry an internal asset-maintenance:-prefixed value here. |
Example Response
{
"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
}
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 GET \
--url https://integrations.alvys.com/api/p/v{version}/deductions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', 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.get(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 => "GET",
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("GET", 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.get("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>"
}