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

# List

> Returns a list of tolls.



## OpenAPI

````yaml get /v2/tolls/
openapi: 3.0.0
info:
  title: FleetIT API V2 Public
  description: >-
    # Overview


    The Fleetit API is designed to provide developers with a streamlined and
    efficient way to interact with various fleet operations, including tolls,
    vehicles, and parking citations. This documentation provides a detailed
    overview of how to utilize this API effectively.


    # Error Codes


    The API will respond with specific error codes and messages to enable
    accurate troubleshooting. Common error codes include:


    ```

    200: Success

    201: Created

    304: Not Modified

    400: Bad Request

    401: Unauthorized

    403: Forbidden

    404: Not Found

    500: Internal Server Error

     ```

    # Multi-Fleets Management


    Our API supports the management of multiple fleets, allowing users to access
    and manipulate data specific to each fleet seamlessly. To ensure accurate
    data retrieval and manipulation across different fleets, users must specify
    their target fleet when making API requests.


    #### Specifying the Fleet in Requests


    To target a specific fleet, include the `Fleet-Id` header in your API
    requests. This header should carry the unique identifier (ID) of the fleet
    you wish to interact with.


    #### Header Format


    - **Header Name**: `Fleet-Id`

    - **Value**: The unique identifier (ID) of the fleet.


    Example of including the `Fleet-Id` header in a request:


    ```

    Fleet-Id: <your-fleet-id>

     ```

    #### Default Fleet Data Retrieval


    If the `Fleet-Id` header is not included in a request, the API will
    automatically revert to the user's default fleet. Data associated with this
    default fleet will be fetched and returned in the response.


    This approach ensures that users can manage multiple fleets within the same
    system, providing flexibility and efficiency in accessing fleet-specific
    data. Always ensure that the `Fleet-Id` header is correctly specified to
    interact with the intended fleet.


    # Pagination


    Our API employs pagination to manage the retrieval of large datasets
    efficiently. Pagination is implemented through the use of `limit` and
    `offset` parameters in the GET request. This approach allows clients to
    control the number of records retrieved in a single response and to navigate
    through large sets of data incrementally.


    #### Parameters


    - **limit**: Specifies the maximum number of records to return in a single
    response. The maximum allowable value for this parameter is `100`.

    - **offset**: Indicates the starting position from which to return records.
    This parameter is used to skip a specified number of records from the
    beginning of the dataset.


    #### Usage


    To apply pagination, include the `limit` and `offset` parameters in your GET
    request query string.


    ##### Example Request


    ```

    GET https://api.example.com/items?limit=20&offset=40

     ```

    This request would retrieve 20 records, starting from the 41st record (since
    the offset is 0-based).


    #### Limits


    The maximum limit for any endpoint is `100` records per request. Requests
    attempting to set a `limit` value greater than `100` will be automatically
    capped at `100`.


    #### Navigating Data Pages


    To navigate through datasets, adjust the `offset` parameter based on the
    `limit` value. For example, to retrieve the next set of records, increase
    the `offset` by the `limit` value used in the previous request.


    #### Best Practices


    - Use consistent `limit` values for sequential requests to ensure
    predictable pagination behavior.

    - Keep track of the `offset` and `limit` values to efficiently navigate back
    and forth within the dataset.


    Incorporating these pagination parameters in your API requests ensures
    efficient data retrieval and management, particularly when dealing with
    large volumes of data.
  version: 1.0.0
servers:
  - url: https://api.app.fleetit.com/
  - url: https://api.staging.fleetit.com/
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Auth > whoami
  - name: Vehicles
  - name: Fleet
  - name: Fleet > Settings
  - name: Fleet > ServiceTypes
  - name: Fleet > Regions
  - name: Parking
  - name: Transponders
  - name: Transponders > Shipments
  - name: Tolls
  - name: Integrations
    description: >-
      ### Welcome to FleetIT Integrations!


      Discover how to enhance your FleetIT experience by integrating with
      leading services such as Fleetio, Rent Centric, Webhook, and many more.
      Each integration enables streamlined workflows, data synchronization, and
      expanded capabilities tailored to your needs.


      #### Key Integration Highlights:


      - **Fleetio**: Automate the synchronization of vehicle data and manage
      expense entries effectively. [Required
      fields](https://fleetit.com/integrations/fleetio/) such as `License
      Plate`, `Ticket ID`, and `Transaction Date and Time` ensure detailed
      tracking.

      - **Rent Centric**: Ideal for rental operations, this integration allows
      seamless vehicle data management within FleetIT.

      - **Webhook**: Customize real-time data exchanges with Webhook to connect
      and automate your workflows across various platforms.


      For a detailed guide on how to set up and manage these integrations,
      including the specific fields required for each service and step-by-step
      instructions:


      ### [Visit Our Integrations Page](https://fleetit.com/integrations/)


      Leverage our comprehensive documentation to effortlessly integrate your
      systems, ensuring you make the most out of FleetIT's capabilities. For any
      assistance, our support team is ready to help you through the setup
      process and to answer any queries you might have.
  - name: Integrations > Webhook
    description: >-
      Our system sends webhook notifications to inform you of various events
      happening in real-time. This webhook mechanism allows you to receive
      updates directly to the URL you specify in your account settings. The
      following documentation outlines the structure of the webhook payload and
      how you can test and integrate it with your system.


      ### Webhook Headers


      To ensure secure and relevant communication, our webhook requests come
      with a set of HTTP headers:


      - **Fleet-Id**: This header uniquely identifies the fleet related to the
      event. It helps your system to verify the source and relevance of the
      incoming data.

      - **X-Signature**: The HMAC SHA-256 output as a hexadecimal string.

      - **X-Timestamp**: The timestamp when the signature was generated.

      - **ext-billing-id** and **ext-client-id,** to make it easier for
      billings.

      - **Custom Headers**: During the integration setup, you can configure
      additional custom headers. These headers will be included in every webhook
      notification sent to your endpoints. Custom headers can be used for
      additional security checks, such as signatures or specific tokens that
      your infrastructure requires for processing the incoming requests.


      # Security and Best Practices for Webhook Integration


      When integrating webhook notifications into your system, it's critical to
      implement robust security measures and follow best practices to ensure
      that the data transmitted is protected and handled efficiently. Here are
      some key security measures and best practices to consider:


      #### 1\. Use HTTPS for Endpoint Security


      Ensure that your endpoint is secured using HTTPS to encrypt data
      transmitted between our servers and your webhook endpoint. HTTPS prevents
      interception and tampering by third parties, ensuring that the data
      remains confidential and integral during transit.


      #### 2\. Duplicate Logic Handling


      Implement logic in your system to handle duplicate webhook calls. Webhooks
      may be sent more than once in some scenarios, such as network retries or
      duplicated processing logic. It's crucial to ensure that your system can
      identify and manage duplicate data, such as checking for unique event
      identifiers or timestamps before processing events.


      #### 3\. Securing Your Webhook


      When our service sends a webhook to your endpoint, it includes a signature
      in the `X-Signature` header. This signature is a hash, computed using HMAC
      SHA-256, of the payload concatenated with a timestamp.


      Steps to Verify the Signature


      **Step 1: Extract the Signature and Timestamp**


      Each webhook request will have the following headers:


      - `X-Signature`: The HMAC SHA-256 output as a hexadecimal string.

      - `X-Timestamp`: The timestamp when the signature was generated.


      **Step 2: Recreate the Payload String**


      Concatenate the `X-Timestamp` value and the raw request body with a dot
      (`.`) between them. The raw request body must be exactly as received,
      without any modifications or reformatting.


      **Step 3: Generate the Expected Signature**


      Using the secret key provided by us, perform an HMAC SHA-256 hash of the
      recreated payload string. Here is a sample code snippet in Python to
      illustrate this:


      ``` python

      import hmac

      import hashlib

      import json



      def verify_webhook_signature(received_signature: str, payload: dict,
      received_timestamp: int, secret_key: str):
          # Serialize the payload
          serialized_payload = json.dumps(payload, separators=(',', ':'))
          # Create the signed payload
          signed_payload = f"{received_timestamp}.{serialized_payload}"
          # Compute the HMAC SHA-256 hash
          expected_signature = hmac.new(
              secret_key.encode(), signed_payload.encode(), hashlib.sha256).hexdigest()
          # Use a constant-time comparison to compare the computed signature with the received signature
          return hmac.compare_digest(expected_signature, received_signature)

       ```

      **Step 4: Compare the Signatures**


      Use a secure comparison function to compare the `expected_signature` with
      the `received_signature`. This comparison should be done using a
      constant-time algorithm to prevent timing attacks.
  - name: Integrations > Fleet Active Integrations
  - name: Integrations > Logs
paths:
  /v2/tolls/:
    get:
      tags:
        - Tolls
      summary: List
      parameters:
        - name: Fleet-ID
          in: header
          schema:
            type: integer
          example: '1'
        - name: limit
          in: query
          schema:
            type: integer
          example: 10
          description: Maximum number of toll records to return per page.
        - name: offset
          in: query
          schema:
            type: integer
          example: 0
          description: Starting point for the records to be displayed.
        - name: vehicle
          in: query
          schema:
            type: array
            items:
              type: integer
          example:
            - 1234
            - 5678
          description: Filter by vehicle IDs. Multiple IDs are supported.
        - name: transponder
          in: query
          schema:
            type: array
            items:
              type: integer
          example:
            - 12
            - 34
          description: Filter by transponder IDs. Multiple IDs are supported.
        - name: driver
          in: query
          schema:
            type: array
            items:
              type: integer
          example:
            - 56
            - 78
          description: Filter by driver IDs. Multiple IDs are supported.
        - name: billing_status
          in: query
          schema:
            type: array
            items:
              type: string
          example:
            - PENDING
            - PAID
          description: Filter by the billing status. Multiple statuses can be specified.
        - name: amount_min
          in: query
          schema:
            type: number
          example: 50
          description: Set a minimum toll amount for transaction filtering.
        - name: amount_max
          in: query
          schema:
            type: number
          example: 200
          description: Set a maximum toll amount for transaction filtering.
        - name: transaction_date_gte
          in: query
          schema:
            type: string
          example: '2023-01-01'
          description: >-
            Filter by the start date of the transaction range. Format
            YYYY-MM-DD.
        - name: transaction_date_lte
          in: query
          schema:
            type: string
          example: '2023-12-31'
          description: Filter by the end date of the transaction range. Format YYYY-MM-DD.
        - name: posting_date_gte
          in: query
          schema:
            type: string
          example: '2023-01-01'
          description: >-
            Filter by the start date of the posting date range. Format
            YYYY-MM-DD.
        - name: posting_date_lte
          in: query
          schema:
            type: string
          example: '2023-12-31'
          description: Filter by the end date of the posting date range. Format YYYY-MM-DD.
        - name: exit_time
          in: query
          schema:
            type: string
          example: '17:08:21'
          description: Filter by the time of exit from the toll plaza. Format HH:MM:SS.
        - name: violation
          in: query
          schema:
            type: boolean
          example: true
          description: >-
            Filter transactions based on whether they are marked as a violation
            (true/false).
        - name: is_billed
          in: query
          schema:
            type: boolean
          example: true
          description: Filter transactions based on their billing status (true/false).
        - name: vehicle_plate_number
          in: query
          schema:
            type: string
          example: ABC123
          description: Filter by vehicle plate number.
        - name: vehicle_plate_state
          in: query
          schema:
            type: string
          example: NY
          description: Filter by vehicle plate state.
        - name: vehicle_vehicle_number
          in: query
          schema:
            type: string
          example: VH123
          description: Filter by vehicle number.
        - name: search
          in: query
          schema:
            type: string
          example: searchTerm
          description: Conduct a text search within the transaction records.
        - name: ordering
          in: query
          schema:
            type: string
          example: '-transaction_date'
          description: >-
            Specify the order of the returned records. Options include
            transaction_date, -transaction_date, posting_date, -posting_date,
            exit_time, -exit_time.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    example: 100
                  next:
                    type: string
                    example: http://api.example.com/v2/tolls/?limit=10&offset=10
                  previous:
                    type: string
                    example: null
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: unique_id
                        vehicle:
                          type: object
                          properties:
                            id:
                              type: string
                              example: vehicle_id
                            plate_number:
                              type: string
                              example: plate_number
                            plate_state:
                              type: string
                              example: state_code
                            vehicle_number:
                              type: string
                              example: fleet_number
                            vehicle_make:
                              type: string
                              example: make
                            vehicle_model:
                              type: string
                              example: model
                            year:
                              type: string
                              example: year
                            lessee_renter:
                              type: string
                              example: lessee_info
                            status:
                              type: string
                              example: vehicle_status
                        transponder:
                          type: object
                          properties:
                            id:
                              type: string
                              example: transponder_id
                            number:
                              type: string
                              example: transponder_number
                            status:
                              type: string
                              example: transponder_status
                        driver:
                          type: object
                          properties:
                            id:
                              type: string
                              example: driver_id
                            driver_id:
                              type: string
                              example: identifier
                            first_name:
                              type: string
                              example: first_name
                            last_name:
                              type: string
                              example: last_name
                            address_line_1:
                              type: string
                              example: address_line_1
                            address_line_2:
                              type: string
                              example: address_line_2
                            city:
                              type: string
                              example: city
                            state:
                              type: string
                              example: state
                            zip:
                              type: string
                              example: zip_code
                            contact_number:
                              type: string
                              example: phone_number
                            email:
                              type: string
                              example: email_address
                        exit_plaza:
                          type: string
                          example: exit_plaza_identifier
                        custom_fields:
                          type: object
                          properties:
                            cost_center:
                              type: string
                              example: cost_center_identifier
                        billing_status:
                          type: string
                          example: current_billing_status
                        posting_date:
                          type: string
                          example: '2023-01-01'
                        transaction_date:
                          type: string
                          example: '2023-01-01'
                        agency:
                          type: string
                          example: agency_name
                        exit_time:
                          type: string
                          example: '17:08:21'
                        entry_plaza:
                          type: string
                          example: entry_plaza_identifier
                        amount:
                          type: string
                          example: '50.00'
                        our_cost:
                          type: string
                          example: '45.00'
                        is_billed:
                          type: boolean
                          example: true
                        billed_on:
                          type: string
                          example: '2023-02-01'
                        confirmation_id:
                          type: string
                          example: confirmation_number
                        system_remarks:
                          type: string
                          example: system_notes
                        violation:
                          type: boolean
                          example: true
                        violation_fee:
                          type: string
                          example: '10.00'
                        included_in_driver_invoice:
                          type: boolean
                          example: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````