> ## 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.

# Add a file to the latest registration certificate

> Upload an image of either the front or back side of the registration certificate for the already existing and latest one

<Note>This endpoint deals with defining the name and content type of the file. Use [Get a file upload link](/api-reference/files/get-a-file-upload-link) to upload the actual content of the file by providing the **UUID** and **secret** from the response.</Note>


## OpenAPI

````yaml /api-reference/m2m-api.yml put /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/blobs/registration-certificates
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}/blobs/registration-certificates:
    put:
      tags:
        - Registration certificates
      summary: Add a file to the latest registration certificate
      description: >-
        Upload an image of either the front or back side of the registration
        certificate for the already existing and latest one
      operationId: addRegistrationCertificateBlob
      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
        - name: contentType
          in: query
          description: Content type of the file to be uploaded
          required: true
          schema:
            $ref: '#/components/schemas/FileType'
        - name: side
          in: query
          description: Side of the registration certificate
          required: true
          schema:
            type: string
            enum:
              - frontSide
              - backSide
      responses:
        '200':
          description: BLOB information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistrationCertificateBlobResponse'
        '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:
    FileType:
      type: string
      enum:
        - image/jpeg
        - image/png
        - application/pdf
    RegistrationCertificateBlobResponse:
      type: object
      required:
        - uuid
        - secret
      properties:
        uuid:
          type: string
          format: uuid
        secret:
          type: string
  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

````