> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extraction request examples

> Example extraction request bodies for common Syntage resources.

Use these examples when creating extractions through the API. Each request uses an entity IRI and an extractor name. Some extractors also accept options that control the period, direction, file types, or provider product.

For endpoint details, see [Create an extraction](/api-reference/extractions/create-an-extraction).

## SAT

### Invoices

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "invoice",
  "options": {
    "period": {
      "from": "2024-01-01",
      "to": "2024-12-31"
    },
    "issued": true,
    "received": true,
    "xml": true,
    "pdf": true
  }
}
```

Invoice payments, batch payments, line items, relations, and credit notes are derived from invoice CFDI data. Include type `P` invoices for payment records and type `E` invoices for credit notes when selecting invoice types.

### Tax retentions

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "tax_retention",
  "options": {
    "period": {
      "from": "2024-01-01",
      "to": "2024-12-31"
    },
    "issued": true,
    "received": true,
    "xml": true,
    "pdf": true
  }
}
```

### Tax returns

Use the extractor for the tax return type you need.

| Tax return data             | Extractor            |
| --------------------------- | -------------------- |
| Annual returns              | `annual_tax_return`  |
| Provisional monthly returns | `monthly_tax_return` |
| RIF returns                 | `rif_tax_return`     |

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "annual_tax_return",
  "options": {
    "period": {
      "from": "2020-01-01",
      "to": "2024-12-31"
    }
  }
}
```

Use `monthly_tax_return` or `rif_tax_return` in the same request shape when you need those return types.

### Tax status

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "tax_status"
}
```

### Tax compliance checks

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "tax_compliance"
}
```

### Electronic accounting

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "electronic_accounting",
  "options": {
    "period": {
      "from": "2023-01-01",
      "to": "2024-12-31"
    }
  }
}
```

### SAT certificates

```json theme={null}
{
  "entity": "/entities/7b3a25a9-a53a-4846-abe6-f2574c9c2d5d",
  "extractor": "sat_certificates"
}
```

## RPC

```json theme={null}
{
  "entity": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "extractor": "rpc"
}
```

The `rpc` extractor creates RPC entidades, actos, and socios when the registry returns matching data.

## RUG

```json theme={null}
{
  "entity": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "extractor": "rug"
}
```

The `rug` extractor creates RUG guarantees and operations when the registry returns matching data.

## BIL

```json theme={null}
{
  "entity": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "extractor": "bil"
}
```

<h2 id="buro-de-credito">
  Buró de Crédito
</h2>

The entity must have taxpayer data and a valid Buró de Crédito authorization before the extraction can run.

```json theme={null}
{
  "entity": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "extractor": "buro_de_credito_report",
  "options": {
    "productType": "007"
  }
}
```

The `productType` option controls which Buró de Crédito product is requested.

| Entity type | Supported `productType` values | Default        |
| ----------- | ------------------------------ | -------------- |
| Person      | `007`, `004`, `INFORME_BURO`   | `007`          |
| Company     | `INFORME_BURO`, `RCO`          | `INFORME_BURO` |

## Background checks

Run a background check for an entity. The `background_check` extractor can be used in one-off extractions and in recurring scheduler rules to keep screening results current for monitored entities.

```json theme={null}
{
  "entity": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "extractor": "background_check"
}
```

For the resulting records and PDF report, see [Background checks](/resources/other/background-checks).
