pretix and it's plugins include a number of data shredders that allow you to clear personal information from the system. This page shows you how to use these shredders through the API.
4.12
This feature has been added to the API.
Warning
Unlike the user interface, the API will not force you to download tax-relevant data before you delete it.
Before you can delete data, you need to start a data export. Since exports often include large data sets, they might take longer than the duration of an HTTP request. Therefore, creating an export is a two-step process. First you need to start an export task with one of the following to API endpoints:
When starting an export, you receive a download
URL for downloading the result. Running a GET
request on that result will yield one of the following status codes:
200 OK
– The export succeeded. The body will be your resulting file. Might be large!409 Conflict
– Your export is still running. The body will be JSON with the structure{"status": "running"}
.status
can bewaiting
before the task is actually being processed. Please retry, but wait at least one second before you do.410 Gone
– Running the export has failed permanently. The body will be JSON with the structure{"status": "failed", "message": "Error message"}
404 Not Found
– The export does not exist / is expired / belongs to a different API key.
When starting an export, you receive a shred
URL for actually shredding the data. You can only start the actual shredding process after the export file was generated, however you are not forced to download the file (we'd recommend it in most cases, though). The download will no longer be possible after the shredding. Since shredding often requires deleting large data sets, it might take longer than the duration of an HTTP request. Therefore, shredding again is a two-step process. First you need to start a shredder task with one of the following to API endpoints:
When starting to shred, you receive a status
URL for checking for success. Running a GET
request on that result will yield one of the following status codes:
200 OK
– The shredding succeeded.409 Conflict
– Shredding is still running. The body will be JSON with the structure{"status": "running"}
.status
can bewaiting
before the task is actually being processed. Please retry, but wait at least one second before you do.410 Gone
– We no longer know about this process, probably the process was started more than an hour ago. Might also occur after successful operations on small pretix installations without asynchronous task handling.417 Expectation Failed
– Running the export has failed permanently. The body will be JSON with the structure{"status": "failed", "message": "Error message"}