{"openapi":"3.0.0","paths":{"/api/v1/pers/private-encrypt":{"post":{"operationId":"ExtensionController_privateEncrypt_v1","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PrivateEncryptDTO"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePrivateEncryptDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"Encrypt data with private key","tags":["Generic"]}},"/api/v1/pers/private-decrypt":{"post":{"operationId":"ExtensionController_privateDecrypt_v1","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PrivateDecryptDTO"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePrivateDecryptDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"Decrypt data with private key","tags":["Generic"]}},"/api/v1/pers/get-auth-pers":{"post":{"operationId":"CommonVehicleController_getAuthPersV1_v1","parameters":[],"requestBody":{"required":true,"description":"Request get auth PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAuthPERSDTO"}}}},"responses":{"200":{"description":"Request get auth PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetAuthPERSDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"PERS login/authentification","tags":["Vehicle PERS"]}},"/api/v2/pers/get-auth-pers":{"post":{"operationId":"CommonVehicleController_getAuthPersV2_v2","parameters":[],"requestBody":{"required":true,"description":"Request get auth PERS V2<br/><br/>\n    <strong>Note:</strong> The field <code>nuSerialNumberEncrypted</code> should be the RSA encrypted value of <code>nuSerialPersNumber</code> encoded in base64 format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAuthPERSV2DTO"}}}},"responses":{"200":{"description":"Request get auth PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetAuthPERSDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"PERS login/authentification v2","tags":["Vehicle PERS"]}},"/api/v3/pers/get-auth-pers":{"post":{"operationId":"CommonVehicleController_getAuthPersV3_v3","parameters":[],"requestBody":{"required":true,"description":"Request get auth PERS V3<br/><br/>\n    <strong>Note:</strong> Uses ECC/ECDSA (SECP256R1/P-256 + SHA-256) instead of RSA.<br/>\n    The field <code>persSerialNumberEncrypted</code> should be the ECDSA signature of <code>persSerialNumber</code> encoded in base64 format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAuthPERSV3DTO"}}}},"responses":{"200":{"description":"Request get auth PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetAuthPERSV3DTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"PERS login/authentification v3 (ECC/ECDSA)","tags":["Vehicle PERS"]}},"/api/v1/pers/firmware/segments/{segmentId}/index/{segmentIndex}":{"get":{"operationId":"CommonVehicleController_downloadPersFirmware_v1","parameters":[{"name":"segmentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"segmentIndex","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Firmware downloaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersDownloadFirmwareResponseDTO"}}}},"206":{"description":"Partial content returned (when Range header is used)"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"summary":"Download firmware for a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/get-new-auth-pers":{"post":{"operationId":"VehiclePERSController_getNewAuthPERS_v1","parameters":[],"requestBody":{"required":true,"description":"Request get new auth PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestWithAuthPERSDTO"}}}},"responses":{"200":{"description":"Get new auth vehicle successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetNewAuthPERSDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Renew Authentification of a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/get-what-to-do":{"post":{"operationId":"VehiclePERSController_getWhatToDo_v1","parameters":[],"responses":{"200":{"description":"Get what to do successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetWhatToDoDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get What To Do of a PERS","tags":["Vehicle PERS"]}},"/api/v2/pers/get-what-to-do":{"post":{"operationId":"VehiclePERSController_getWhatToDoV2_v2","parameters":[],"responses":{"200":{"description":"Get what to do successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetWhatToDoV2DTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get What To Do of a PERS v2","tags":["Vehicle PERS"]}},"/api/v1/pers/get-new-pin-ble-pers":{"post":{"operationId":"VehiclePERSController_getNewPinBLEPERS_v1","parameters":[],"requestBody":{"required":true,"description":"Request get new pin BLE PERS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestNewPinBLEPERSDTO"}}}},"responses":{"200":{"description":"Get new pin BLE PERS successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetNewPinBLEPERSDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get new pin BLE of a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/get-new-hard-token-pers":{"post":{"operationId":"VehiclePERSController_getNewHardTokenPERS_v1","parameters":[],"responses":{"200":{"description":"Get new hard token vehicle successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetNewHardTokenPERSDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get a list of new hard token of a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/get-vehicle-list-users":{"post":{"operationId":"VehiclePERSController_getVehicleListUser_v1","parameters":[],"responses":{"200":{"description":"Get vehicle list users successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetVehicleListUsersDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get a list of vehicle user of a PERS","tags":["Vehicle PERS"]}},"/api/v2/pers/get-vehicle-list-users":{"post":{"operationId":"VehiclePERSController_getVehicleListUserV2_v2","parameters":[],"responses":{"200":{"description":"Get vehicle list users successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetVehicleListUsersV2DTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get a list of vehicle user of a PERS v2","tags":["Vehicle PERS"]}},"/api/v1/pers/pers/firmware/latest-version":{"get":{"operationId":"VehiclePERSController_getLatestFirmwareVersion_v1","parameters":[{"name":"firmwareVersion","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Latest firmware version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestFirmwareVersionDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get latest firmware version for PERS","tags":["Vehicle PERS"]}},"/api/v2/pers/pers/firmware/latest-version":{"get":{"operationId":"VehiclePERSController_getLatestFirmwareVersionV2_v2","parameters":[{"name":"currentFirmwareVersion","required":false,"in":"query","description":"Current firmware version on the PERS","schema":{"type":"string"}},{"name":"firmwareType","required":true,"in":"query","description":"Firmware type: main (Application), recovery (Recovery), boot (Bootloader)","schema":{"enum":["main","recovery","boot"],"type":"string"}}],"responses":{"200":{"description":"Latest firmware version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestFirmwareVersionV2DTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get latest firmware version for PERS v2 (per firmware type)","tags":["Vehicle PERS"]}},"/api/v1/pers/pers/firmware/{firmwareUuid}/download":{"post":{"operationId":"VehiclePERSController_persDownloadFirmwareV1_v1","parameters":[{"name":"firmwareUuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Firmware download URLs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersDownloadFirmwareResponseDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get list url segments to download firmware for a PERS","tags":["Vehicle PERS"]}},"/api/v2/pers/pers/firmware/{firmwareUuid}/download":{"post":{"operationId":"VehiclePERSController_persDownloadFirmwareV2_v2","parameters":[{"name":"firmwareUuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Firmware download URLs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersDownloadFirmwareResponseDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get list url segments to download firmware for a PERS v2","tags":["Vehicle PERS"]}},"/api/v3/pers/pers/firmware/{firmwareUuid}/download":{"post":{"description":"Returns the firmware total size in bytes, the firmware UUID and the number of segments. The PERS then downloads each segment via the per-segment streaming endpoint.","operationId":"VehiclePERSController_persDownloadFirmwareV3_v3","parameters":[{"name":"firmwareUuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"segmentSize","required":true,"in":"query","description":"Size in bytes of each firmware segment that the PERS can download (except maybe the last one), used by the server to determine the number of segments to send in the response.","schema":{"type":"number"}}],"responses":{"200":{"description":"Firmware download metadata retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersDownloadFirmwareV3ResponseDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get firmware download metadata for a PERS v3 (size + nb segments)","tags":["Vehicle PERS"]}},"/api/v1/pers/get-new-key-session":{"post":{"operationId":"VehiclePERSController_getNewKeySession_v1","parameters":[],"responses":{"200":{"description":"Get new key session successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGetNewKeySessionDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get new key session for a PERS","tags":["Vehicle PERS"]}},"/api/v2/pers/pers/firmware/version":{"post":{"operationId":"VehiclePERSController_persStoreFirmwareVersionV2_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFirmwareVersionV2DTO"}}}},"responses":{"204":{"description":"Firmware version stored successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Store firmware version for a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/pers/firmware/version":{"post":{"operationId":"VehiclePERSController_persStoreFirmwareVersion_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFirmwareVersionDTO"}}}},"responses":{"204":{"description":"Firmware version stored successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Store firmware version for a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/renew-cixi-pub-keys":{"post":{"deprecated":true,"description":"@deprecated Use POST `/api/v1/pers/get-cixi-key` instead (AP-749).","operationId":"VehiclePERSController_renewCIXIPubKeys_v1","parameters":[],"requestBody":{"required":true,"description":"Request to renew CIXI public keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewCIXIPubKeysDTO"}}}},"responses":{"200":{"description":"CIXI public keys renewed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRenewCIXIPubKeysDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Renew CIXI public keys for a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/renew-pers-keys":{"post":{"deprecated":true,"description":"@deprecated Use POST `/api/v1/pers/provide-pers-key` instead (AP-750).","operationId":"VehiclePERSController_renewPERSKeys_v1","parameters":[],"requestBody":{"required":true,"description":"Request to renew PERS public keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewPERSKeysDTO"}}}},"responses":{"204":{"description":"PERS public keys renewed successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Renew PERS public keys","tags":["Vehicle PERS"]}},"/api/v1/pers/get-cixi-key":{"post":{"description":"The PERS sends the CIXI public key it currently holds (`knownCIXIPublicKey`, base64 of the raw 64B X||Y). The server verifies it matches the current or previous per-PERS CIXI key, generates a new EC P-256 key pair, rotates it, and returns the new public key in the body and the signature of the known public key (signed with the matching old private key) in the `X-CIXI-Signature` response header.","operationId":"VehiclePERSController_getCIXIKey_v1","parameters":[],"requestBody":{"required":true,"description":"Request a new CIXI public key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCIXIKeyRequestDTO"}}}},"responses":{"200":{"description":"New CIXI public key issued; signature in `X-CIXI-Signature`","headers":{"X-CIXI-Signature":{"description":"Base64 of `[CRC32 4B][rawSig 64B][knownCIXIPublicKey body 64B]` (132 bytes), signed with the matching old CIXI private key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCIXIKeyResponseDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"AP-749 — Issue a fresh CIXI public key, signed by the previously known one","tags":["Vehicle PERS"]}},"/api/v1/pers/provide-pers-key":{"post":{"description":"The PERS sends the new PERS public key (`PERSKeyPublic`, base64 of the raw 64B X||Y). The server updates it if it’s different from the current one, and returns no content.","operationId":"VehiclePERSController_providePERSKey_v1","parameters":[],"requestBody":{"required":true,"description":"Request to provide a new PERS public key, with `PERSKeyPublic` as the base64 of the raw 64B X||Y.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvidePERSKeyRequestDTO"}}}},"responses":{"204":{"description":"New PERS public key provided successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"AP-750 — Provide a freshly generated PERS public key","tags":["Vehicle PERS"]}},"/api/v1/pers/firmware/{firmwareUuid}/{segmentIndex}/download":{"get":{"operationId":"VehiclePERSController_downloadPersFirmware_v1","parameters":[{"name":"firmwareUuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"segmentIndex","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"206":{"description":"Partial content returned (when Range header is used)"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Download firmware for a PERS","tags":["Vehicle PERS"]}},"/api/v1/pers/usage-system-log":{"post":{"operationId":"UsageSystemLogController_storePersUsageSystemLog_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPersUsageSystemLogCreateDTO"}}}},"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"Store pers usage system log","tags":["Usage System Log"]}},"/api/v1/pers/backoffice/usage-system-log":{"get":{"operationId":"UsageSystemLogController_getUsageSystemLogs_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string"}},{"name":"logLabel","required":false,"in":"query","schema":{"type":"string"}},{"name":"sender","required":false,"in":"query","schema":{"type":"string"}},{"name":"persId","required":false,"in":"query","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"type","required":true,"in":"query","schema":{"enum":[1,2,3,4],"type":"number"}}],"responses":{"200":{"description":"Get a list of key usage system logs instance successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSystemLogListDTO"}}}}},"summary":"Get a list of key usage system logs.","tags":["Usage System Log"]}},"/api/v1/pers/backoffice/usage-system-log/{id}":{"get":{"operationId":"UsageSystemLogController_getUsageSystemLogById_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Get pers usage system log by id successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSystemLogResponseDTO"}}}}},"summary":"Get pers usage system log by id","tags":["Usage System Log"]}},"/api/v1/pers/configuration/{id}/pers-to-server":{"post":{"operationId":"ConfigurationPersController_getConfigFileFromPers_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigFileDTO"}}}},"responses":{"204":{"description":"Upload configuration file from PERS to server successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Upload configuration file from PERS to server","tags":["Configuration Pers Update"]}},"/api/v1/pers/configuration/{id}/server-to-pers":{"post":{"operationId":"ConfigurationPersController_getConfigFileFromPersToServer_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigFileDTO"}}}},"responses":{"200":{"description":"Get configuration file from Server to Pers successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigFileFromPersToServerDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Get configuration file from Server to Pers","tags":["Configuration Pers Update"]}},"/api/v1/pers/configuration/{id}/close-configuration-file":{"post":{"operationId":"ConfigurationPersController_closeConfigurationFileCommPers_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Close configuration file from Server to Pers successfully"},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"bearer":[]}],"summary":"Close configuration file from Server to Pers","tags":["Configuration Pers Update"]}},"/api/v1/internal/iot/authorize":{"post":{"description":"Validates user credentials and PERS existence. Returns the allowed flag and MQTT topic policy template on success, or denied on failure.","operationId":"IotAuthorizeController_authorize_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IotAuthorizeDTO"}}}},"responses":{"200":{"description":"Authorization result (allowed or denied)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IotAuthorizeResponseDTO"}}}},"400":{"description":"Bad Request Error"},"401":{"description":"Unauthorized Error"},"403":{"description":"Forbidden Error"},"422":{"description":"Unprocessable Entity Error"},"500":{"description":"Internal Server Error"}},"security":[{"x-api-key":[]}],"summary":"Authorize an IoT PERS device for MQTT connectivity","tags":["Internal IoT"]}}},"info":{"title":"CIXI PERS","description":"The CIXI PERS API description","version":"0.0.1","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"},"x-api-key":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PrivateEncryptDTO":{"type":"object","properties":{"data":{"type":"string"},"privateKey":{"type":"string","format":"binary"}},"required":["data","privateKey"]},"ResponsePrivateEncryptDTO":{"type":"object","properties":{"success":{"type":"boolean"},"encryptData":{"type":"string"}},"required":["success","encryptData"]},"PrivateDecryptDTO":{"type":"object","properties":{"encryptData":{"type":"string"},"privateKey":{"type":"string","format":"binary"}},"required":["encryptData","privateKey"]},"ResponsePrivateDecryptDTO":{"type":"object","properties":{"success":{"type":"boolean"},"decryptData":{"type":"string"}},"required":["success","decryptData"]},"GetAuthPERSDTO":{"type":"object","properties":{"nuSerialPersNumber":{"type":"string"}},"required":["nuSerialPersNumber"]},"HardTokenDTO":{"type":"object","properties":{"hardToken":{"type":"string"},"dtExpirationHardToken":{"format":"date-time","type":"string"}},"required":["hardToken","dtExpirationHardToken"]},"ResponseGetAuthPERSDTO":{"type":"object","properties":{"jwtTokenPERS":{"type":"string"},"idPers":{"type":"string"},"idVehicle":{"type":"string"},"pinBLE":{"type":"string"},"hardTokenList":{"type":"array","items":{"$ref":"#/components/schemas/HardTokenDTO"}}},"required":["jwtTokenPERS","idPers","idVehicle","pinBLE","hardTokenList"]},"GetAuthPERSV2DTO":{"type":"object","properties":{"nuSerialPersNumber":{"type":"string"},"nuSerialNumberEncrypted":{"type":"string"}},"required":["nuSerialPersNumber","nuSerialNumberEncrypted"]},"GetAuthPERSV3DTO":{"type":"object","properties":{"nuSerialPersNumber":{"type":"string","description":"The serial number of the PERS device"},"nuSerialPersNumberEncrypted":{"type":"string","description":"The serial number encrypted with ECC/ECDSA (SECP256R1/P-256) and encoded in base64"}},"required":["nuSerialPersNumber","nuSerialPersNumberEncrypted"]},"ResponseGetAuthPERSV3DTO":{"type":"object","properties":{"jwtTokenPERS":{"type":"string"},"idPers":{"type":"string"}},"required":["jwtTokenPERS","idPers"]},"PersDownloadFirmwareResponseDTO":{"type":"object","properties":{"firmwareUuid":{"type":"string"},"version":{"type":"string"},"fileName":{"type":"string"},"size":{"type":"number"},"sessionKey":{"type":"string"},"segments":{"type":"array","items":{"type":"string"}}},"required":["firmwareUuid","version","fileName","size","sessionKey","segments"]},"RequestWithAuthPERSDTO":{"type":"object","properties":{"jwtTokenPERS":{"type":"string"}},"required":["jwtTokenPERS"]},"ResponseGetNewAuthPERSDTO":{"type":"object","properties":{"jwtTokenPERS":{"type":"string"},"idPers":{"type":"string"}},"required":["jwtTokenPERS","idPers"]},"ResponseGetWhatToDoDTO":{"type":"object","properties":{"toRenewAuthPERS":{"type":"boolean"},"toRenewPinBLEPERS":{"type":"boolean"},"toRenewHardTokenPERS":{"type":"boolean"},"toRenewVehicleListUsers":{"type":"boolean"},"toStopVehicleASAP":{"type":"boolean"},"firmwareToDownload":{"type":"boolean"},"toActivateGeoloc":{"type":"boolean"},"toInactivateGeoloc":{"type":"boolean"},"toRenewCIXIKeys":{"type":"boolean"},"toRenewPERSKeys":{"type":"boolean"}},"required":["toRenewAuthPERS","toRenewPinBLEPERS","toRenewHardTokenPERS","toRenewVehicleListUsers","toStopVehicleASAP","firmwareToDownload","toActivateGeoloc","toInactivateGeoloc","toRenewCIXIKeys","toRenewPERSKeys"]},"ResponseGetWhatToDoV2DTO":{"type":"object","properties":{"toUpdateVehicleListUsers":{"type":"boolean"},"toSendKnownUsers":{"type":"boolean"},"toUpdateOwner":{"type":"boolean"},"toLockVehicleASAP":{"type":"boolean"},"toDownloadApplicationFirmware":{"type":"boolean"},"toDownloadRecoveryFirmware":{"type":"boolean"},"toDownloadBootloader":{"type":"boolean"},"toSendConfigFile":{"type":"boolean"},"toGetNewConfigFile":{"type":"boolean"},"toGetCIXIKeys":{"type":"boolean"},"toRenewPERSKeys":{"type":"boolean"}},"required":["toUpdateVehicleListUsers","toSendKnownUsers","toUpdateOwner","toLockVehicleASAP","toDownloadApplicationFirmware","toDownloadRecoveryFirmware","toDownloadBootloader","toSendConfigFile","toGetNewConfigFile","toGetCIXIKeys","toRenewPERSKeys"]},"RequestNewPinBLEPERSDTO":{"type":"object","properties":{"jwtTokenPERS":{"type":"string"},"nameBLE":{"type":"string"}},"required":["jwtTokenPERS","nameBLE"]},"ResponseGetNewPinBLEPERSDTO":{"type":"object","properties":{"pinBLE":{"type":"string"},"dtExpirationPinBLEPERS":{"format":"date-time","type":"string"}},"required":["pinBLE","dtExpirationPinBLEPERS"]},"NewHardTokenPERSDTO":{"type":"object","properties":{"hardToken":{"type":"string"},"dtExpirationHardToken":{"format":"date-time","type":"string"}},"required":["hardToken","dtExpirationHardToken"]},"ResponseGetNewHardTokenPERSDTO":{"type":"object","properties":{"hardTokenList":{"type":"array","items":{"$ref":"#/components/schemas/NewHardTokenPERSDTO"}}},"required":["hardTokenList"]},"VehicleListUsersDTO":{"type":"object","properties":{"idVehicleUser":{"type":"string"},"tokenVehicleUser":{"type":"string"},"dtBegin":{"format":"date-time","type":"string"},"dtEnd":{"format":"date-time","type":"string"},"dtExpirationTokenVehicleUser":{"format":"date-time","type":"string"},"userCodePin":{"type":"string"}},"required":["idVehicleUser","tokenVehicleUser","dtBegin","dtEnd","dtExpirationTokenVehicleUser","userCodePin"]},"ResponseGetVehicleListUsersDTO":{"type":"object","properties":{"vehicleUserList":{"type":"array","items":{"$ref":"#/components/schemas/VehicleListUsersDTO"}}},"required":["vehicleUserList"]},"VehicleListUsersV2DTO":{"type":"object","properties":{"idUser":{"type":"string","description":"User ID"},"dtBegin":{"format":"date-time","type":"string","description":"Begin date"},"dtEnd":{"format":"date-time","type":"string","description":"End date"},"action":{"type":"string","description":"PERS action (to do): 0x00: do nothing, 0x01: add, 0x02: remove, 0x03: update"}},"required":["idUser","dtBegin","dtEnd","action"]},"ResponseGetVehicleListUsersV2DTO":{"type":"object","properties":{"vehicleUserList":{"type":"array","items":{"$ref":"#/components/schemas/VehicleListUsersV2DTO"}}},"required":["vehicleUserList"]},"LatestFirmwareVersionDTO":{"type":"object","properties":{"firmwareToDownload":{"type":"boolean"},"firmwareUUID":{"type":"string"},"firmwareVersion":{"type":"string"},"firmwareType":{"type":"string","enum":["main","recovery","boot"],"description":"Firmware type: main (Application), recovery (Recovery), boot (Bootloader)"},"firmwareSizeCuts":{"type":"array","items":{"type":"number"}}},"required":["firmwareToDownload","firmwareUUID","firmwareVersion","firmwareType","firmwareSizeCuts"]},"LatestFirmwareVersionV2DTO":{"type":"object","properties":{"firmwareToDownload":{"type":"boolean"},"firmwareUUID":{"type":"string"},"firmwareVersionToDownload":{"type":"string"},"firmwareType":{"type":"string","enum":["main","recovery","boot"],"description":"Firmware type: main (Application), recovery (Recovery), boot (Bootloader)"},"firmwareSizeCuts":{"type":"array","items":{"type":"number"}}},"required":["firmwareToDownload","firmwareUUID","firmwareVersionToDownload","firmwareType","firmwareSizeCuts"]},"PersDownloadFirmwareV3ResponseDTO":{"type":"object","properties":{"firmwareSize":{"type":"number","description":"Firmware total size in bytes (uint32)."},"firmwareUuid":{"type":"string","description":"Firmware UUID."},"fileName":{"type":"string","description":"Firmware file name."},"firmwareNbSegments":{"type":"number","description":"Number of segments (uint16)."},"sessionKey":{"type":"string","description":"Encrypted session key for firmware download."}},"required":["firmwareSize","firmwareUuid","fileName","firmwareNbSegments","sessionKey"]},"ResponseGetNewKeySessionDTO":{"type":"object","properties":{"id":{"type":"string"},"keySession":{"type":"string"}},"required":["id","keySession"]},"StoreFirmwareVersionV2DTO":{"type":"object","properties":{"applicationFirmwareVersion":{"type":"string"},"recoveryFirmwareVersion":{"type":"string"},"bootloaderVersion":{"type":"string"}},"required":["applicationFirmwareVersion","recoveryFirmwareVersion","bootloaderVersion"]},"StoreFirmwareVersionDTO":{"type":"object","properties":{"firmwareVersion":{"type":"string"}},"required":["firmwareVersion"]},"RenewCIXIPubKeysDTO":{"type":"object","properties":{"sessionId":{"type":"string","description":"The session ID obtained from get-new-key-session"}},"required":["sessionId"]},"EncryptedKeyDTO":{"type":"object","properties":{"salt":{"type":"string"},"iv":{"type":"string"},"encrypted":{"type":"string"}},"required":["salt","iv","encrypted"]},"ResponseRenewCIXIPubKeysDTO":{"type":"object","properties":{"encryptedKeyPub":{"$ref":"#/components/schemas/EncryptedKeyDTO"}},"required":["encryptedKeyPub"]},"RenewPERSKeysDTO":{"type":"object","properties":{"sessionId":{"type":"string","description":"The session ID obtained from get-new-key-session"},"persKeyPublicEncrypted":{"type":"string","description":"The encrypted PERS public key"}},"required":["sessionId","persKeyPublicEncrypted"]},"GetCIXIKeyRequestDTO":{"type":"object","properties":{"knownCIXIPublicKey":{"type":"string","description":"Base64 of the raw 64B EC P-256 CIXI public key currently known by the PERS (X||Y)."}},"required":["knownCIXIPublicKey"]},"GetCIXIKeyResponseDTO":{"type":"object","properties":{"CIXIPublicKey":{"type":"string","description":"Base64 of the raw 64B EC P-256 newly issued CIXI public key (X||Y)."}},"required":["CIXIPublicKey"]},"ProvidePERSKeyRequestDTO":{"type":"object","properties":{"PERSKeyPublic":{"type":"string","description":"Base64 of the raw 64B EC P-256 PERS public key (X||Y) generated on-device. The server will store this as the new trusted PERS public key."}},"required":["PERSKeyPublic"]},"PersUsageSystemLogCreateDTO":{"type":"object","properties":{"module":{"type":"string"},"keyUsageSystemLog":{"type":"string"},"contentUsageSystemLog":{"type":"string"},"timezone":{"type":"string"},"persId":{"type":"string"},"vehicleUserId":{"type":"string"},"vehicleId":{"type":"string"},"userId":{"type":"string"},"individualVehicleSharingId":{"type":"string"},"jwtTokenPERS":{"type":"string"},"timestampUsageSystemLog":{"format":"date-time","type":"string"}},"required":["module","keyUsageSystemLog","contentUsageSystemLog","timezone","persId","vehicleUserId","vehicleId","userId","individualVehicleSharingId","jwtTokenPERS","timestampUsageSystemLog"]},"ListPersUsageSystemLogCreateDTO":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PersUsageSystemLogCreateDTO"}}},"required":["items"]},"MetaResponseDTO":{"type":"object","properties":{"totalItems":{"type":"number"},"itemCount":{"type":"number"},"itemsPerPage":{"type":"number"},"totalPages":{"type":"number"},"currentPage":{"type":"number"}},"required":["totalItems","itemCount","itemsPerPage","totalPages","currentPage"]},"LinkResponseDTO":{"type":"object","properties":{"first":{"type":"string"},"previous":{"type":"string"},"next":{"type":"string"},"last":{"type":"string"}},"required":["first","previous","next","last"]},"ModelPERSDTO":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"structureCalibration":{"type":"string"}},"required":["id","label","structureCalibration"]},"SoftwarePERSDTO":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]},"PersDTO":{"type":"object","properties":{"id":{"type":"string"},"nuSerialPersNumber":{"type":"string"},"modelPERS":{"$ref":"#/components/schemas/ModelPERSDTO"},"softwarePERS":{"$ref":"#/components/schemas/SoftwarePERSDTO"}},"required":["id","nuSerialPersNumber","modelPERS","softwarePERS"]},"UserDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"mobilePhone":{"type":"string"}},"required":["id","name","email","mobilePhone"]},"VehicleUserDTO":{"type":"object","properties":{"id":{"type":"string"},"vehicleId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDTO"},"companyMemberId":{"type":"string"},"dtBegin":{"format":"date-time","type":"string"},"dtEnd":{"format":"date-time","type":"string"},"dtLastUpdate":{"format":"date-time","type":"string"}},"required":["id","vehicleId","user","companyMemberId","dtBegin","dtEnd","dtLastUpdate"]},"VehicleTypeDTO":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","label","createdAt","updatedAt"]},"BaseVehicleBrandDTO":{"type":"object","properties":{"id":{"type":"string"},"avatar":{"type":"string"},"name":{"type":"string"}},"required":["id","avatar","name"]},"BaseVehicleModelDTO":{"type":"object","properties":{"id":{"type":"string"},"nameVehicleModel":{"type":"string"},"additionalInfo":{"type":"string"},"vehicleType":{"$ref":"#/components/schemas/VehicleTypeDTO"}},"required":["id","nameVehicleModel","additionalInfo","vehicleType"]},"BaseVehicleDTO":{"type":"object","properties":{"id":{"type":"string"},"nameVehicle":{"type":"string"},"serialNumber":{"type":"string"},"registrationNumber":{"type":"string"},"odooVehicleId":{"type":"string"},"avatar":{"type":"string"},"vehicleType":{"$ref":"#/components/schemas/VehicleTypeDTO"},"brand":{"$ref":"#/components/schemas/BaseVehicleBrandDTO"},"vehicleModel":{"$ref":"#/components/schemas/BaseVehicleModelDTO"}},"required":["id","nameVehicle","serialNumber","registrationNumber","odooVehicleId","avatar","vehicleType","brand","vehicleModel"]},"IndividualVehicleSharingDTO":{"type":"object","properties":{"id":{"type":"string"},"sharingType":{"type":"number","enum":[1,2]},"referenceSharingId":{"type":"string"},"globalDTBegin":{"type":"string"},"globalDTEnd":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDTO"},"userBeneficiary":{"$ref":"#/components/schemas/UserDTO"}},"required":["id","sharingType","referenceSharingId","globalDTBegin","globalDTEnd","user","userBeneficiary"]},"ModuleDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"KeyUsageSystemLogDTO":{"type":"object","properties":{"id":{"type":"string"},"moduleId":{"type":"string"},"keyUsageSystemLog":{"type":"string"},"labelUsageSystemLog":{"type":"string"},"typeUsageSystemLog":{"type":"number"}},"required":["id","moduleId","keyUsageSystemLog","labelUsageSystemLog","typeUsageSystemLog"]},"UsageSystemLogDTO":{"type":"object","properties":{"id":{"type":"string"},"pers":{"$ref":"#/components/schemas/PersDTO"},"vehicleUser":{"$ref":"#/components/schemas/VehicleUserDTO"},"vehicle":{"$ref":"#/components/schemas/BaseVehicleDTO"},"user":{"$ref":"#/components/schemas/UserDTO"},"individualVehicleSharing":{"$ref":"#/components/schemas/IndividualVehicleSharingDTO"},"timestampUsageSystemLog":{"format":"date-time","type":"string"},"module":{"type":"string"},"keyUsageSystemLog":{"type":"string"},"contentUsageSystemLog":{"type":"string"},"moduleObject":{"$ref":"#/components/schemas/ModuleDTO"},"keyUsageSystemLogObject":{"$ref":"#/components/schemas/KeyUsageSystemLogDTO"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","pers","vehicleUser","vehicle","user","individualVehicleSharing","timestampUsageSystemLog","module","keyUsageSystemLog","contentUsageSystemLog","moduleObject","keyUsageSystemLogObject","createdAt","updatedAt"]},"UsageSystemLogListDTO":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/MetaResponseDTO"},"links":{"$ref":"#/components/schemas/LinkResponseDTO"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UsageSystemLogDTO"}}},"required":["meta","links","items"]},"UsageSystemLogResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"keyUsageSystemLogs":{"$ref":"#/components/schemas/UsageSystemLogDTO"}},"required":["success","keyUsageSystemLogs"]},"ConfigFileDTO":{"type":"object","properties":{"fileContent":{"type":"object"}},"required":["fileContent"]},"ConfigurationPersDTO":{"type":"object","properties":{"id":{"type":"string"},"fileContent":{"type":"object"},"idStatus":{"type":"string"},"dtStatus":{"format":"date-time","type":"string"}},"required":["id","fileContent","idStatus","dtStatus"]},"ConfigFileFromPersToServerDTO":{"type":"object","properties":{"success":{"type":"boolean"},"configurationPers":{"$ref":"#/components/schemas/ConfigurationPersDTO"}},"required":["success","configurationPers"]},"IotAuthorizeDTO":{"type":"object","properties":{"clientId":{"type":"string","description":"MQTT client ID (PERS serial number)","example":"PERS-0001"},"username":{"type":"string","description":"Account username (email address)","example":"user@example.com"},"password":{"type":"string","description":"Base64-encoded account password","example":"cGFzc3dvcmQxMjM="}},"required":["clientId","username","password"]},"IotAuthorizePolicyTemplateDTO":{"type":"object","properties":{"subscribe":{"description":"MQTT topics the PERS device is allowed to subscribe to","example":["SPWhatToDo/v1/PERS-0001"],"type":"array","items":{"type":"string"}},"publish":{"description":"MQTT topics the PERS device is allowed to publish to","example":["pers/PERS-0001/v1/alert","pers/PERS-0001/v1/lock","pers/PERS-0001/v1/geoloc"],"type":"array","items":{"type":"string"}}},"required":["subscribe","publish"]},"IotAuthorizeResponseDTO":{"type":"object","properties":{"allowed":{"type":"boolean","description":"Whether the PERS device is allowed to connect","example":true},"clientId":{"type":"string","description":"MQTT client ID (echoed from request)","example":"PERS-0001"},"policyTemplate":{"description":"MQTT topic policy template","allOf":[{"$ref":"#/components/schemas/IotAuthorizePolicyTemplateDTO"}]}},"required":["allowed","clientId","policyTemplate"]}}}}