# Android

## Summary

We have added new policy-based APIs to the SDK that enable policy-centric data retrieval for trips, users, scores, discounts, and driving summaries.

### [TripService](/drivesync-portal/trip.md)

* **fetchTripsForUserByPolicy()** - Returns simplified trip list for a user within a policy with optional filtering (date range, transport mode, sorting)
* **fetchTripsByPolicy()** - Returns simplified trip list for all users in a policy with optional filtering

### [PolicyService](/drivesync-portal/policy.md)

* **fetchPolicies()** - Returns list of policies for logged-in user with policyId, identifier, and userPolicyRole
* **fetchAssociatedUsers()** - Returns list of users associated with a policy (firstName, lastName, status, role)

### [ScoringService](/drivesync-portal/scoring.md)

* **fetchAverageScoresByPolicy()** - Returns average driving scores (highest/lowest/average) with component breakdowns for a user within a policy

### [DiscountMetadataService](/drivesync-portal/discount.md#discount-metadata)

* **fetchByPolicy()** - Returns discount configuration (score-to-discount mappings, minimumKmRequired) for a policy

### [DiscountService](/drivesync-portal/discount.md)

* **fetchDiscountByPolicyId(policyId, verificationCutOffDate?)** - Returns current and projected discount values with min/max ranges for a policy

### [DrivingSummaryService](/drivesync-portal/driving-summary.md)

* **fetchByPolicy()** - Returns policy-level driving summary (kmOfDriving, numberOfTrips, overallScore)
* **fetchForUserByPolicy()** - Returns user-level driving summary within a policy

## Breaking Changes

There are no breaking changes in this release.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk.ims.tech/releases/1.31.0/android.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
