# Clearance Lifecycle

{% hint style="warning" %}
The following flows are closely related to OEM integrations and our internal software, and are subject to change without prior notice.
{% endhint %}

## Activation

The following flowchart explains the high level of activation procedure

{% @mermaid/diagram content="
graph TD
classDef eventProducerErrorClass fill:red,color:white;
classDef eventProducerSuccessClass fill:green;
ActivationRequested --> MissingTagName{Missing required<br /> TAG name?₁}
MissingTagName --> |yes| Rejected
MissingTagName --> |no| AlreadyInHmFleet{Already in<br />HM Fleet?₂}
AlreadyInHmFleet --> |yes| Rejected:::eventProducerErrorClass
AlreadyInHmFleet --> |no| AddVehicleToOem\[Activate vehicle]
AddVehicleToOem --> ConfirmActivationInOem{Wait until activated on OEM side₃}
ConfirmActivationInOem --> |failed| Rejected
ConfirmActivationInOem --> |activated| CheckForPrivacyMode{Check privacy mode₄}
CheckForPrivacyMode --> |retry if enabled for 5 days| CheckForPrivacyMode
CheckForPrivacyMode -----> |disable after 10 days| Rejected
CheckForPrivacyMode --> CheckForData{Check for data delivery₅}
CheckForData ---> |not data after 10 days| Rejected
CheckForData --> |Data available| Approved:::eventProducerSuccessClass

" %}

1. If your app is configured as partner, you must provide a tag during vehicle activation. i.e:<br>

   ```json
   curl -X POST https://api.high-mobility.com/v1/fleets/vehicles \
   --data '
   {
     "vehicles": [
       {
         "vin": "VIN012345678901234",
         "brand": "audi",
         "tags": {
           "vw-group-customer-name": "Car Operations Ltd."
         }
       }
     ]
   }'
   ```
2. A vehicle can only be activated in one application
3. A vehicle activation could failed due multiple reasons:
   1. If a vehicle is activated via another provider
   2. If a vehicle is not eligible&#x20;
   3. VW could block activation of a vehicle due to theft.
4. During the activation if the vehicle is in PrivacyMode, you need to turn the privacy mode off and wait for our system to activate the vehicle. If the PrivacyMode stays on for 5 days, we deactivate the vehicle and change the status to `rejected`.&#x20;
5. During activation, we wait for the vehicle to send a message before enabling it for your application. You can check `pending_reason` via the [Fleet Clearance](https://app.gitbook.com/s/GqovsBFw7seb5vTEwucj/fleet-management/fleet-clearance "mention") API to see the current status. If activation doesn't occur within 10 days, we will deactivate the vehicle and change its status to `rejected`.&#x20;
