This endpoint enables you to search for maintenance records based on various criteria such as trailer IDs, categories, status, and date ranges. It returns a list of maintenance records that match the provided search terms.

The Search Maintenance API endpoint allows you to search for maintenance records within the Alvys system based on various criteria such as asset type, category, status, and date range. This endpoint provides detailed information about each maintenance record that matches the search criteria, facilitating efficient management and retrieval of maintenance records.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe API version to use.

Request Body

The following fields are required in the request body to filter the search results:

ParameterTypeRequiredDescription
pageIntegerNoThe page number to retrieve.
pageSizeIntegerYesThe number of results per page.
PageSize must be greater than 0.
truckIdsArray of StringsConditionallyA list of truck IDs to filter by. This field is required if the other conditionally required fields are left empty.
trailerIdsArray of StringsConditionallyA list of trailer IDs to filter by. This field is required if the other conditionally required fields are left empty.
categoriesArray of StringsConditionallyA list of categories to filter by. This field is required if the other conditionally required fields are left empty.
statusStringConditionallyThe status of the maintenance record. This field is required if the other conditionally required fields are left empty.
dateRangeObjectConditionallyThe date range for the maintenance records. This field is required if the other conditionally required fields are left empty.
dateRange.startString (Date-Time)ConditionallyThe start date of the maintenance records range. This field is required if the other conditionally required fields are left empty.
dateRange.endString (Date-Time)ConditionallyThe end date of the maintenance records range. This field is required if the other conditionally required fields are left empty.

Example CURL request

Use the Current API version number and make sure to replace the Authorization header value with your actual Bearer token for the request:

curl --location 'https://integrations.alvys.com/api/p/v1/maintenance/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ....' \
--header 'Content-Type: application/json' \
--data '{
  "page": 0,
  "pageSize": 100,
  "truckIds": [
      "TR123456789"
  ],
  "trailerIds": [
      ""
  ],
  "categories": [
      "Tires"
  ],
  "status": "Open",
  "dateRange": {
      "start": "2021-01-23T13:36:42.021Z",
      "end": "2024-08-23T13:36:42.021Z"
  }
}'

Response Parameters

The following table lists the parameters included in the response for maintenance search requests:

ParameterTypeRequiredDescription
pageIntegerYesThe current page number of the results.
pageSizeIntegerYesThe number of results per page.
totalIntegerYesThe total number of matching maintenance records.
itemsArray of ObjectsYesThe list of maintenance records matching the criteria.
items.idStringYesThe unique identifier of the maintenance record.
items.poStringNoThe purchase order number associated with the maintenance.
items.referenceStringNoA reference string for the maintenance record.
items.relatedAssetObjectNoDetails about the related asset for the maintenance.
items.relatedAsset. assetIdStringNoThe unique identifier of the asset.
items.relatedAsset. assetNumberStringNoThe asset number.
items.relatedAsset. assetTypeStringNoThe type of asset (e.g., Truck, Trailer).
items.categoryObjectNoThe category of the maintenance work.
items.category.idStringNoThe unique identifier of the category.
items.category.nameStringNoThe name of the category.
items.descriptionStringNoA description of the maintenance work.
items.commentsStringNoAdditional comments or notes about the maintenance.
items.amountObjectNoThe total amount for the maintenance work.
items.amount.amountNumberNoThe amount value.
items.amount.currencyStringNoThe currency of the amount.
items.repairShopObjectNoInformation about the repair shop.
items.repairShop.idStringNoThe unique identifier of the repair shop.
items.repairShop.nameStringNoThe name of the repair shop.
items.remindersArrayNoA list of reminders associated with the maintenance.
items.reminders.idStringNoThe unique identifier of the reminder.
items.reminders. dueDateString (Date-Time)NoThe due date for the reminder.
items.createdAtString (Date-Time)YesThe date and time when the maintenance record was created. For some maintenance records, the CreatedAt field may display 1970-01-01T00:00:00+00:00. This placeholder represents the Unix Epoch and indicates that the original creation timestamp is unavailable. Users should interpret this as an unknown creation date, specific only to the CreatedAt field and not reflective of other timestamps or data.
items.createdByStringNoThe user who created the maintenance record.
items.modifiedAtString (Date-Time)NoThe date and time when the maintenance record was last modified.
items.modifiedByStringNoThe user who last modified the maintenance record.

Example Response

On the right side, you can see examples of different error codes by clicking "Example" and selecting the response code.

Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section.

This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the Curl command on the right side of the page will be automatically updated. Alternatively, you can directly edit the Curl command. Make sure to authorize yourself before trying a request.

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