/api/p/v{version}/deductions/search

This endpoint provides detailed information about each deduction that matches the specified search criteria, enabling efficient management and retrieval of deduction records.

Deductions are asset-specific financial adjustments and can be associated with either a driver or a truck, but not both simultaneously.


Request Body Parameters

The following parameters are accepted in the request body:

ParameterTypeRequiredDescription
PageIntegerYesThe page number to retrieve. Default is 0.
PageSizeIntegerYesThe number of items per page. Must be greater than 0.
DateRangeObjectConditionallyThe date range to filter by. This field is required if the other conditionally required fields are left empty.
DateRange.StartString (Date-Time)NoStart of the date range (UTC).
DateRange.EndString (Date-Time)NoEnd of the date range (UTC).
DriverIdStringConditionallyRequired when filtering by driver. Must not be provided together with TruckId. This field is required if the other conditionally required fields are left empty.
TruckIdStringConditionallyRequired when filtering by truck. Must not be provided together with DriverId. This field is required if the other conditionally required fields are left empty.
OwnerOperatorIdStringConditionallyOptional — used only to filter by the current owner of the asset (Driver or Truck). This field is required if the other conditionally required fields are left empty.
IncludePaidBooleanConditionallyWhen true, includes already paid deductions. Default: false. This field is required if the other conditionally required fields are left empty.

Example CURL Request

curl --location 'https://integrations.alvys.com/api/p/v1/deductions/search' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "Page": 0,
  "PageSize": 100,
  "DateRange": {
    "Start": "2025-10-07T00:00:00Z",
    "End": "2025-10-09T23:59:59Z"
  },
  "DriverId": "DR2517534557938191",
  "OwnerOperatorId": "DR251652563453445290",
  "IncludePaid": true
}'

Response Body Parameters

The following parameters are included in the response body:

ParameterTypeRequiredDescription
PageIntegerNoThe current page of the response.
PageSizeIntegerYesThe number of items per page.
TotalIntegerYesThe total number of deduction records matching the criteria.
Items[]ArrayYesThe list of deduction records.
Items[].IdStringYesThe unique identifier of the deduction.
Items[].TypeStringYesType of record ("Deduction").
Items[].GroupIdStringYesGroup ID if the deduction belongs to a recurring group or rule.
Items[].DescriptionStringYesDescription of the deduction.
Items[].CategoryStringYesDeduction category (e.g., Fuel, Advance, Drug Test).
Items[].Amount.AmountNumberYesDeduction amount (negative for deductions).
Items[].Amount.CurrencyIntegerYesISO numeric currency code (e.g., 840 for USD).
Items[].DriverIdStringConditionallyThe Driver ID linked to the deduction.
Items[].TruckIdStringConditionallyThe Truck ID linked to the deduction.
Items[].OwnerOperatorIdStringNoThe Owner Operator ID of truck or driver.
Items[].DateString (Date-Time)YesThe effective date of the deduction (date only, without time).
Items[].IsPaidBooleanNoIndicates whether the deduction has been paid.
Items[].CreatedAtString (Date-Time)NoTimestamp when the deduction was created (UTC).
Items[].CreatedByStringYesClient ID or User ID of the person who created the deduction.

Example Response

{
  "Page": 0,
  "PageSize": 100,
  "Total": 1,
  "Items": [
    {
      "Id": "00000000-dd44-0000-0000-8a1fa91b607a",
      "Type": "Deduction",
      "GroupId": "344571de-57b4-4163-a0cc-d7981fa65994",
      "Description": "Drug Test Detais",
      "Category": "Drug Test",
      "Amount": {
        "Amount": -50,
        "Currency": 840
      },
      "DriverId": "DR2517534557938191",
      "OwnerOperatorId": "DR25165000003445290",
      "Date": "2025-10-07T00:00:00Z",
      "IsPaid": false,
      "CreatedAt": "2025-10-09T08:30:54.873Z",
      "CreatedBy": "MhAeS5345435fbvccvbfUdTdXOMgVSGyp"
    }
  ]
}

Versioning

The version 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.

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!