# 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](/push-services/push-data.md), 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](/push-services/introduction.md#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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drivequant.com/push-services/push-deleted-trip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
