Added
New Endpoints for Managing Deductions
about 2 months ago
What’s New?
A new Deductions module has been added to the Alvys Public API. These endpoints allow integrations to create, search, retrieve, and delete deduction records associated with drivers or trucks. A deduction represents an asset-specific financial adjustment (e.g., drug test fees, fuel advances, or reimbursements) and is always linked to a specific DriverId or TruckId, but never both.
At this stage, only one-time (Once) deductions are supported.
What Changed?
New endpoints:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/p/v{version}/deductions/{id} | Retrieves a deduction by its unique ID. |
POST | /api/p/v{version}/deductions/search | Searches deductions by date, driver, truck, or owner operator. |
POST | /api/p/v{version}/deductions/once | Creates a one-time deduction for a driver or a truck. |
DELETE | /api/p/v{version}/deductions/{id} | Deletes a specific deduction by its unique ID. |
Validation rules:
- A deduction must include either
DriverIdorTruckId— one of them is required. OwnerOperatorIdis optional and may be used only to override the current owner of the asset. It is never the primary deduction subject.- If
DriverIdis provided → the deduction appears in that driver’s deduction list. - If
TruckIdis provided → the deduction appears in that truck’s deduction list. - For creating a deduction, the amount must be negative and less than - 1.00.
- Only
"Once"frequency is supported. - Requires a valid Bearer token with the appropriate scope (
deduction:read,deduction:create, ordeduction:delete).
Why?
This release introduces a consistent and secure way to manage one-time deductions through the Public API. It enables automated synchronization of deduction data across financial and payroll systems while maintaining full ownership and asset context within Alvys.