# SAT compliance

> An issuer's compliance opinion (32-D), constancia de situación fiscal and buzón tributario, brought from SAT with its e.firma, the findings Fiscalisto found in its CFDI and the SAT reviews with their deadlines, their armed answer and the tax discrepancy.

With the issuer's e.firma you bring from SAT three documents its customers, banks and suppliers often ask for:

- The **compliance opinion** (article 32-D of the CFF): positive, negative (with what SAT says is missing), no obligations or suspended, with its folio and PDF.
- The **constancia de situación fiscal** (tax status certificate): today's SAT PDF, with its idCIF, regimes, postal code and registry status already read.
- The **buzón tributario** (SAT inbox) notices: each with its subject, whether it's unread and how urgent it is (a requirement or a fine needs attention; a bulletin doesn't).

And without going to SAT, the **findings** Fiscalisto found in the issuer's invoices (the ones it stamped here and the ones it brought with [SAT downloads](https://fiscalisto.com/en/docs/api/descargas-del-sat)): suppliers on the 69-B list, cash payments over $2,000, PPD without a payment complement and the rest.

It only queries: nothing is ever filed, signed or opened at SAT. A mailbox notice is read in Fiscalisto without opening it at SAT, so it doesn't sign the acknowledgment or start the deadlines.

## What it costs

| What | In production | In test mode |
| --- | --- | --- |
| Ask SAT for the opinion, the certificate or the mailbox (`…/refresh`) | 1 timbre per query | Free |
| View what it already brought, download its PDFs and read the findings | Free | Free |

The timbre is set aside when the query is accepted (with none left, the API returns `402` `insufficient_balance` right away), used when SAT answers and given back if SAT doesn't answer or doesn't let the e.firma in. Each document of each issuer can be requested once every 10 minutes; before that, the API returns `429` `sat_refresh_too_soon` with `Retry-After`. Two simultaneous requests enter SAT only once: the other gets the `429`. Fiscalisto doesn't query on its own: these documents are updated when you ask.

## In test mode and in production

- **In production** SAT is entered with the e.firma the issuer stored with `keep_for_downloads: true`, the same as for [SAT downloads](https://fiscalisto.com/en/docs/api/descargas-del-sat#store-the-issuers-efirma). Without it, or expired, it returns `400` `efirma_required`.
- **In test mode** SAT has no test environment, so it isn't asked: the opinion comes out positive, the certificate with the issuer's data and the mailbox with two sample notices (an unread requirement and a bulletin). Each with its sample PDF. No e.firma needed.

## The compliance opinion

Request it from SAT; the request has no body.

```bash tab="cURL"
curl -X POST https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/compliance_opinion/refresh \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satRefresh = await fiscalisto.issuers.refreshComplianceOpinion("iss_OufpKqnrvx9p");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_refresh = fiscalisto.issuers.refresh_compliance_opinion("iss_OufpKqnrvx9p")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satRefresh = $fiscalisto->issuers->refreshComplianceOpinion('iss_OufpKqnrvx9p');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satRefresh, err := client.Issuers.RefreshComplianceOpinion(ctx, "iss_OufpKqnrvx9p")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(satRefresh.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = fiscalisto.issuers().refreshComplianceOpinion("iss_OufpKqnrvx9p");
System.out.println(satRefresh.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = await fiscalisto.Issuers.RefreshComplianceOpinionAsync("iss_OufpKqnrvx9p");
```

The API returns `202` as soon as it accepts the query (a `sat_refresh` with `status: "processing"`, the same as for [returns](https://fiscalisto.com/en/docs/api/declaraciones-del-sat#know-when-it-finished)) and asks SAT in the background, usually within a minute or two. When it finishes, `sat_refresh.completed` arrives (or `sat_refresh.failed`, with the reason in `error` and the timbre back), and `GET /v1/sat_refreshes/{id}` says how it stands. In test mode it comes back already `completed`. What it brought is at `GET /v1/issuers/{id}/compliance_opinion`, with the last opinion:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/compliance_opinion \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const complianceOpinion = await fiscalisto.issuers.complianceOpinion("iss_OufpKqnrvx9p");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

compliance_opinion = fiscalisto.issuers.compliance_opinion("iss_OufpKqnrvx9p")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$complianceOpinion = $fiscalisto->issuers->complianceOpinion('iss_OufpKqnrvx9p');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	complianceOpinion, err := client.Issuers.ComplianceOpinion(ctx, "iss_OufpKqnrvx9p")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *complianceOpinion)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var complianceOpinion = fiscalisto.issuers().complianceOpinion("iss_OufpKqnrvx9p");
System.out.println(complianceOpinion);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var complianceOpinion = await fiscalisto.Issuers.ComplianceOpinionAsync("iss_OufpKqnrvx9p");
```

```json
{
  "object": "compliance_opinion",
  "livemode": true,
  "issuer": "iss_OufpKqnrvx9p",
  "result": "negative",
  "date": "2026-10-27",
  "folio": "26NA1234567",
  "reasons": ["No se encuentra presentada la declaración anual de 2025."],
  "pdf": true,
  "checked_at": "2026-10-27T09:12:00-06:00",
  "last_error": null
}
```

`result` is `positive`, `negative`, `no_obligations` or `suspended` (`null` until the first query), and `reasons` what SAT lists as pending on a negative one. The PDF, as SAT provides it:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/compliance_opinion/pdf \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" -o opinion.pdf
```

```ts tab="TypeScript"
import { writeFile } from "node:fs/promises";
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

await writeFile("factura.pdf", await fiscalisto.issuers.complianceOpinionPdf("iss_OufpKqnrvx9p"));
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

with open("factura.pdf", "wb") as f:
    f.write(fiscalisto.issuers.compliance_opinion_pdf("iss_OufpKqnrvx9p"))
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

file_put_contents('factura.pdf', $fiscalisto->issuers->complianceOpinionPdf('iss_OufpKqnrvx9p'));
```

```go tab="Go"
package main

import (
	"context"
	"log"
	"os"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	pdf, err := client.Issuers.ComplianceOpinionPDF(ctx, "iss_OufpKqnrvx9p")
	if err != nil {
		log.Fatal(err)
	}
	if err := os.WriteFile("factura.pdf", pdf, 0o644); err != nil {
		log.Fatal(err)
	}
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import java.nio.file.Files;
import java.nio.file.Path;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

Files.write(Path.of("factura.pdf"), fiscalisto.issuers().complianceOpinionPdf("iss_OufpKqnrvx9p"));
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

await File.WriteAllBytesAsync("factura.pdf", await fiscalisto.Issuers.ComplianceOpinionPdfAsync("iss_OufpKqnrvx9p"));
```

## The constancia de situación fiscal

```bash tab="cURL"
curl -X POST https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/tax_status_certificate/refresh \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satRefresh = await fiscalisto.issuers.refreshTaxStatusCertificate("iss_OufpKqnrvx9p");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_refresh = fiscalisto.issuers.refresh_tax_status_certificate("iss_OufpKqnrvx9p")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satRefresh = $fiscalisto->issuers->refreshTaxStatusCertificate('iss_OufpKqnrvx9p');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satRefresh, err := client.Issuers.RefreshTaxStatusCertificate(ctx, "iss_OufpKqnrvx9p")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(satRefresh.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = fiscalisto.issuers().refreshTaxStatusCertificate("iss_OufpKqnrvx9p");
System.out.println(satRefresh.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = await fiscalisto.Issuers.RefreshTaxStatusCertificateAsync("iss_OufpKqnrvx9p");
```

`GET /v1/issuers/{id}/tax_status_certificate` carries what the last one says: `issued_on`, `id_cif`, `legal_name`, `tax_systems` (each regime with its key and name), `zip` and `status` (`ACTIVO` in the registry). Its PDF at `GET /v1/issuers/{id}/tax_status_certificate/pdf`. If the issuer changed regime or tax address, request it again: the invoice goes out with the issuer's data in Fiscalisto, not the certificate's.

## The buzón tributario

```bash tab="cURL"
curl -X POST https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/sat_mailbox/refresh \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satRefresh = await fiscalisto.issuers.refreshSatMailbox("iss_OufpKqnrvx9p");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_refresh = fiscalisto.issuers.refresh_sat_mailbox("iss_OufpKqnrvx9p")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satRefresh = $fiscalisto->issuers->refreshSatMailbox('iss_OufpKqnrvx9p');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satRefresh, err := client.Issuers.RefreshSATMailbox(ctx, "iss_OufpKqnrvx9p")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(satRefresh.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = fiscalisto.issuers().refreshSatMailbox("iss_OufpKqnrvx9p");
System.out.println(satRefresh.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRefresh = await fiscalisto.Issuers.RefreshSatMailboxAsync("iss_OufpKqnrvx9p");
```

The notices stay at `GET /v1/sat_mailbox_messages`, newest to oldest and [paginated](https://fiscalisto.com/en/docs/api/paginacion); `unread=true` leaves only those not read at SAT:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/sat_mailbox_messages?issuer=iss_OufpKqnrvx9p&unread=true" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

for await (const item of fiscalisto.satMailboxMessages.list({ issuer: "iss_OufpKqnrvx9p", unread: true })) {
  console.log(item.id);
}
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

for item in fiscalisto.sat_mailbox_messages.list({"issuer": "iss_OufpKqnrvx9p", "unread": True}):
    print(item["id"])
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

foreach ($fiscalisto->satMailboxMessages->list([
    'issuer' => 'iss_OufpKqnrvx9p',
    'unread' => true,
]) as $item) {
    echo $item['id'], "\n";
}
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	for item, err := range client.SatMailboxMessages.ListAutoPaging(ctx, &fiscalisto.ListSatMailboxMessagesParams{
		Issuer: fiscalisto.String("iss_OufpKqnrvx9p"),
		Unread: fiscalisto.Bool(true),
	}) {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(item.ID)
	}
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListSatMailboxMessagesParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

for (var item : fiscalisto.satMailboxMessages().listAutoPaging(new ListSatMailboxMessagesParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setUnread(true))) {
    System.out.println(item.getId());
}
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

await foreach (var item in fiscalisto.SatMailboxMessages.ListAutoPagingAsync(new ListSatMailboxMessagesParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Unread = true,
}))
    Console.WriteLine(item.Id);
```

Each notice carries `urgency` (`urgent`, `attention` or `informational`), `kind` (what it looks like: requirement, fine, invitation…) and `action_required`, so your system can alert whoever must answer it. To read it in full and answer, the issuer logs into its mailbox at SAT.

## The findings

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/sat_findings?issuer=iss_OufpKqnrvx9p&direction=received" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.satFindings.list({
  issuer: "iss_OufpKqnrvx9p",
  direction: "received",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.sat_findings.list({
    "issuer": "iss_OufpKqnrvx9p",
    "direction": "received",
})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->satFindings->list([
    'issuer' => 'iss_OufpKqnrvx9p',
    'direction' => 'received',
])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satFindingList, err := client.SatFindings.List(ctx, &fiscalisto.ListSatFindingsParams{
		Issuer:    fiscalisto.String("iss_OufpKqnrvx9p"),
		Direction: fiscalisto.String("received"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *satFindingList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListSatFindingsParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satFindingList = fiscalisto.satFindings().list(new ListSatFindingsParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setDirection("received"));
System.out.println(satFindingList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satFindingList = await fiscalisto.SatFindings.ListAsync(new ListSatFindingsParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Direction = "received",
});
```

One per kind, most serious first: `code` (stable, like `efos_definitivo` or `efectivo_2000`), `severity` (`critical`, `warning` or `info`), `title`, `explanation` (what it means), `next_step` (what to do, in a sentence or two, in Spanish), how many invoices have it (`invoices`), how many suppliers or customers they're from (`counterparties`), the sum of their totals in pesos (`amount`) and the most recent one's date (`last_date`). It filters by `direction` (`issued` or `received`), by invoice date with `date_gte` and `date_lte` (Mexico City days), by severity with `severity` and by one supplier or customer with `counterparty` (their RFC). Findings someone marked as reviewed in Fiscalisto don't appear. It uses no timbres.

### By supplier or customer

With thousands of findings, it helps to see them by who has them. `GET /v1/sat_finding_counterparties` lists each supplier (in received) or customer (in issued) with unreviewed findings, most serious first and then by how many invoices, like **Facturas › Hallazgos** in the app. With `code`, only those who have that finding:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/sat_finding_counterparties?issuer=iss_OufpKqnrvx9p&direction=received&code=efos_definitivo" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

for await (const item of fiscalisto.satFindingCounterparties.list({
  issuer: "iss_OufpKqnrvx9p",
  direction: "received",
  code: "efos_definitivo",
})) {
  console.log(item.id);
}
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

for item in fiscalisto.sat_finding_counterparties.list({
    "issuer": "iss_OufpKqnrvx9p",
    "direction": "received",
    "code": "efos_definitivo",
}):
    print(item["id"])
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

foreach ($fiscalisto->satFindingCounterparties->list([
    'issuer' => 'iss_OufpKqnrvx9p',
    'direction' => 'received',
    'code' => 'efos_definitivo',
]) as $item) {
    echo $item['id'], "\n";
}
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	for item, err := range client.SatFindingCounterparties.ListAutoPaging(ctx, &fiscalisto.ListSatFindingCounterpartiesParams{
		Issuer:    fiscalisto.String("iss_OufpKqnrvx9p"),
		Direction: fiscalisto.String("received"),
		Code:      fiscalisto.String("efos_definitivo"),
	}) {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(item.ID)
	}
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListSatFindingCounterpartiesParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

for (var item : fiscalisto.satFindingCounterparties().listAutoPaging(new ListSatFindingCounterpartiesParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setDirection("received")
        .setCode("efos_definitivo"))) {
    System.out.println(item.getId());
}
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

await foreach (var item in fiscalisto.SatFindingCounterparties.ListAutoPagingAsync(new ListSatFindingCounterpartiesParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Direction = "received",
    Code = "efos_definitivo",
}))
    Console.WriteLine(item.Id);
```

Each one carries its `rfc` and `name`, its most serious finding (`severity`), how many of its invoices have one (`invoices`), how much they add up to in pesos (`amount`, each invoice once), the most recent (`last_date`) and its kinds in `findings`, each with `code`, `severity`, `title`, `invoices` and `next_step`. It accepts the same filters as the list by kind, except `counterparty`, and is paginated with `limit` and `starting_after` (the RFC of the page's last one). To see one's kinds only, use `counterparty` in `GET /v1/sat_findings`.

## Materiality

A received invoice is deductible when the operation really happened, and the SAT asks you to prove it: the agreement (contract or purchase order), the delivery (receipt, deliverables or photos) and the payment. `GET /v1/materiality_suppliers` tells you, for the issuer's received invoices (ingresos) in a period, how much of what each supplier invoiced has those three proofs in Fiscalisto, like **Impuestos y SAT › Materialidad** in the app. Suppliers in 69-B definitivo come first, because their 30 business-day term is running; then the ones with the largest unproven amount:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/materiality_suppliers?issuer=iss_OufpKqnrvx9p&date_gte=2026-01-01&date_lte=2026-10-31" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.materialitySuppliers.list({
  issuer: "iss_OufpKqnrvx9p",
  date_gte: "2026-01-01",
  date_lte: "2026-10-31",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.materiality_suppliers.list({
    "issuer": "iss_OufpKqnrvx9p",
    "date_gte": "2026-01-01",
    "date_lte": "2026-10-31",
})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->materialitySuppliers->list([
    'issuer' => 'iss_OufpKqnrvx9p',
    'date_gte' => '2026-01-01',
    'date_lte' => '2026-10-31',
])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	materialitySupplierList, err := client.MaterialitySuppliers.List(ctx, &fiscalisto.ListMaterialitySuppliersParams{
		Issuer:  fiscalisto.String("iss_OufpKqnrvx9p"),
		DateGte: fiscalisto.String("2026-01-01"),
		DateLte: fiscalisto.String("2026-10-31"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *materialitySupplierList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListMaterialitySuppliersParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var materialitySupplierList = fiscalisto.materialitySuppliers().list(new ListMaterialitySuppliersParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setDateGte("2026-01-01")
        .setDateLte("2026-10-31"));
System.out.println(materialitySupplierList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var materialitySupplierList = await fiscalisto.MaterialitySuppliers.ListAsync(new ListMaterialitySuppliersParams
{
    Issuer = "iss_OufpKqnrvx9p",
    DateGte = "2026-01-01",
    DateLte = "2026-10-31",
});
```

Each supplier carries its `tax_id` and `name`, how many invoices it issued (`invoices`), what they add up to in pesos (`total`), what the incomplete ones add up to (`unproven`), how many are `complete`, `partial` and `none` (`states`) and how many miss each proof (`missing`). If it's on the 69-B list, `sat_list` carries `status` (`definitive` or `presumed`) and, when definitive, `published_on`, `deadline` (the last of the 30 business days to prove the operations or correct) and `business_days_left`. `in_supplier_portal` says whether you can ask it for the evidence from the app's Portal de proveedores. Without dates it takes this year up to today; a period spans up to five years. It doesn't use timbres.

### Invoices to prove

`GET /v1/materiality_invoices` lists the period's received invoices without complete evidence, largest first, each with what it has (`has`), what it misses (`missing`) and where each proof came from (`evidence`: the linked purchase order, the warehouse receipt, the payment complement, the bank payment, the files someone at the company or the supplier uploaded). With `state` (`complete`, `partial` or `none`), only those in that state; with `supplier_tax_id`, only one supplier's:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/materiality_invoices?issuer=iss_OufpKqnrvx9p&supplier_tax_id=XAXX010101000" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.materialityInvoices.list({
  issuer: "iss_OufpKqnrvx9p",
  supplier_tax_id: "XAXX010101000",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.materiality_invoices.list({
    "issuer": "iss_OufpKqnrvx9p",
    "supplier_tax_id": "XAXX010101000",
})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->materialityInvoices->list([
    'issuer' => 'iss_OufpKqnrvx9p',
    'supplier_tax_id' => 'XAXX010101000',
])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	materialityInvoiceList, err := client.MaterialityInvoices.List(ctx, &fiscalisto.ListMaterialityInvoicesParams{
		Issuer:        fiscalisto.String("iss_OufpKqnrvx9p"),
		SupplierTaxID: fiscalisto.String("XAXX010101000"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *materialityInvoiceList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListMaterialityInvoicesParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var materialityInvoiceList = fiscalisto.materialityInvoices().list(new ListMaterialityInvoicesParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setSupplierTaxId("XAXX010101000"));
System.out.println(materialityInvoiceList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var materialityInvoiceList = await fiscalisto.MaterialityInvoices.ListAsync(new ListMaterialityInvoicesParams
{
    Issuer = "iss_OufpKqnrvx9p",
    SupplierTaxId = "XAXX010101000",
});
```

It returns up to 300 in one page; `has_more` says there are more (shorten the period or ask for one supplier's). Asking a supplier for evidence and building the file (a ZIP with the invoices, their evidence and Expediente.pdf with each file's SHA-256 fingerprint) are done in the app.

## The company report

`GET /v1/company_report` returns, for an issuer and a period, the same as **Impuestos y SAT › Reporte de la empresa** in the app: its fiscal health as a 0 to 1,000 score that explains every point, its risk indicators against their thresholds, its years side by side, its main customers and suppliers, its shareholders and the customers and suppliers that published their liquidation or merger. It comes from what Fiscalisto already has for the issuer (its CFDI, its compliance opinion, the SAT lists, its declaraciones, its buzón): it doesn't query the SAT and uses no timbres. Without dates, it covers the last 12 months:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/company_report?issuer=iss_OufpKqnrvx9p&date_gte=2026-01-01" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const companyReport = await fiscalisto.companyReport.get({
  issuer: "iss_OufpKqnrvx9p",
  date_gte: "2026-01-01",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

company_report = fiscalisto.company_report.get({
    "issuer": "iss_OufpKqnrvx9p",
    "date_gte": "2026-01-01",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$companyReport = $fiscalisto->companyReport->get([
    'issuer' => 'iss_OufpKqnrvx9p',
    'date_gte' => '2026-01-01',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	companyReport, err := client.CompanyReport.Get(ctx, &fiscalisto.GetCompanyReportParams{
		Issuer:  fiscalisto.String("iss_OufpKqnrvx9p"),
		DateGte: fiscalisto.String("2026-01-01"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *companyReport)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetCompanyReportParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var companyReport = fiscalisto.companyReport().get(new GetCompanyReportParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setDateGte("2026-01-01"));
System.out.println(companyReport);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var companyReport = await fiscalisto.CompanyReport.GetAsync(new GetCompanyReportParams
{
    Issuer = "iss_OufpKqnrvx9p",
    DateGte = "2026-01-01",
});
```

`fiscal_health` has `score` (0 to 1,000, or `null` when no factor had data), `band` (`attention` below 250, `fair` up to 499, `good` up to 749 and `excellent` from 750) and each factor in `factors`: `points` out of `max_points`, `reason` (why) and `to_improve` (what would earn the rest). A factor without data has `points` `null` and doesn't count: the score scales with the ones that do (`factors_used` of `factors_total`).

Each indicator in `indicators` has `state` (`ok`, `risk` or `no_data`), `value`, `display` (the figure as the app shows it) and `threshold`; `custom_threshold` says the company changed the threshold in the app. `years` compares this year (`partial`) with the previous ones: income and expenses before taxes, how much was PUE and PPD, how much of the PPD was already collected and paid and in how many days, payroll and margin. `customers` and `suppliers` have their concentration (`hhi`, above 1,500 is concentrated) and the top 15. Sales to `XAXX010101000` come as one row, «Público en general» (and `XEXX010101000` as «Residentes en el extranjero»), which doesn't count in `hhi` or `top10_share`.

`shareholders` comes from the dividend retention CFDI (clave 14): `paid_to` are its shareholders and `received_from` the companies it holds shares in. `counterparty_notices` are the customers and suppliers that published in the last 13 months their liquidation, merger, spin-off, transformation or capital reduction in the Secretaría de Economía's Publicaciones de Sociedades Mercantiles, with the publication number and its PDF when it's already known. With `version=executive` you get only the main indicators and 5 customers and suppliers, and `shareholders` and `counterparty_notices` as `null`.

## SAT reviews

When SAT sends a carta invitación, a requerimiento, a request for information in a revisión de gabinete or any other oficio, `POST /v1/sat_reviews` records it (`srv_…`), like **Registrar oficio** in **Revisiones del SAT** in the app. With the day it was notified (`notified_on`), Fiscalisto works out the last day to answer in business days from when the notification takes effect, leaving out Saturdays, Sundays and the non-business days SAT publishes, and emails a reminder 5, 3 and 1 business day before:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/sat_reviews \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "type": "desk_audit",
    "reference": "500-05-2026-1234",
    "order_number": "GAO0900001/26",
    "authority": "ADAF de Occidente",
    "period_start": "2024-01-01",
    "period_end": "2024-12-31",
    "notices": [{ "notified_on": "2026-03-02" }],
    "requests": [{ "key": "issued_invoices" }, { "key": "contracts" }]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satReview = await fiscalisto.satReviews.create({
  issuer: "iss_OufpKqnrvx9p",
  type: "desk_audit",
  reference: "500-05-2026-1234",
  order_number: "GAO0900001/26",
  authority: "ADAF de Occidente",
  period_start: "2024-01-01",
  period_end: "2024-12-31",
  notices: [{ notified_on: "2026-03-02" }],
  requests: [
    { key: "issued_invoices" },
    { key: "contracts" },
  ],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_review = fiscalisto.sat_reviews.create({
    "issuer": "iss_OufpKqnrvx9p",
    "type": "desk_audit",
    "reference": "500-05-2026-1234",
    "order_number": "GAO0900001/26",
    "authority": "ADAF de Occidente",
    "period_start": "2024-01-01",
    "period_end": "2024-12-31",
    "notices": [{"notified_on": "2026-03-02"}],
    "requests": [
        {"key": "issued_invoices"},
        {"key": "contracts"},
    ],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satReview = $fiscalisto->satReviews->create([
    'issuer' => 'iss_OufpKqnrvx9p',
    'type' => 'desk_audit',
    'reference' => '500-05-2026-1234',
    'order_number' => 'GAO0900001/26',
    'authority' => 'ADAF de Occidente',
    'period_start' => '2024-01-01',
    'period_end' => '2024-12-31',
    'notices' => [['notified_on' => '2026-03-02']],
    'requests' => [
        ['key' => 'issued_invoices'],
        ['key' => 'contracts'],
    ],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satReview, err := client.SatReviews.Create(ctx, &fiscalisto.CreateSatReviewParams{
		Issuer:      fiscalisto.String("iss_OufpKqnrvx9p"),
		Type:        "desk_audit",
		Reference:   fiscalisto.String("500-05-2026-1234"),
		OrderNumber: fiscalisto.String("GAO0900001/26"),
		Authority:   fiscalisto.String("ADAF de Occidente"),
		PeriodStart: fiscalisto.String("2024-01-01"),
		PeriodEnd:   fiscalisto.String("2024-12-31"),
		Notices: []fiscalisto.CreateSatReviewParamsNotice{
			{NotifiedOn: "2026-03-02"},
		},
		Requests: []fiscalisto.CreateSatReviewParamsRequest{
			{Key: "issued_invoices"},
			{Key: "contracts"},
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(satReview.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateSatReviewParams;
import com.fiscalisto.model.CreateSatReviewParamsNotice;
import com.fiscalisto.model.CreateSatReviewParamsRequest;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satReview = fiscalisto.satReviews().create(new CreateSatReviewParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setType("desk_audit")
        .setReference("500-05-2026-1234")
        .setOrderNumber("GAO0900001/26")
        .setAuthority("ADAF de Occidente")
        .setPeriodStart("2024-01-01")
        .setPeriodEnd("2024-12-31")
        .setNotices(List.of(
                new CreateSatReviewParamsNotice()
                        .setNotifiedOn("2026-03-02")
        ))
        .setRequests(List.of(
                new CreateSatReviewParamsRequest()
                        .setKey("issued_invoices"),
                new CreateSatReviewParamsRequest().setKey("contracts")
        )));
System.out.println(satReview.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satReview = await fiscalisto.SatReviews.CreateAsync(new CreateSatReviewParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Type = "desk_audit",
    Reference = "500-05-2026-1234",
    OrderNumber = "GAO0900001/26",
    Authority = "ADAF de Occidente",
    PeriodStart = "2024-01-01",
    PeriodEnd = "2024-12-31",
    Notices = new() { new() { NotifiedOn = "2026-03-02" } },
    Requests = new()
    {
        new() { Key = "issued_invoices" },
        new() { Key = "contracts" },
    },
});
```

`type` says what arrived: `invitation_letter` (carta invitación), `return_clarification` (clarifying a return), `missing_returns` (returns not filed), `desk_audit` (revisión de gabinete), `field_audit` (visita domiciliaria), `electronic_audit` (revisión electrónica), `supplier_69b` (a supplier on the 69-B list), `presumption_69b` (the issuer on 69-B), `csd_restriction` (CSD restricted), `tax_discrepancy` (discrepancia fiscal), `refund` (a refund's requerimiento) or `other`. Each of `notices` is an oficio with its `step`: by default the one that opens the review, then the ones that follow in that type (in `desk_audit`, `solicitud`, `observaciones` and `resolucion`; in `field_audit`, `orden`, `ultima_acta`, `acta_final` and `resolucion`). `extension: true` adds the extension the law allows and `business_days`, the days an oficio gives when they aren't the law's. A future date answers `parameter_invalid` on `notices`.

`requests` is what the oficio asks to hand over: `working_paper`, `tax_discrepancy`, `issued_invoices`, `received_invoices`, `retentions`, `tax_returns`, `electronic_accounting`, `materiality`, `bank_statements`, `contracts`, `inventory`, `assets_and_staff`, `articles_and_power` (articles of incorporation and power of attorney), `written_answer` or `other` (with `name`). Without `requests`, it takes what SAT usually asks for in that type. It answers nothing to SAT: the answer is filed in the Buzón Tributario or at SAT's office. It uses no timbres.

The review has `due_on` and `business_days_left` of the pending oficio (0 is today; negative, it passed), `sat_must_conclude_by` (the day SAT must finish a desk audit, field audit or electronic audit) and each oficio in `notices`, with `effective_on`, its deadline, the article that sets it (`law`) and, after the observaciones or the acta final, until when to ask Prodecon for an acuerdo conclusivo (`conclusive_agreement_until`). Each of `requests` says whether Fiscalisto makes it (`made_by: "fiscalisto"`) or it is uploaded (`you`), what Fiscalisto already has for the period (`have`, for example «412 CFDI»), the documents uploaded in the app (`documents`) and whether it is ready (`ready`); `ready` of `total` is the app's «Ya tiene N de M».

`GET /v1/sat_reviews` lists the issuer's, open ones first (with `status`, only one state), and `POST /v1/sat_reviews/{id}` changes only what you send: when you answer an oficio, send all its `notices` with `answered_on` on the one you answered and `status: "answered"`; when SAT concludes, `concluded` (no observations), `assessed` (with a tax assessment) or `in_defense`. `DELETE /v1/sat_reviews/{id}` deletes Fiscalisto's follow-up, not the proceeding at SAT.

### Arming the answer

`POST /v1/sat_reviews/{id}/answer` arms in the background, like **Armar respuesta** in the app, a ZIP with what the review asks for: the period's XML and CFDI list, the working paper (CFDI against returns against deposits), the electronic accounting with the order number in its pólizas, the returns' PDFs, the documents uploaded in the app and an index of which file answers each item. It answers the review with `answer.status` `processing`:

```bash tab="cURL"
curl -X POST https://api.fiscalisto.com/v1/sat_reviews/srv_OufpKqnrvx9p1A/answer \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satReview = await fiscalisto.satReviews.armAnswer("srv_OufpKqnrvx9p1A");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_review = fiscalisto.sat_reviews.arm_answer("srv_OufpKqnrvx9p1A")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satReview = $fiscalisto->satReviews->armAnswer('srv_OufpKqnrvx9p1A');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satReview, err := client.SatReviews.ArmAnswer(ctx, "srv_OufpKqnrvx9p1A")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(satReview.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satReview = fiscalisto.satReviews().armAnswer("srv_OufpKqnrvx9p1A");
System.out.println(satReview.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satReview = await fiscalisto.SatReviews.ArmAnswerAsync("srv_OufpKqnrvx9p1A");
```

Check `GET /v1/sat_reviews/{id}` until `answer.status` is `completed` and download it with `GET /v1/sat_reviews/{id}/answer`. While it is being armed, asking again answers `409` `answer_running`; before it's ready, the download answers `409` `answer_not_ready`. It's kept 30 days (`answer_expired` after that).

### Review like SAT

`GET /v1/sat_risk_check` checks what SAT's systems cross to send cartas invitación and choose whom to audit, with what Fiscalisto already read for the issuer: deadlines of open reviews, buzón notices not attended, CFDI against returns, returns not filed, compliance opinion, SAT lists, suppliers on 69-B, materiality, deposits to explain, tax discrepancy and the e.firma's validity. It doesn't query SAT and uses no timbres:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/sat_risk_check?issuer=iss_OufpKqnrvx9p" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const satRiskCheck = await fiscalisto.satRiskCheck.get({ issuer: "iss_OufpKqnrvx9p" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

sat_risk_check = fiscalisto.sat_risk_check.get({"issuer": "iss_OufpKqnrvx9p"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$satRiskCheck = $fiscalisto->satRiskCheck->get(['issuer' => 'iss_OufpKqnrvx9p']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	satRiskCheck, err := client.SatRiskCheck.Get(ctx, &fiscalisto.GetSatRiskCheckParams{
		Issuer: fiscalisto.String("iss_OufpKqnrvx9p"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *satRiskCheck)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetSatRiskCheckParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRiskCheck = fiscalisto.satRiskCheck().get(new GetSatRiskCheckParams().setIssuer("iss_OufpKqnrvx9p"));
System.out.println(satRiskCheck);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var satRiskCheck = await fiscalisto.SatRiskCheck.GetAsync(new GetSatRiskCheckParams { Issuer = "iss_OufpKqnrvx9p" });
```

Each of `checks` has `key`, `result` (`critical` to attend now, `warning` to review, `ok`, or `unknown` when Fiscalisto doesn't read it yet, for example without the buzón watched), `title`, `detail` and `why` (why SAT cares). `critical` and `warning` count them.

### The tax discrepancy

`GET /v1/tax_discrepancy` works out, for an individual issuer (13-character RFC), the discrepancia fiscal of article 91 of the Ley del ISR: their spending with CFDI in their name and the deposits in their accounts for the year (from the bank statements in bank reconciliation), minus transfers between their own accounts, against their declared income. What's left is what SAT would presume is income. A company answers `parameter_invalid` on `issuer`:

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/tax_discrepancy?issuer=iss_OufpKqnrvx9p&year=2025" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const taxDiscrepancy = await fiscalisto.taxDiscrepancy.get({ issuer: "iss_OufpKqnrvx9p", year: 2025 });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

tax_discrepancy = fiscalisto.tax_discrepancy.get({"issuer": "iss_OufpKqnrvx9p", "year": 2025})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$taxDiscrepancy = $fiscalisto->taxDiscrepancy->get(['issuer' => 'iss_OufpKqnrvx9p', 'year' => 2025]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	taxDiscrepancy, err := client.TaxDiscrepancy.Get(ctx, &fiscalisto.GetTaxDiscrepancyParams{
		Issuer: fiscalisto.String("iss_OufpKqnrvx9p"),
		Year:   fiscalisto.Int64(2025),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *taxDiscrepancy)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetTaxDiscrepancyParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var taxDiscrepancy = fiscalisto.taxDiscrepancy().get(new GetTaxDiscrepancyParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setYear(2025));
System.out.println(taxDiscrepancy);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var taxDiscrepancy = await fiscalisto.TaxDiscrepancy.GetAsync(new GetTaxDiscrepancyParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Year = 2025,
});
```

It has `spending`, `deposits`, `own_transfers`, `loans` and `refunds` (deposits classified as a loan or a refund), `outflows` (the erogaciones), `declared_income` with its source (`declared_income_source`: their returns, their payroll receipts or the one you sent), `discrepancy` and each month's figures in `months`. `unclassified_deposits` are the deposits nobody classified: each one explained in bank reconciliation lowers the discrepancy. With `declared_income`, the income of their annual return replaces the one Fiscalisto works out (when they have rent, interest or another employer's salary). `loans_to_report` warns that their loans pass $600,000 in the year: they only count if reported in the annual return (article 90). Without `year`, last year. It uses no timbres.
