---
updatedAt: 2026-10-28T18:20:08.000Z
agentTools:
  projectIndex: https://developers.burodeingresos.com/llms.txt
---

# Exports

Retrieve the results of a completed bulk as downloadable CSV files, notified by webhook.

## Overview

An **export** packages the results of a completed [bulk](https://developers.burodeingresos.com/docs/bulks) into downloadable CSV files — one file per entity — so you can retrieve thousands of results in a single flow instead of reading each identifier through the API.

* Asynchronous: `POST /exports` returns `202 Accepted` immediately. Generation runs in the background.
* You are notified through the `export.completed` webhook event when the files are ready.
* Download links are returned by `GET /exports/{export_id}` and remain available for **7 days** after the export completes.

<br />

## Requesting an export

Call [`POST /exports`](https://developers.burodeingresos.com/reference/createexport) with the `bulk_id` of a **completed** verification bulk and the entities you want:

```bash
curl --request POST \
     --url https://api.burodeingresos.com/exports \
     --header 'X-API-Key: YOUR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
  "entities": ["profile", "invoices"]
}
'
```

**Successful response** (`202 Accepted`):

```json
{
  "export_id": "7f2c8a90-1b2c-4d3e-9f4a-5b6c7d8e9f0a",
  "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
  "status": "queued",
  "requested_at": "2026-09-18T14:44:23Z",
  "files": []
}
```

| Field                  | Description                                                                                                                                                                                                                 |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bulk_id`              | A verification bulk that belongs to your account and has finished processing.                                                                                                                                               |
| `entities`             | One or more of `profile`, `invoices`, `estimates`. One CSV file is generated per entity. Order and duplicates are ignored.                                                                                                  |
| `include_payment_info` | Optional, defaults to `false`. When `true`, `invoices.csv` adds a `payment_info` column.                                                                                                                                    |
| `estimates`            | Optional. Options for `estimates.csv`: `window_months`, `sources`, `as_of`, `history`, with the same values and defaults as [`GET /estimates`](https://developers.burodeingresos.com/reference/getestimates). Only allowed when `entities` includes `estimates`. |

The export is always scoped to your own account: the company is taken from your API key, never from the request body.

<Callout icon="🔁" theme="default">
  ### Requests are idempotent

  Requesting the same `bulk_id` with the same `entities` (and the same options) again returns `202` with the **same** `export_id` instead of generating a duplicate. This makes retries safe. A `failed` or `expired` export can be requested again and produces a new one.
</Callout>

**Error responses**:

| Status | Code                | When                                                                                               |
| :----- | :------------------ | :------------------------------------------------------------------------------------------------- |
| `409`  | `bulk_not_ready`    | The bulk is still processing. Wait for `metrics.in_progress` to reach `0` and request again.       |
| `404`  | `bulk_not_found`    | The `bulk_id` does not exist on your account.                                                      |
| `400`  | `validation_error`  | Missing `bulk_id` or empty `entities`.                                                             |
| `400`  | `invalid_parameter` | An `estimates` option has an invalid value, or `estimates` is sent without the `estimates` entity. |

<br />

## Getting notified: `export.completed`

When the files are ready, we send the `export.completed` event to your active [webhook](https://developers.burodeingresos.com/docs/webhooks):

```json
{
  "event": "export.completed",
  "export_id": "7f2c8a90-1b2c-4d3e-9f4a-5b6c7d8e9f0a",
  "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
  "status": "completed",
  "files": [
    { "name": "invoices.csv", "rows": 812000, "bytes": 410000000 },
    { "name": "profiles.csv", "rows": 3950, "bytes": 4100000 }
  ],
  "timestamp": "2026-09-18T14:44:24Z"
}
```

The event deliberately contains **no download links**, so it can be stored and forwarded without carrying a credential. Fetch the links with `GET /exports/{export_id}`.

<Callout icon="⚠️" theme="warning">
  Webhooks created **before** this feature launched are not subscribed to `export.completed` automatically. Add the event to your existing webhook with `PATCH /webhooks/{webhook_id}`, including `"export.completed"` in the `events` array. Webhooks created from now on are subscribed by default.
</Callout>

Only successful completion is notified. If an export fails, you will see it through polling: `GET /exports/{export_id}` returns `status: "failed"` with an `error_code`.

<br />

## Downloading the files

[`GET /exports/{export_id}`](https://developers.burodeingresos.com/reference/getexport) returns the current state and, once completed, one download link per file:

```bash
curl --request GET \
     --url https://api.burodeingresos.com/exports/7f2c8a90-1b2c-4d3e-9f4a-5b6c7d8e9f0a \
     --header 'X-API-Key: YOUR_API_KEY'
```

```json
{
  "export_id": "7f2c8a90-1b2c-4d3e-9f4a-5b6c7d8e9f0a",
  "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
  "status": "completed",
  "requested_at": "2026-09-18T14:44:23Z",
  "finished_at": "2026-09-18T14:44:24Z",
  "expires_at": "2026-09-25T14:44:24Z",
  "files": [
    {
      "name": "invoices.csv",
      "rows": 812000,
      "bytes": 410000000,
      "url": "https://…",
      "expires_at": "2026-09-18T15:44:41Z"
    },
    {
      "name": "profiles.csv",
      "rows": 3950,
      "bytes": 4100000,
      "url": "https://…",
      "expires_at": "2026-09-18T15:44:41Z"
    }
  ]
}
```

* Each `url` is a signed link valid for about **1 hour**. Every read of `GET /exports/{export_id}` issues fresh links, so if a link expires, just call the endpoint again.
* The export itself is available for **7 days** after completion (`expires_at` at the top level). After that it is purged and `files` comes back empty; request a new export if you still need the data.
* `rows` and `bytes` describe the exact file, so you can verify your download.

<br />

## File contents

One row per record of the file's entity. Identifiers that have no data for an entity are simply not present in that file.

`profiles.csv` — one row per identifier:

`identifier, external_id, updated_at, first_name, last_name, curp, nss, rfc, phone, email, tax_regime, street, neighborhood, municipality, state, zip_code`

> 🚧 Until November 15, 2026, `profiles.csv` also ends with `employment_status, estimated_monthly_income, tenure`. These columns are deprecated, like the same fields in `GET /profile`, and will be removed on that date. Use `estimates.csv` instead.

`invoices.csv` — one row per invoice (an identifier appears once per invoice):

`identifier, external_id, folio_fiscal, type, invoice_status, issue_date, rfc_issuer, issuer_name, rfc_receiver, receiver_name, zip_code_receiver, amount, currency, payment_method, payment_type, payroll_type, payment_periodicity, job_risk, job_role, job_department, job_tenure, bank, bank_account, incomes, deductions, line_items, invoice_relations, updated_at`

The `incomes`, `deductions`, `line_items` and `invoice_relations` columns contain JSON arrays — the same objects the invoices API returns — so an invoice's nested collections are delivered complete inside its row.

With `"include_payment_info": true`, `invoices.csv` adds a `payment_info` column before `updated_at`: a JSON array with the payments applied to the invoice, the same objects as `GET /invoices?include_payment_info=true`. Invoices with no payments carry `[]`.

`estimates.csv` — one row per identifier, or one row per identifier and month with `"history": true`:

`identifier, external_id, month, monthly_income, income_source, employment_status, tenure`

The values are the same that [`GET /estimates`](https://developers.burodeingresos.com/reference/getestimates) returns for each person with the options of the export. Estimates cover CURPs only: RFCs and people with no data to compute from are not present in the file. `GET /exports/{export_id}` returns the options used, defaults included, in its `estimates` field. When `as_of` is omitted, the estimates are computed as of the day the export was requested.