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

# SAT Lima

> Look up outstanding debt owed to the SAT de Lima by DNI, RUC, plate, ticket, or code.

Resolves outstanding debt owed to the SAT de Lima (Servicio de Administración
Tributaria de Lima) for a person, company, or vehicle: taxes (impuesto vehicular,
predial, arbitrios, alcabala), traffic tickets (papeletas), administrative fines,
and payment commitments. One lookup, selected by `document_type`.

## Account status

`POST /pe/sat-lima/account-status/v1`

| Field             | Type   | Notes                                                                                                                                                                                                      |
| ----------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `document_type`   | string | One of `dni`, `ruc`, `placa` (vehicle plate), `papeleta` (ticket / administrative-fine document), `cod_administrado` (administered-party code), `compromiso` (payment-commitment code). Defaults to `dni`. |
| `document_number` | string | **Required.** The value to look up, 1-20 alphanumeric characters.                                                                                                                                          |

```bash theme={"dark"}
curl https://api.croma.run/pe/sat-lima/account-status/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_type": "placa", "document_number": "ABC123" }'
```

## Response

| Field                 | Notes                                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| `found`               | `true` when an account resolved (even with zero debt); `false` only on a genuinely empty result. |
| `query`               | The searched value (trimmed, uppercased).                                                        |
| `document_type`       | The search dimension used.                                                                       |
| `clear`               | `true` when there is nothing outstanding.                                                        |
| `summary.total`       | Sum of the outstanding amounts, in PEN (null when there is no debt).                             |
| `summary.items_count` | Number of outstanding items.                                                                     |
| `debts[]`             | The outstanding items (see below).                                                               |

Each item in `debts[]`:

| Field                                       | Notes                                                                                             |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `group`                                     | Human label for the debt group (e.g. `Papeletas`, `Impuesto vehicular`, `Arbitrios municipales`). |
| `group_code`, `concept_code`                | Source group / concept codes.                                                                     |
| `reference`                                 | Reference or document identifier for the item.                                                    |
| `document`                                  | Source document field.                                                                            |
| `plate`                                     | Plate, for vehicle-bound items.                                                                   |
| `amount`                                    | Outstanding amount, in PEN.                                                                       |
| `amount_with_discount`                      | Discounted amount when offered.                                                                   |
| `status`                                    | Item status.                                                                                      |
| `year`, `installment`                       | Tax year and installment, for tax items.                                                          |
| `due_date`                                  | Due date (`yyyy-mm-dd` when parseable).                                                           |
| `infraction_date`                           | Infraction date (`yyyy-mm-dd` when parseable), for tickets and fines.                             |
| `violation_code`, `violation`, `regulation` | Violation code, description, and regulation, for tickets and fines.                               |

```json theme={"dark"}
{
  "data": {
    "found": true,
    "query": "ABC123",
    "document_type": "placa",
    "clear": true,
    "summary": { "total": null, "items_count": 0 },
    "debts": []
  }
}
```

<Note>
  `dni` and `ruc` resolve the registered party before listing debt, so they can
  take a little longer than a plate or code lookup.
</Note>

<Note>
  This lookup can take longer than a typical request. It is an
  [async job](/async-jobs). By default the request waits inline and returns
  `{ data }`, or you can poll / use a `callback_url`.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, response fields, and an interactive playground.
</Card>
