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

# Create a new offense

> Add a new offense to the specified vehicle



## OpenAPI

````yaml /api-reference/m2m-api.yml post /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/offenses/new
openapi: 3.0.3
info:
  title: M2M API
  version: '@version@'
servers:
  - url: https://api.smartmove.eu/m2m
security: []
tags:
  - name: Vehicles
  - name: Maintenance
  - name: Logbook
  - name: Drivers
  - name: Users
  - name: Checklist
  - name: Incidents
  - name: Databox
  - name: Assets
  - name: Asset Provider
  - name: Invoices
paths:
  /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/offenses/new:
    post:
      tags:
        - Offenses
      summary: Create a new offense
      description: Add a new offense to the specified vehicle
      operationId: createOffense
      parameters:
        - name: assetProviderCountryCode
          in: path
          description: Asset provider country code
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
        - name: assetProviderCode
          in: path
          description: Asset provider code
          required: true
          schema:
            type: string
            minLength: 3
            maxLength: 3
        - name: vehicleId
          in: path
          description: Id of vehicle
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: The offense that should be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OffenseRequest'
      responses:
        '201':
          description: The created offense
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffenseResponse'
        '401':
          description: Required and valid bearer token was not included
        '403':
          description: Access to the requested asset provider has been rejected
        '404':
          description: Vehicle could not be found
      security:
        - oauth:
            - openid
components:
  schemas:
    OffenseRequest:
      type: object
      required:
        - paid
      properties:
        paid:
          type: boolean
        customer:
          $ref: '#/components/schemas/Customer'
        title:
          type: string
        committedTimestamp:
          type: string
          format: date-time
          example: '2025-10-07T10:24:41.143Z'
        location:
          type: string
        amount:
          type: number
          format: double
        currency:
          type: string
          minLength: 3
          maxLength: 3
        offenseStatement:
          type: string
    OffenseResponse:
      type: object
      required:
        - paid
        - id
      properties:
        id:
          type: string
          format: uuid
        paid:
          type: boolean
        customer:
          $ref: '#/components/schemas/Customer'
        title:
          type: string
        committedTimestamp:
          type: string
          format: date-time
          example: '2025-10-07T10:24:41.143Z'
        location:
          type: string
        amount:
          type: number
          format: double
        currency:
          type: string
          minLength: 3
          maxLength: 3
        offenseStatement:
          type: string
        blob:
          $ref: '#/components/schemas/Blob'
        ocrStatus:
          $ref: '#/components/schemas/OcrStatus'
    Customer:
      type: object
      required:
        - mobilityProviderCountryCode
        - mobilityProviderCode
        - customerId
      properties:
        mobilityProviderCountryCode:
          type: string
          description: Mobility provider country code
          minLength: 2
          maxLength: 2
          example: AT
        mobilityProviderCode:
          type: string
          description: Mobility provider code
          minLength: 3
          maxLength: 3
          example: ABC
        customerId:
          type: string
          description: >-
            The user id in UUID format (only the versions 1, 2, 3 and 4 are
            currently supported)
          format: uuid
          example: 828c2d1c-d933-4138-9577-02c292b6d869
    Blob:
      type: object
      required:
        - uuid
        - filename
        - uploaded
      properties:
        uuid:
          type: string
          format: uuid
        filename:
          type: string
        uploaded:
          type: boolean
          description: Indicates if the BLOB has been uploaded to the storage
          default: false
    OcrStatus:
      type: string
      enum:
        - NOT_STARTED
        - MANUAL
        - PROCESSING
        - PROCESSED
        - ERROR
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/token
          scopes:
            all: openid
        authorizationCode:
          authorizationUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/auth
          tokenUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/token
          scopes:
            all: openid

````