openapi: 3.1.0
info:
  title: Mastercheck API - Apigee
  description: >-
    Mastercheck API documentation <h2>Authentication & Authorization</h2> <p>You
    will need to be identified before calling any Mastercheck API endpoints.
    </p> <p>In order to be recognized and authorized to access our Mastercheck
    API, we put in place 2 mechanisms:</p><ul><li>Authentication mechanism is
    done with an API key dedicated to you. <br/>Remember that the API key
    provided should be shared with care.<br/> The API key must be inserted in
    the header of the request in the appropriate field</li><li>Authorization
    mechanism is done by a well-known authorization flow for REST Web API:
    <strong>“Client credentials” OAuth2.0 flow.</strong></li></ul>
  license:
    name: Internal usage only
    identifier: Internal
  version: 1.2.2
servers:
  - url: https://indus.api.euromaster.com
    description: APIGEE UAT
  - url: https://api.euromaster.com
    description: APIGEE PROD
tags:
  - name: Masterchecks
    description: Masterchecks inspections with all measurements
paths:
  /vcs-erm/v1/masterchecks:
    get:
      summary: Get masterchecks
      description: This endpoint allows to get masterchecks data filtered by parameters
      operationId: getMasterchecks
      tags:
        - Masterchecks
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: true
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: true
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/lastModifiedDateFromParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/lastModifiedDateToParam'
        - in: query
          name: externalRef
          required: false
          description: Identifier of the external reference
          schema:
            $ref: '#/components/schemas/ExternalRefParam'
        - in: query
          name: source
          required: false
          description: Source of the external reference
          schema:
            $ref: '#/components/schemas/SourceParam'
      responses:
        '200':
          $ref: '#/components/responses/GetMastercheckResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: The pageNumber must be lower than or equals to 3
                        property: pageNumber
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /vcs-erm/v1/masterchecks/external:
    post:
      summary: Create mastercheck
      description: This endpoint allows to create a mastercheck
      operationId: createMastercheck
      tags:
        - Masterchecks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMastercheckQueryDTO'
            examples:
              standardBody:
                value:
                  date: '2024-12-31'
                  externalRef: '1000001'
                  vehicleExternalRef: '1000011'
                  saleExternalRef: '1000111'
                  nextService:
                    date: '2024-12-31'
                    distanceLeft: 5000
                    distanceUOM: km
                  rims:
                    condition: OK
                    status: REPAIRED
                  tyres:
                    condition: OK
                    status: PLANNED
                    measurements:
                      - axlePosition: 1
                        tyrePosition: 1
                        wear:
                          - groovePosition: 1
                            treadDepth: 2
                          - groovePosition: 2
                            treadDepth: 2
                          - groovePosition: 3
                            treadDepth: 2
                        dot: '4218'
                        pressure: 2.5
                      - axlePosition: 1
                        tyrePosition: 2
                        wear:
                          - groovePosition: 1
                            treadDepth: 2
                          - groovePosition: 2
                            treadDepth: 2
                          - groovePosition: 3
                            treadDepth: 2
                        dot: '4217'
                        pressure: 2.4
                      - axlePosition: 2
                        tyrePosition: 1
                        wear:
                          - groovePosition: 1
                            treadDepth: 2
                          - groovePosition: 2
                            treadDepth: 2
                          - groovePosition: 3
                            treadDepth: 2
                        dot: '4216'
                        pressure: 2.3
                      - axlePosition: 2
                        tyrePosition: 2
                        wear:
                          - groovePosition: 1
                            treadDepth: 2
                          - groovePosition: 2
                            treadDepth: 2
                          - groovePosition: 3
                            treadDepth: 2
                        dot: '4215'
                        pressure: 2.2
                  alignment:
                    condition: KO
                    status: REFUSED
                  bodywork:
                    condition: OK
                    status: REPAIRED
                  brakeFluid:
                    condition: OK
                    status: REPAIRED
                  coolant:
                    condition: OK
                    status: REPAIRED
                  washerFluid:
                    condition: OK
                    status: REPAIRED
                  airConditioning:
                    condition: OK
                    status: REPAIRED
                  dashboardCAUTIONLight:
                    condition: OK
                    status: REPAIRED
                  oilLevel:
                    condition: OK
                    status: REPAIRED
                  batteryAux:
                    condition: OK
                    status: REPAIRED
                  indicators:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  windshield:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  wipers:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                    wiperMotor:
                      condition: OK
                      status: REPAIRED
                    washerPump:
                      condition: OK
                      status: REPAIRED
                  opticalGlass:
                    condition: OK
                    status: REPAIRED
                  positionLights:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  dippedBeam:
                    front:
                      condition: OK
                      status: REPAIRED
                  highBeam:
                    front:
                      condition: OK
                      status: REPAIRED
                  fogLights:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  brakeLights:
                    rear:
                      condition: OK
                      status: REPAIRED
                  brakePads:
                    front:
                      condition: OK
                      status: REPAIRED
                      wearLeft: 2
                      distanceLeft: 500
                      distanceUOM: km
                    rear:
                      condition: OK
                      status: REPAIRED
                      wearLeft: 2
                      distanceLeft: 500
                      distanceUOM: km
                  brakeDiscs:
                    front:
                      condition: OK
                      status: REPAIRED
                      wearLeft: 2
                      distanceLeft: 500
                      distanceUOM: km
                    rear:
                      condition: OK
                      status: REPAIRED
                      wearLeft: 2
                      distanceLeft: 500
                      distanceUOM: km
                  transmission:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  suspension:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  steering:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  bearings:
                    front:
                      condition: OK
                      status: REPAIRED
                    rear:
                      condition: OK
                      status: REPAIRED
                  chargingSocketHV:
                    condition: OK
                    status: REPAIRED
                  chargingCableHV:
                    condition: OK
                    status: REPAIRED
                  orangeCableHV:
                    condition: OK
                    status: REPAIRED
                  batteryTrunkHV:
                    condition: OK
                    status: REPAIRED
                  fluidLeakHV:
                    condition: OK
                    status: REPAIRED
      responses:
        '200':
          $ref: '#/components/responses/CreateMastercheckResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: externalRef
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: externalRef
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '409':
          description: Conflicts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                mastercheckAlreadyExisting:
                  summary: The mastercheck with this reference is already existing
                  value:
                    errors:
                      - error: Mastercheck already existing with this reference
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalErrorDTO'
              examples:
                Internal error:
                  summary: An internal error occured
                  value:
                    error: >-
                      An internal error occurred, please try again later. Thank
                      you for your understanding
security:
  - OAuth2: []
    ApiKeyAuth: []
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows: {}
    ApiKeyAuth:
      type: apiKey
      in: header
      name: clientid
  schemas:
    ConditionEnum:
      type: string
      enum:
        - OK
        - KO
        - CAUTION
      description: The condition of the component
      example: OK
    StatusEnum:
      type: string
      enum:
        - REPAIRED
        - PLANNED
        - REFUSED
      description: The status of the component
      example: REPAIRED
    ConditionStatus:
      type: object
      properties:
        condition:
          $ref: '#/components/schemas/ConditionEnum'
        status:
          $ref: '#/components/schemas/StatusEnum'
      description: The condition and status of the component
    DistanceLeftComponent:
      type: object
      properties:
        condition:
          $ref: '#/components/schemas/ConditionEnum'
        status:
          $ref: '#/components/schemas/StatusEnum'
        wearLeft:
          type: number
          format: float
          example: 1.22
          description: The wear left
        distanceLeft:
          type: number
          format: float
          example: 2.53
          description: The distance left
        distanceUOM:
          type: string
          maxLength: 255
          description: The unit of measure of the distance left
          example: km
    NextServiceDTO:
      type: object
      properties:
        date:
          type: string
          format: date
          description: The next service date
          example: '2024-12-31'
        distanceLeft:
          type: number
          format: float
          example: 2.53
          description: The distance left
        distanceUOM:
          type: string
          maxLength: 255
          description: The unit of measure of the distance left
          example: km
    CreateMastercheckQueryDTO:
      type: object
      properties:
        externalRef:
          type: string
          maxLength: 255
          description: The external reference of the mastercheck
          example: '12345678'
        vehicleExternalRef:
          type: string
          maxLength: 255
          description: The external reference of the vehicle
          example: '23456789'
        saleExternalRef:
          type: string
          maxLength: 255
          description: The external reference of the sale
          example: '34567890'
        date:
          type: string
          format: date
          description: The visit date
          example: '2024-12-31'
        nextService:
          $ref: '#/components/schemas/NextServiceDTO'
        rims:
          description: The rims status of the vehicle
          $ref: '#/components/schemas/ConditionStatus'
        tyres:
          type: object
          properties:
            condition:
              $ref: '#/components/schemas/ConditionEnum'
            status:
              $ref: '#/components/schemas/StatusEnum'
            measurements:
              type: array
              items:
                type: object
                properties:
                  axlePosition:
                    type: integer
                    format: int32
                    description: The position of the axle
                    example: '1'
                  tyrePosition:
                    type: integer
                    format: int32
                    description: The position of the tyre
                    example: '1'
                  wear:
                    type: array
                    items:
                      type: object
                      properties:
                        groovePosition:
                          type: integer
                          format: int32
                          description: The position of the groove
                          example: '1'
                        treadDepth:
                          type: number
                          format: float
                          description: The tread depth
                          example: '1.2'
                  dot:
                    type: integer
                    format: int32
                    description: The DOT code
                    example: 0006X
                  pressure:
                    type: number
                    format: float
                    description: The pressure
                    example: '1.2'
                required:
                  - axlePosition
                  - tyrePosition
        alignment:
          $ref: '#/components/schemas/ConditionStatus'
          description: The alignment status of the vehicle
        bodywork:
          $ref: '#/components/schemas/ConditionStatus'
          description: The bodywork status of the vehicle
        brakeFluid:
          $ref: '#/components/schemas/ConditionStatus'
          description: The brake fluid status of the vehicle
        coolant:
          $ref: '#/components/schemas/ConditionStatus'
          description: The coolant status of the vehicle
        washerFluid:
          $ref: '#/components/schemas/ConditionStatus'
          description: The washer fluid status of the vehicle
        airConditioning:
          $ref: '#/components/schemas/ConditionStatus'
          description: The air conditioning status of the vehicle
        dashboardCAUTIONLight:
          $ref: '#/components/schemas/ConditionStatus'
          description: The dashboard caution light status of the vehicle
        oilLevel:
          $ref: '#/components/schemas/ConditionStatus'
          description: The oil level status of the vehicle
        batteryAux:
          $ref: '#/components/schemas/ConditionStatus'
          description: The auxiliary battery status of the vehicle
        indicators:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front indicators status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear indicators status of the vehicle
        windshield:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front windshield status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear windshield status of the vehicle
        wipers:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front wipers status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear wipers status of the vehicle
            wiperMotor:
              $ref: '#/components/schemas/ConditionStatus'
              description: The wiper motor status of the vehicle
            washerPump:
              $ref: '#/components/schemas/ConditionStatus'
              description: The washer pump status of the vehicle
        opticalGlass:
          $ref: '#/components/schemas/ConditionStatus'
          description: The optical glass status of the vehicle
        positionLights:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front position lights status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear position lights status of the vehicle
        dippedBeam:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front dipped beam status of the vehicle
        highBeam:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front high beam status of the vehicle
        fogLights:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front fog lights status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear fog lights status of the vehicle
        brakeLights:
          type: object
          properties:
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear brake lights status of the vehicle
        brakePads:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The front brake pads distance left status of the vehicle
            rear:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The rear brake pads distance left status of the vehicle
        brakeDiscs:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The front brake discs distance left status of the vehicle
            rear:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The rear brake discs distance left status of the vehicle
        transmission:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front transmission status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear transmission status of the vehicle
        suspension:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front suspension status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear suspension status of the vehicle
        steering:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front steering status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear steering status of the vehicle
        bearings:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front bearings status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear bearings status of the vehicle
        chargingSocketHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The charging socket HV status of the vehicle
        chargingCableHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The charging cable HV status of the vehicle
        orangeCableHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The orange cable HV status of the vehicle
        batteryTrunkHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The battery trunk HV status of the vehicle
        fluidLeakHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The fluid leak HV status of the vehicle
      required:
        - externalRef
        - date
    CreateMastercheckResponseDTO:
      type: object
      properties:
        code:
          type: string
          maxLength: 50
          description: Code of the mastercheck you have just created or updated
          example: '100000000'
    GetMastercheckResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination informations
          $ref: '#/components/schemas/PaginationDTO'
        mastercheck:
          type: array
          maxItems: 1000
          items:
            description: Mastercheck informations
            $ref: '#/components/schemas/GetMastercheckDTO'
    ExternalRefParam:
      type: string
      example: '1000045'
      description: Source application code of the sale
      maxLength: 255
    SourceParam:
      type: string
      example: GENES
      description: Source of the external reference
      maxLength: 255
    GetMastercheckDTO:
      type: object
      properties:
        date:
          type: string
          description: The mastercheck date
          example: '2024-12-31'
          pattern: ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})$
        code:
          type: string
          description: The Mastercheck code
          maxLength: 255
          example: '1009876'
        vehicleCode:
          type: string
          description: The Vehicle code
          maxLength: 255
          example: '1076543'
        saleCode:
          type: string
          description: The Sale code
          maxLength: 255
          example: '1016728'
        nextService:
          $ref: '#/components/schemas/NextServiceDTO'
        rims:
          $ref: '#/components/schemas/ConditionStatus'
        tyres:
          type: object
          properties:
            condition:
              $ref: '#/components/schemas/ConditionEnum'
            status:
              $ref: '#/components/schemas/StatusEnum'
            measurements:
              type: array
              items:
                type: object
                properties:
                  axlePosition:
                    type: integer
                    format: int32
                    description: The position of the axle
                    example: '1'
                  tyrePosition:
                    type: integer
                    format: int32
                    description: The position of the tyre
                    example: '1'
                  wear:
                    type: array
                    items:
                      type: object
                      properties:
                        groovePosition:
                          type: integer
                          format: int32
                          description: The position of the groove
                          example: '1'
                        treadDepth:
                          type: number
                          format: float
                          description: The tread depth
                          example: '1.2'
                  dot:
                    type: integer
                    format: int32
                    description: The DOT code
                    example: 0006X
                  pressure:
                    type: number
                    format: float
                    description: The pressure
                    example: '1.2'
                required:
                  - axlePosition
                  - tyrePosition
        alignment:
          $ref: '#/components/schemas/ConditionStatus'
          description: The alignment status of the vehicle
        bodywork:
          $ref: '#/components/schemas/ConditionStatus'
          description: The bodywork status of the vehicle
        brakeFluid:
          $ref: '#/components/schemas/ConditionStatus'
          description: The brake fluid status of the vehicle
        coolant:
          $ref: '#/components/schemas/ConditionStatus'
          description: The coolant status of the vehicle
        washerFluid:
          $ref: '#/components/schemas/ConditionStatus'
          description: The washer fluid status of the vehicle
        airConditioning:
          $ref: '#/components/schemas/ConditionStatus'
          description: The air conditioning status of the vehicle
        dashboardCAUTIONLight:
          $ref: '#/components/schemas/ConditionStatus'
          description: The dashboard caution light status of the vehicle
        oilLevel:
          $ref: '#/components/schemas/ConditionStatus'
          description: The oil level status of the vehicle
        batteryAux:
          $ref: '#/components/schemas/ConditionStatus'
          description: The auxiliary battery status of the vehicle
        indicators:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front indicators status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear indicators status of the vehicle
        windshield:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front windshield status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear windshield status of the vehicle
        wipers:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front wipers status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear wipers status of the vehicle
            wiperMotor:
              $ref: '#/components/schemas/ConditionStatus'
              description: The wiper motor status of the vehicle
            washerPump:
              $ref: '#/components/schemas/ConditionStatus'
              description: The washer pump status of the vehicle
        opticalGlass:
          $ref: '#/components/schemas/ConditionStatus'
          description: The optical glass status of the vehicle
        positionLights:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front position lights status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear position lights status of the vehicle
        dippedBeam:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front dipped beam status of the vehicle
        highBeam:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front high beam status of the vehicle
        fogLights:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front fog lights status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear fog lights status of the vehicle
        brakeLights:
          type: object
          properties:
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear brake lights status of the vehicle
        brakePads:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The front brake pads distance left status of the vehicle
            rear:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The rear brake pads distance left status of the vehicle
        brakeDiscs:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The front brake discs distance left status of the vehicle
            rear:
              $ref: '#/components/schemas/DistanceLeftComponent'
              description: The rear brake discs distance left status of the vehicle
        transmission:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front transmission status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear transmission status of the vehicle
        suspension:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front suspension status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear suspension status of the vehicle
        steering:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front steering status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear steering status of the vehicle
        bearings:
          type: object
          properties:
            front:
              $ref: '#/components/schemas/ConditionStatus'
              description: The front bearings status of the vehicle
            rear:
              $ref: '#/components/schemas/ConditionStatus'
              description: The rear bearings status of the vehicle
        chargingSocketHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The charging socket HV status of the vehicle
        chargingCableHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The charging cable HV status of the vehicle
        orangeCableHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The orange cable HV status of the vehicle
        batteryTrunkHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The battery trunk HV status of the vehicle
        fluidLeakHV:
          $ref: '#/components/schemas/ConditionStatus'
          description: The fluid leak HV status of the vehicle
        references:
          description: The list of external references associated with the vehicle
          type: array
          items:
            type: object
            properties:
              source:
                description: Source of the external reference
                type: string
                maxLength: 20
                example: ES_EQUITY
              externalRef:
                description: Identifier of the external reference
                type: string
                maxLength: 255
                example: '12345678'
              countryCode:
                description: Country related to the external reference
                type: string
                maxLength: 255
                example: FR
              lastModifiedDate:
                type: string
                example: '2024-04-09T06:59:51'
                description: Last technical modification of the inspection
                pattern: >-
                  ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
    PaginationDTO:
      type: object
      additionalProperties: false
      properties:
        next:
          type: string
          maxLength: 200
          description: Url for next page
          example: /vcs-erm/v1/inspections?page=3&size=50
        previous:
          type: string
          maxLength: 200
          description: Url for previous page
          example: /vcs-erm/v1/inspections?page=1&size=50
        pageTotal:
          type: integer
          format: int32
          example: '2'
          minimum: 0
          maximum: 1000
          description: Number total of page available
        totalElements:
          type: integer
          format: int32
          example: '200'
          minimum: 0
          maximum: 10000
          description: Number total of elements available
    lastModifiedDateFromParam:
      type: string
      format: date-time
      example: '2024-05-02T10:00:00'
      description: last modified date from, must have the format yyyy-MM-ddTHH:mm:ss
    lastModifiedDateToParam:
      type: string
      format: date-time
      example: '2024-05-02T10:00:00'
      description: last modified date to, must have the format yyyy-MM-ddTHH:mm:ss
    PageNumberQueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 1000
      description: The number of page requested, minimum 1
    PageSizeQueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 1000
      description: The size of the page
    BadRequestDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: object
            properties:
              error:
                type: string
                format: string
                description: Error message
              property:
                type: string
                format: string
                description: The name of the field affected by the error
    ForbiddenDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: object
            properties:
              error:
                type: string
                format: string
                description: Error message
              property:
                type: string
                format: string
                description: The name of the field affected by the error
    InternalErrorDTO:
      type: object
      properties:
        error:
          type: string
          example: Unexpected error
    UnauthorizedDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: object
            properties:
              error:
                type: string
                format: string
                description: Error message
              property:
                type: string
                format: string
                description: The name of the field affected by the error
  responses:
    CreateMastercheckResponseDTO:
      description: The mastercheck creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateMastercheckResponseDTO'
          examples:
            createMastercheck:
              summary: Mastercheck successfully created
              value:
                code: '10001111'
    GetMastercheckResponseDTO:
      description: The get Masterchecks response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetMastercheckResponseDTO'
          examples:
            standardResponse:
              summary: Masterchecks
              value:
                pagination:
                  next: /mastercheck-erm/v1/masterchecks?page=3&size=50
                  previous: /mastercheck-erm/v1/masterchecks?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                mastercheck:
                  - date: '2024-12-31'
                    code: '1009876'
                    vehicleCode: '1076543'
                    saleCode: '1016728'
                    nextService:
                      date: '2024-12-31'
                      distanceLeft: 5000
                      distanceUOM: km
                    rims:
                      condition: KO
                      status: PLANNED
                    tyres:
                      condition: OK
                      status: REPAIRED
                      measurements:
                        - axlePosition: '1'
                          tyrePosition: '1'
                          wear:
                            - groovePosition: 1
                              treadDepth: 2
                            - groovePosition: 2
                              treadDepth: 2
                            - groovePosition: 3
                              treadDepth: 2
                          dot: '4218'
                          pressure: 2.5
                        - axlePosition: '1'
                          tyrePosition: '2'
                          wear:
                            - groovePosition: 1
                              treadDepth: 2
                            - groovePosition: 2
                              treadDepth: 2
                            - groovePosition: 3
                              treadDepth: 2
                          dot: '4218'
                          pressure: 2.5
                        - axlePosition: '2'
                          tyrePosition: '1'
                          wear:
                            - groovePosition: 1
                              treadDepth: 2
                            - groovePosition: 2
                              treadDepth: 2
                            - groovePosition: 3
                              treadDepth: 2
                          dot: '4218'
                          pressure: 2.3
                        - axlePosition: '2'
                          tyrePosition: '2'
                          wear:
                            - groovePosition: 1
                              treadDepth: 2
                            - groovePosition: 2
                              treadDepth: 2
                            - groovePosition: 3
                              treadDepth: 2
                          dot: '4218'
                          pressure: 2.3
                    alignment:
                      condition: KO
                      status: PLANNED
                    bodywork:
                      condition: KO
                      status: PLANNED
                    brakeFluid:
                      condition: KO
                      status: PLANNED
                    coolant:
                      condition: KO
                      status: PLANNED
                    washerFluid:
                      condition: KO
                      status: PLANNED
                    airConditioning:
                      condition: KO
                      status: PLANNED
                    dashboardCAUTIONLight:
                      condition: KO
                      status: PLANNED
                    oilLevel:
                      condition: KO
                      status: PLANNED
                    batteryAux:
                      condition: KO
                      status: PLANNED
                    indicators:
                      front:
                        condition: KO
                        status: PLANNED
                      rear:
                        condition: KO
                        status: PLANNED
                    windshield:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    wipers:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                      wiperMotor:
                        condition: OK
                        status: REPAIRED
                      washerPump:
                        condition: OK
                        status: REPAIRED
                    opticalGlass:
                      condition: OK
                      status: REPAIRED
                    positionLights:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    dippedBeam:
                      front:
                        condition: OK
                        status: REPAIRED
                    highBeam:
                      front:
                        condition: OK
                        status: REPAIRED
                    fogLights:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    brakeLights:
                      rear:
                        condition: OK
                        status: REPAIRED
                    brakePads:
                      front:
                        condition: OK
                        status: REPAIRED
                        wearLeft: 2
                        distanceLeft: 5000
                        distanceUOM: km
                      rear:
                        condition: OK
                        status: REPAIRED
                        wearLeft: 2
                        distanceLeft: 5000
                        distanceUOM: km
                    brakeDiscs:
                      front:
                        condition: OK
                        status: REPAIRED
                        wearLeft: 2
                        distanceLeft: 5000
                        distanceUOM: km
                      rear:
                        condition: OK
                        status: REPAIRED
                        wearLeft: 2
                        distanceLeft: 5000
                        distanceUOM: km
                    transmission:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    suspension:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    steering:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    bearings:
                      front:
                        condition: OK
                        status: REPAIRED
                      rear:
                        condition: OK
                        status: REPAIRED
                    chargingSocketHV:
                      condition: OK
                      status: REPAIRED
                    chargingCableHV:
                      condition: OK
                      status: REPAIRED
                    orangeCableHV:
                      condition: OK
                      status: REPAIRED
                    batteryTrunkHV:
                      condition: OK
                      status: REPAIRED
                    fluidLeakHV:
                      condition: OK
                      status: REPAIRED
                    references:
                      - source: ES_EQUITY
                        externalRef: '20831238'
                        countryCode: ES
                        lastModifiedDate: '2024-12-27T12:23:23'
    UnauthorizedDTO:
      description: The requester is not recognized by our system.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedDTO'
          examples:
            Unknown client id:
              summary: Unknown client id
              value:
                errors:
                  - error: Unknown client id, please contact our API service support
                    property: clientid
            Missing client id:
              summary: Missing client id
              value:
                errors:
                  - error: The client id is missing
                    property: clientid
            Bad credentials:
              summary: The credentials are wrong
              value:
                errors:
                  - error: The credentials are wrong
                    property: Authorization
            Missing credentials:
              summary: The credentials are missing
              value:
                errors:
                  - error: The credentials are missing
                    property: Authorization
    InternalErrorDTO:
      description: An internal error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalErrorDTO'
          examples:
            internalError:
              summary: An internal error occurred
              value:
                errors:
                  - error: >-
                      An internal error occurred, please try again later. Thank
                      you for your understanding
