# Findings

> What Fiscalisto found in your purchase orders, payouts, suppliers, books, travel expenses, purchase receipts, inventory, customers and payroll, to review from your system.

A finding is something Fiscalisto found that is worth reviewing: an invoice that doesn't match its purchase order, a supplier the SAT published on the 69-B list, an expired opinión de cumplimiento in the **Portal de proveedores**, Caja ending the month with a credit balance. They're the same ones as **Hallazgos** in the app, and you review them here or there: what you mark on one side shows on the other. Invoice findings are in [SAT compliance](https://fiscalisto.com/en/docs/api/sat) (`GET /v1/sat_findings`).

Fiscalisto looks for them when the record changes (an order is received, an invoice arrives, a supplier uploads a document) and again every morning, for what depends on time: a late delivery, a document that expired, a new SAT list. When what caused a finding changes, it becomes `resolved` by itself.

## See the findings

Without `status`, the ones nobody has reviewed, newest first. `area` keeps only those of purchase orders (`purchase_orders`), payouts (`payouts`), suppliers (`suppliers`), the books (`accounting`), banks (`bank`), travel expenses (`expense_reports`), purchase receipts (`purchase_receipts`), inventory (`inventory`), customers and collections (`customers`) or payroll (`payroll`).

```bash tab="cURL"
curl -G https://api.fiscalisto.com/v1/findings \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -d area=purchase_orders \
  -d severity=warning
```

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

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

for await (const item of fiscalisto.findings.list({ area: "purchase_orders", severity: "warning" })) {
  console.log(item.id);
}
```

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

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

for item in fiscalisto.findings.list({
    "area": "purchase_orders",
    "severity": "warning",
}):
    print(item["id"])
```

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

use Fiscalisto\Fiscalisto;

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

foreach ($fiscalisto->findings->list([
    'area' => 'purchase_orders',
    'severity' => 'warning',
]) 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.Findings.ListAutoPaging(ctx, &fiscalisto.ListFindingsParams{
		Area:     fiscalisto.String("purchase_orders"),
		Severity: fiscalisto.String("warning"),
	}) {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(item.ID)
	}
}
```

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

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

for (var item : fiscalisto.findings().listAutoPaging(new ListFindingsParams()
        .setArea("purchase_orders")
        .setSeverity("warning"))) {
    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.Findings.ListAutoPagingAsync(new ListFindingsParams
{
    Area = "purchase_orders",
    Severity = "warning",
}))
    Console.WriteLine(item.Id);
```

Each finding says which record it's on (`record`), what kind it is (`code`, `title` and `explanation`, with the article when the law says it) and what exactly it found in that record (`text`). `holds_record` is `true` when the empresa decided that kind holds its record until someone reviews it: a purchase order that can't be approved or a payout that can't be signed.

```json
{
  "id": "fnd_K7xB2mQpZ4rN1c",
  "object": "finding",
  "livemode": true,
  "issuer": "iss_K7xB2mQpZ4rN",
  "area": "purchase_orders",
  "record": {
    "type": "purchase_order",
    "id": null,
    "reference": "12",
    "description": "Orden de compra 12"
  },
  "code": "oc_factura_distinta",
  "severity": "warning",
  "title": "La factura no coincide con la orden",
  "explanation": "La factura del proveedor trae un precio más alto o más piezas de las pedidas (más allá de las tolerancias de Configurar compras), o algo que no estaba en la orden. Acepte la diferencia en la recepción o pídale al proveedor una nota de crédito.",
  "text": "La factura de PRO010101AB1 por $58,000.00 es $4,640.00 mayor que la orden ($53,360.00).",
  "amount": 4640,
  "counterparty_tax_id": "PRO010101AB1",
  "status": "open",
  "holds_record": true,
  "note": null,
  "created_at": "2026-11-22T08:00:00-06:00",
  "updated_at": "2026-11-22T08:00:00-06:00",
  "reviewed_at": null,
  "resolved_at": null
}
```

Which kinds exist, how serious they are and which hold their record is decided in the app, in **Reglas de hallazgos**.

## Mark one as reviewed

Like **Revisado** in the app: someone looked at it and it's fine. The note says why and stays with the finding. If it held its record, it no longer does.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/findings/fnd_K7xB2mQpZ4rN1c/review \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "note": "El proveedor subió el precio del acero; lo autorizó compras." }'
```

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

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

const finding = await fiscalisto.findings.review("fnd_K7xB2mQpZ4rN1c", {
  note: "El proveedor subió el precio del acero; lo autorizó compras.",
});
```

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

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

finding = fiscalisto.findings.review("fnd_K7xB2mQpZ4rN1c", {
    "note": "El proveedor subió el precio del acero; lo autorizó compras.",
})
```

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

use Fiscalisto\Fiscalisto;

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

$finding = $fiscalisto->findings->review('fnd_K7xB2mQpZ4rN1c', [
    'note' => 'El proveedor subió el precio del acero; lo autorizó compras.',
]);
```

```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()

	finding, err := client.Findings.Review(ctx, "fnd_K7xB2mQpZ4rN1c", &fiscalisto.ReviewFindingParams{
		Note: fiscalisto.String("El proveedor subió el precio del acero; lo autorizó compras."),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(finding.ID)
}
```

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

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

var finding = fiscalisto.findings().review("fnd_K7xB2mQpZ4rN1c", new ReviewFindingParams()
        .setNote("El proveedor subió el precio del acero; lo autorizó compras."));
System.out.println(finding.getId());
```

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

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

var finding = await fiscalisto.Findings.ReviewAsync("fnd_K7xB2mQpZ4rN1c", new ReviewFindingParams
{
    Note = "El proveedor subió el precio del acero; lo autorizó compras.",
});
```

One already reviewed changes its note. If what caused it changes later (for example, another invoice arrives with another amount), it opens again by itself with the new text.

## Reopen one

Like **Deshacer** in the app: back to `open`, without its note.

```bash tab="cURL"
curl -X POST https://api.fiscalisto.com/v1/findings/fnd_K7xB2mQpZ4rN1c/reopen \
  -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 finding = await fiscalisto.findings.reopen("fnd_K7xB2mQpZ4rN1c");
```

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

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

finding = fiscalisto.findings.reopen("fnd_K7xB2mQpZ4rN1c")
```

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

use Fiscalisto\Fiscalisto;

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

$finding = $fiscalisto->findings->reopen('fnd_K7xB2mQpZ4rN1c');
```

```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()

	finding, err := client.Findings.Reopen(ctx, "fnd_K7xB2mQpZ4rN1c")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(finding.ID)
}
```

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

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

var finding = fiscalisto.findings().reopen("fnd_K7xB2mQpZ4rN1c");
System.out.println(finding.getId());
```

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

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

var finding = await fiscalisto.Findings.ReopenAsync("fnd_K7xB2mQpZ4rN1c");
```

## Errors

| Code | When |
| --- | --- |
| `finding_resolved` | The finding no longer applies (status `resolved`): there is nothing to review. |
| `parameter_invalid` | An `area`, `status`, `severity` or `code` that doesn't exist. |
| `resource_missing` | The finding doesn't exist, or belongs to another account. |
