Customer data export
For each study in your account, Latana makes a CSV file and a manifest, a JSON file that describes the CSV. When the data from a study changes, Latana replaces the two files for that study only. The download API is at https://export.latana.com/v1.
1. Access#
Each request must have the header Authorization: Bearer <token>. An admin of your Latana account issues tokens in Settings › Data export › Download API tokens. Latana can also issue a token for you. If this page shows that data export is not enabled, speak to the Latana team.
Latana shows a token one time only. A token can read all studies of your organisation and no other data. A token is valid for 12 months, and Latana does not renew it automatically. You can revoke a token at any time, and access stops immediately.
2. Get the files#
GET /v1/studies
The list of your studies, with thepublic_id,name,export_sequenceandgenerated_atof each study.GET /v1/studies/{public_id}/manifest
The manifest for the study, as JSON.GET /v1/studies/{public_id}/manifest.json
The same manifest, as a file to save. Optional: add?export_sequence={n}.GET /v1/studies/{public_id}/data.csv?export_sequence={n}
The CSV that the manifest describes. The manifest fieldcsv.urlgives this URL.
A typical download of one study has these steps:
- Get the list of studies.
- Get the manifest for the study. It contains
csv.urlandcsv.sha256. - Get the CSV from
csv.url. - Make sure that the SHA-256 checksum of the CSV is the same as
csv.sha256.
If Latana replaces the files between step 2 and step 3, step 3 gives 409 stale_manifest. Then get the manifest again. Each manifest always agrees with the CSV at its csv.url.
curl -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" https://export.latana.com/v1/studies
curl -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" https://export.latana.com/v1/studies/<public-id>/manifest
curl -f -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" -o data.csv \
"https://export.latana.com/v1/studies/<public-id>/data.csv?export_sequence=<n>"
3. Find changes#
Each study has an export_sequence. The number increases only when Latana writes new files for the study. Gaps in the numbers are normal. You can find changes in three ways:
- Compare the
export_sequenceof each study inGET /v1/studieswith the last value that you got. - Read the event feed:
GET /v1/events?after={sequence}&limit={1–1000}. Events are in order and each event has a sequence. Start withafter=0, then use thenext_aftervalue of each response. Ifhas_moreis true, more events are available. Events are kept for 30 days; if you fall further behind, you get410(see below). - Receive webhooks. Latana sends a
POSTto your URL for each event.
Events#
The event feed and webhooks give the same events:
| Event | Meaning |
|---|---|
study.updated |
The study has a new CSV and manifest. The event gives the new export_sequence. |
study.deleted |
Latana deleted the study and its files. |
study.expired |
Latana removed the files because the study had no change for 90 days. The files come back at the next change. |
Webhooks#
An admin adds a webhook in Settings › Data export › Webhooks. The URL must use https:// on port 443. Your organisation can have 5 webhooks. The JSON body gives the event, the study.public_id, the export_sequence, the sequence and a unique delivery_id. The header X-Latana-Signature: t=<unix time>,v1=<hex> contains the HMAC-SHA256 of <t>.<raw body>, made with your signing secret.
{
"event": "study.updated",
"delivery_id": "6f1c0a52-3f7e-4bb4-9a0e-2a1f5c1d9e7b",
"occurred_at": "2026-10-05T13:19:39Z",
"study": { "public_id": "f949f880-f671-4469-8195-426e93568e43" },
"export_sequence": 8,
"sequence": 42
}
To check the signature, compute the HMAC over the raw request body:
import hashlib, hmac, time
def verify(raw_body: bytes, signature_header: str, secret: str, tolerance=300) -> bool:
parts = dict(item.split("=", 1) for item in signature_header.split(","))
timestamp, received = parts.get("t", ""), parts.get("v1", "")
if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > tolerance:
return False
expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, received)
Latana expects a 2xx response in 10 seconds. If it does not get one, it sends the event again, 12 times in approximately 3 days. After 3 days with no successful delivery, Latana pauses the webhook and sends an email to your admins. Latana can send an event more than one time, and the order is not guaranteed. In Settings, you can send a test event (ping) and send a delivery again.
What changed#
The manifest for each export tells you what changed in the study. Its changes section compares the export with the previous export of the study. It lists added and removed waves, segments, KPIs and answer options. It also lists waves imported again, renamed segments, segments with changed filters, relabelled KPIs and answer options, and a change of report_type. For the first export of a study, changes.initial is true.
4. Files#
The CSV is UTF-8 and comma-separated, with a header row. It is a full snapshot of one study. Latana sets one of two formats for your organisation. The manifest field report_type gives the format:
- default: one row for each brand, segment, KPI, answer option, country and wave. The columns are Export Date, Study Name, Brand, Segment, KPI, Answer Option, Country, Wave, Mean, Margin of Error, Lowest and Highest.
- advanced: one row for each country, brand and segment, and one column for each KPI and answer option. Each cell shows the most recent wave.
The manifest gives the type, unit and meaning of each column. It also lists the waves, segments with their filters, and KPIs in the CSV.
5. Limits and responses#
| Code | Meaning |
|---|---|
401 |
The token is missing, revoked or expired. |
404 |
The study is not yours, or it has no files at this time. |
409 |
A newer export replaced the file. Get the manifest again. |
410 |
cursor_expired: after is older than 30 days. List your studies again with GET /v1/studies, then continue from oldest_after. |
429 |
More than 120 requests in one minute for your organisation. |
503 |
The API is temporarily not available. |
For 429 and 503, wait for the number of seconds in the Retry-After header.
Support#
Email help@latana.com or contact your Latana customer success manager.