# Push Deleted Trip

## **Introduction**

There are use cases where the DriveKit SDK allows the user to delete a trip.

The request to delete a trip results in the permanent deletion of all trip data from DriveKit's local database and DriveQuant's database. If the trip data has been posted to your backend as well *via* the [push data service](https://docs.drivequant.com/push-services/push-data), it should be deleted accordingly.

In order to perform this, a push deleted trip service can be configured.

## **Principle**

The push deleted trip sends the event information as soon as the user deletes the trip via a push service.

## Configuration

See [Configuration](https://docs.drivequant.com/introduction#configuration) in the parent section.

The body of the request is a JSON object with a set of fields that contain the unique identifier of the trip and the trip modification event.

Your service should respond with a `2xx` http status code (typically `200 OK`) when the push request is accepted. **Any other code will be considered as a failure**, and the service will attempt to send the data again as defined in the [Retry Policy section](#retry-policy).

{% hint style="danger" %}
If your service responds with a `2xx` http status code, while the data has *not* been accepted by your platform, then there will be *no further attempt to send the data!*
{% endhint %}

## Retry Policy

Every push request not successfully acknowledged by your service will be retried **once a day**. After 30 unsuccessful attempts, the push data will be permanently discarded.

## Sample Message

The Push Data API specification can be downloaded [here](https://gist.github.com/DriveQuantPublic/f55d9d283aa5c30244093ee1142c040a) in OpenAPI YAML format.

<details>

<summary>Sample message (click to expand)</summary>

```json
{
  "itinId": "6030ebe4ea60426b34e9b3bf",
  "event": "TRIP_DELETION",
  "date": "2025-01-30T07:23:22.000+0000"
}
```

</details>
