> ## Documentation Index
> Fetch the complete documentation index at: https://docs.connectedfleet.michelin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Driver Behaviour Group Ranking

> POST request to return the behaviour rank of a driver in their group.<br/><br/>The value specified for the endDate cannot be before startDate and the date range between startDate and endDate should be at least 7 days.



## OpenAPI

````yaml https://api.connectedfleet.michelin.com/performance/api-docs post /public/v1/customer/{customerId}/driverbehaviourmetrics/rankings/group
openapi: 3.0.1
info:
  title: Performance
  description: >-
    Delivers deeper insights into driver behaviour, fuel efficiency, CO₂ impact
    and safe driving practices.
  contact:
    name: Masternaut
    url: https://www.masternaut.com
    email: support@masternautconnect.com
  version: 124.0.2607160821
servers:
  - url: https://api.connectedfleet.michelin.com/performance
    description: Product Server
security:
  - bearerAuth: []
tags:
  - name: /alert
    description: Alert history and notification management operations
  - name: /driver
    description: Driver Operations
  - name: /driverbehaviourmetrics
    description: Driver Behaviour Metrics
  - name: customers
    description: Customer Behaviour Metrics
  - name: /ecoscore
    description: EcoScore
  - name: /fuel
    description: Fuel
  - name: /idling
    description: Idling
  - name: /speeding
    description: Speeding
  - name: /tokenInformation
    description: Token operations
  - name: /utilisation
    description: Utilisation
  - name: /vehicle
    description: Vehicle management operations
paths:
  /public/v1/customer/{customerId}/driverbehaviourmetrics/rankings/group:
    post:
      tags:
        - /driverbehaviourmetrics
        - customers
      summary: Driver Behaviour Group Ranking
      description: >-
        POST request to return the behaviour rank of a driver in their
        group.<br/><br/>The value specified for the endDate cannot be before
        startDate and the date range between startDate and endDate should be at
        least 7 days.
      operationId: calculateDriverBehaviourMetricsRankingsForGroup
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/DriverBehaviourPersonMetricsRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json;charset=UTF-8:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BehaviourMetricPersonRankingDto'
        '400':
          description: Bad input parameters
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '404':
          description: Resource not found
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
components:
  schemas:
    DriverBehaviourPersonMetricsRequest:
      required:
        - endDate
        - startDate
      type: object
      properties:
        startDate:
          type: string
          description: >-
            Start date and time for the behaviour metrics period. Format:
            yyyy-MM-dd'T'HH:mm:ss in UTC.
          format: date-time
        endDate:
          type: string
          description: >-
            End date and time for the behaviour metrics period. Format:
            yyyy-MM-dd'T'HH:mm:ss in UTC.
          format: date-time
        keys:
          type: array
          description: >-
            Array of keys for the KPI to return details for. Possible values:
            <ul><li>DrivingPercentage (Cleaner KPI)</li><li>SpeedCompliance
            (Safe Speed KPI)</li><li>HarshEventsPercentage (Smoother
            KPI)</li></ul>
          items:
            type: string
        includeTopHierarchy:
          type: boolean
          description: Flag to include top hierarchy in ranking calculation
        driverId:
          type: string
          description: Identifier of a driver
      description: >-
        Request parameters for driver behaviour person metrics ranking including
        date range, metrics keys, and driver identifier
    BehaviourMetricPersonRankingDto:
      type: object
      properties:
        key:
          type: string
          description: >-
            Metric key identifier (e.g., 'DrivingPercentage', 'SpeedCompliance',
            'HarshEventsPercentage')
        rankInGroup:
          $ref: '#/components/schemas/BehaviourMetricRankDto'
        rankInCustomer:
          $ref: '#/components/schemas/BehaviourMetricRankDto'
      description: >-
        Behaviour metric person ranking data containing metric key and ranking
        information in group and customer context
    ApiErrorDto:
      type: object
      properties:
        errorCode:
          type: integer
          format: int32
        errorMessage:
          type: string
        offendingFields:
          type: array
          items:
            type: string
    BehaviourMetricRankDto:
      type: object
      properties:
        rank:
          type: integer
          description: >-
            Rank position of the driver in the specified context (group or
            customer)
          format: int32
        activeDriverCount:
          type: integer
          description: >-
            Total number of active drivers in the specified context for ranking
            calculation
          format: int32
      description: >-
        Behaviour metric ranking data containing rank position and total active
        driver count
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````