# List rules

`GET https://api.fiscalisto.com/v1/rules`

In the order they run, also the paused ones (enabled: false).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | How many per page, from 1 to 100. 10 by default. |
| `starting_after` | query |  | The id of the last one on the previous page, for the next one. |
| `issuer` | query |  | The issuer (iss_…). It can be left out if the key or the account has only one. |
| `trigger` | query |  | Only those of this trigger, for example invoice.received. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

for await (const item of fiscalisto.rules.list()) {
  console.log(item.id);
}
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

for item in fiscalisto.rules.list():
    print(item["id"])
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

foreach ($fiscalisto->rules->list() as $item) {
    echo $item['id'], "\n";
}
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

await foreach (var item in fiscalisto.Rules.ListAutoPagingAsync())
    Console.WriteLine(item.Id);
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	for item, err := range client.Rules.ListAutoPaging(ctx, nil) {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(item.ID)
	}
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

for (var item : fiscalisto.rules().listAutoPaging()) {
    System.out.println(item.getId());
}
```

## Response 200

OK.

A `RuleList` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | yes | What kind of object it is («invoice», «customer»…). |
| `data` | array of object | yes | The objects on this page. |
| `data[].id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `data[].livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `data[].object` | `"rule"` | yes | What kind of object it is («invoice», «customer»…). |
| `data[].issuer` | string | yes | The issuer (iss_…). |
| `data[].name` | string | yes | Name. |
| `data[].trigger` | `invoice.received`, `invoice.issued`, `invoice.paid`, `invoice.cancelled`, `invoice.approved`, `invoice.rejected`, `finding.created`, `payout.submitted`, `payout.paid`, `payout.failed`, `invoice.daily`, `purchase_order.daily`, `bank.movement`, `purchase_order.saved`, `purchase_order.approved`, `purchase_order.rejected`, `purchase_order.sent`, `purchase_order.confirmed`, `purchase_order.received_part`, `purchase_order.received_all`, `purchase_order.invoiced_all`, `purchase_order.price_variance`, `purchase_order.registered`, `sat.listed`, `sat.opinion`, `sat.buzon`, `sat.certificate` | yes | When it runs. |
| `data[].conditions` | object | yes | If: what the invoice or order has to meet. Without conditions, it always runs. |
| `data[].conditions.match` | `all`, `any` | yes | all: every condition is met; any: one is enough. |
| `data[].conditions.conditions` | array of object | yes | The standalone conditions. |
| `data[].conditions.conditions[].field` | string | yes | What is checked (supplier, total, metodo, category…). |
| `data[].conditions.conditions[].operator` | `is`, `not`, `gte`, `lte`, `between`, `contains`, `not_contains`, `starts`, `yes`, `no`, `set`, `unset` | yes | How it compares. |
| `data[].conditions.conditions[].values` | array of string |  | For is / not: the values (RFC, codes, ccn_…). |
| `data[].conditions.conditions[].value` | number |  | For gte, lte and between: the amount in pesos. |
| `data[].conditions.conditions[].to` | number |  | For between: the amount up to. |
| `data[].conditions.conditions[].text` | string |  | For contains, not_contains and starts. |
| `data[].conditions.conditions[].compare_to` | string |  | For gte, lte and between: the other number field it's compared with; value and to are then a % of that field. |
| `data[].conditions.groups` | array of object | yes | Conditions that go together, with their own match. |
| `data[].conditions.groups[].match` | `all`, `any` | yes | How the group's conditions are combined. |
| `data[].conditions.groups[].conditions` | array of object | yes | The group's conditions. |
| `data[].conditions.groups[].conditions[].field` | string | yes | What is checked (supplier, total, metodo, category…). |
| `data[].conditions.groups[].conditions[].operator` | `is`, `not`, `gte`, `lte`, `between`, `contains`, `not_contains`, `starts`, `yes`, `no`, `set`, `unset` | yes | How it compares. |
| `data[].conditions.groups[].conditions[].values` | array of string |  | For is / not: the values (RFC, codes, ccn_…). |
| `data[].conditions.groups[].conditions[].value` | number |  | For gte, lte and between: the amount in pesos. |
| `data[].conditions.groups[].conditions[].to` | number |  | For between: the amount up to. |
| `data[].conditions.groups[].conditions[].text` | string |  | For contains, not_contains and starts. |
| `data[].conditions.groups[].conditions[].compare_to` | string |  | For gte, lte and between: the other number field it's compared with; value and to are then a % of that field. |
| `data[].actions` | array of object | yes | Then: what it does, in this order. |
| `data[].actions[].type` | `tag`, `cost_center`, `category`, `stage`, `close`, `ask_approval`, `notify`, `lote`, `hold_payment`, `email_supplier`, `review_findings`, `extra_signature`, `account`, `webhook`, `flag` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `data[].actions[].severity` | `critical`, `warning`, `info` |  | flag: how serious the rule's finding is. |
| `data[].actions[].detail` | string or null |  | flag: what to check, as shown in Hallazgos. |
| `data[].actions[].finding_code` | string |  | flag: its finding's code (regla_…), the `code` in GET /v1/findings and GET /v1/sat_findings. |
| `data[].actions[].tag` | string |  | tag: the tag (tag_…, GET /v1/tags). |
| `data[].actions[].url` | string |  | webhook: the address it sends rule.matched to. |
| `data[].actions[].webhook_endpoint` | string or null |  | webhook: the webhook of Desarrolladores › Webhooks at that address (we_…), where its secret and deliveries are. |
| `data[].actions[].account` | string |  | account: the number of the chart's account the invoice is booked to, instead of its category's (it doesn't change one a person chose). |
| `data[].actions[].category` | string |  | category: the expense category (received invoices). |
| `data[].actions[].remove_when_unmet` | boolean |  | tag: it is removed if the order stops meeting the conditions. |
| `data[].actions[].cost_center` | string |  | Its cost center (ccn_…): the site, project, branch or department it belongs to, to see income and expenses by center in Reportes. It doesn't change the CFDI. Its credit notes take it on their own. |
| `data[].actions[].stage` | integer |  | stage: the stage. (from -9007199254740991 to 9007199254740991) |
| `data[].actions[].members` | array of string |  | notify: whom (mem_…). |
| `data[].actions[].note` | string or null |  | notify: what the notice says. hold_payment: why it's held. |
| `data[].actions[].topic` | `ordenes`, `pagos`, `facturas`, `complementos`, `documentos`, `precios` |  | email_supplier: the topic of the supplier's addresses it goes to. |
| `data[].actions[].subject` | string |  | email_supplier: the subject. |
| `data[].actions[].message` | string |  | email_supplier: the message. |
| `data[].actions[].per` | `payout`, `invoice` |  | email_supplier in the payment triggers: payout, one email per pago and supplier; invoice, one per invoice. |
| `data[].actions[].columns` | object or null |  | email_supplier: the columns of each table in the message; null: the usual ones. |
| `data[].actions[].columns.tabla_facturas` | array of string |  | Columns of {tabla_facturas}, in their order. |
| `data[].actions[].columns.tabla_conceptos` | array of string |  | Columns of {tabla_conceptos}, in their order. |
| `data[].actions[].columns.tabla_productos` | array of string |  | Columns of {tabla_productos}, in their order. |
| `data[].actions[].cc` | array of string |  | email_supplier: team members copied (mem_…). |
| `data[].actions[].findings` | array of string |  | review_findings: the findings it marks as reviewed (their codes). |
| `data[].actions[].signatures` | integer |  | extra_signature: how many more signatures it asks for (1 to 3). (from -9007199254740991 to 9007199254740991) |
| `data[].actions[].reason` | string or null |  | extra_signature: why, for whoever signs. |
| `data[].actions[].lote_name` | string or null |  | lote: the batch's name; null: «Lote del jueves 27 nov». |
| `data[].actions[].pay_on` | `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `in_days`, `due` |  | lote: the day it pays (next weekday, some days later, or the contrarecibo's date). |
| `data[].actions[].days` | integer |  | lote with pay_on in_days: how many days. (from -9007199254740991 to 9007199254740991) |
| `data[].else_actions` | array of object | yes | Else: what it does when its conditions don't hold ([]: nothing). |
| `data[].else_actions[].type` | `tag`, `cost_center`, `category`, `stage`, `close`, `ask_approval`, `notify`, `lote`, `hold_payment`, `email_supplier`, `review_findings`, `extra_signature`, `account`, `webhook`, `flag` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `data[].else_actions[].severity` | `critical`, `warning`, `info` |  | flag: how serious the rule's finding is. |
| `data[].else_actions[].detail` | string or null |  | flag: what to check, as shown in Hallazgos. |
| `data[].else_actions[].finding_code` | string |  | flag: its finding's code (regla_…), the `code` in GET /v1/findings and GET /v1/sat_findings. |
| `data[].else_actions[].tag` | string |  | tag: the tag (tag_…, GET /v1/tags). |
| `data[].else_actions[].url` | string |  | webhook: the address it sends rule.matched to. |
| `data[].else_actions[].webhook_endpoint` | string or null |  | webhook: the webhook of Desarrolladores › Webhooks at that address (we_…), where its secret and deliveries are. |
| `data[].else_actions[].account` | string |  | account: the number of the chart's account the invoice is booked to, instead of its category's (it doesn't change one a person chose). |
| `data[].else_actions[].category` | string |  | category: the expense category (received invoices). |
| `data[].else_actions[].remove_when_unmet` | boolean |  | tag: it is removed if the order stops meeting the conditions. |
| `data[].else_actions[].cost_center` | string |  | Its cost center (ccn_…): the site, project, branch or department it belongs to, to see income and expenses by center in Reportes. It doesn't change the CFDI. Its credit notes take it on their own. |
| `data[].else_actions[].stage` | integer |  | stage: the stage. (from -9007199254740991 to 9007199254740991) |
| `data[].else_actions[].members` | array of string |  | notify: whom (mem_…). |
| `data[].else_actions[].note` | string or null |  | notify: what the notice says. hold_payment: why it's held. |
| `data[].else_actions[].topic` | `ordenes`, `pagos`, `facturas`, `complementos`, `documentos`, `precios` |  | email_supplier: the topic of the supplier's addresses it goes to. |
| `data[].else_actions[].subject` | string |  | email_supplier: the subject. |
| `data[].else_actions[].message` | string |  | email_supplier: the message. |
| `data[].else_actions[].per` | `payout`, `invoice` |  | email_supplier in the payment triggers: payout, one email per pago and supplier; invoice, one per invoice. |
| `data[].else_actions[].columns` | object or null |  | email_supplier: the columns of each table in the message; null: the usual ones. |
| `data[].else_actions[].columns.tabla_facturas` | array of string |  | Columns of {tabla_facturas}, in their order. |
| `data[].else_actions[].columns.tabla_conceptos` | array of string |  | Columns of {tabla_conceptos}, in their order. |
| `data[].else_actions[].columns.tabla_productos` | array of string |  | Columns of {tabla_productos}, in their order. |
| `data[].else_actions[].cc` | array of string |  | email_supplier: team members copied (mem_…). |
| `data[].else_actions[].findings` | array of string |  | review_findings: the findings it marks as reviewed (their codes). |
| `data[].else_actions[].signatures` | integer |  | extra_signature: how many more signatures it asks for (1 to 3). (from -9007199254740991 to 9007199254740991) |
| `data[].else_actions[].reason` | string or null |  | extra_signature: why, for whoever signs. |
| `data[].else_actions[].lote_name` | string or null |  | lote: the batch's name; null: «Lote del jueves 27 nov». |
| `data[].else_actions[].pay_on` | `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `in_days`, `due` |  | lote: the day it pays (next weekday, some days later, or the contrarecibo's date). |
| `data[].else_actions[].days` | integer |  | lote with pay_on in_days: how many days. (from -9007199254740991 to 9007199254740991) |
| `data[].once_per_record` | boolean | yes | true: it runs only once per invoice or order. |
| `data[].wait_days` | integer | yes | Wait and check again: the days it waits before acting, checking the record again (0: it acts right away). (from -9007199254740991 to 9007199254740991) |
| `data[].follow_ups` | array of object | yes | If it still holds: steps days after it acted (reminders, escalation); if its conditions no longer hold, the remaining ones don't run ([]: none). |
| `data[].follow_ups[].days` | integer | yes | Days after it did its actions. (from -9007199254740991 to 9007199254740991) |
| `data[].follow_ups[].actions` | array of object | yes | What it does that day, if its conditions still hold. |
| `data[].follow_ups[].actions[].type` | `tag`, `cost_center`, `category`, `stage`, `close`, `ask_approval`, `notify`, `lote`, `hold_payment`, `email_supplier`, `review_findings`, `extra_signature`, `account`, `webhook`, `flag` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `data[].follow_ups[].actions[].severity` | `critical`, `warning`, `info` |  | flag: how serious the rule's finding is. |
| `data[].follow_ups[].actions[].detail` | string or null |  | flag: what to check, as shown in Hallazgos. |
| `data[].follow_ups[].actions[].finding_code` | string |  | flag: its finding's code (regla_…), the `code` in GET /v1/findings and GET /v1/sat_findings. |
| `data[].follow_ups[].actions[].tag` | string |  | tag: the tag (tag_…, GET /v1/tags). |
| `data[].follow_ups[].actions[].url` | string |  | webhook: the address it sends rule.matched to. |
| `data[].follow_ups[].actions[].webhook_endpoint` | string or null |  | webhook: the webhook of Desarrolladores › Webhooks at that address (we_…), where its secret and deliveries are. |
| `data[].follow_ups[].actions[].account` | string |  | account: the number of the chart's account the invoice is booked to, instead of its category's (it doesn't change one a person chose). |
| `data[].follow_ups[].actions[].category` | string |  | category: the expense category (received invoices). |
| `data[].follow_ups[].actions[].remove_when_unmet` | boolean |  | tag: it is removed if the order stops meeting the conditions. |
| `data[].follow_ups[].actions[].cost_center` | string |  | Its cost center (ccn_…): the site, project, branch or department it belongs to, to see income and expenses by center in Reportes. It doesn't change the CFDI. Its credit notes take it on their own. |
| `data[].follow_ups[].actions[].stage` | integer |  | stage: the stage. (from -9007199254740991 to 9007199254740991) |
| `data[].follow_ups[].actions[].members` | array of string |  | notify: whom (mem_…). |
| `data[].follow_ups[].actions[].note` | string or null |  | notify: what the notice says. hold_payment: why it's held. |
| `data[].follow_ups[].actions[].topic` | `ordenes`, `pagos`, `facturas`, `complementos`, `documentos`, `precios` |  | email_supplier: the topic of the supplier's addresses it goes to. |
| `data[].follow_ups[].actions[].subject` | string |  | email_supplier: the subject. |
| `data[].follow_ups[].actions[].message` | string |  | email_supplier: the message. |
| `data[].follow_ups[].actions[].per` | `payout`, `invoice` |  | email_supplier in the payment triggers: payout, one email per pago and supplier; invoice, one per invoice. |
| `data[].follow_ups[].actions[].columns` | object or null |  | email_supplier: the columns of each table in the message; null: the usual ones. |
| `data[].follow_ups[].actions[].columns.tabla_facturas` | array of string |  | Columns of {tabla_facturas}, in their order. |
| `data[].follow_ups[].actions[].columns.tabla_conceptos` | array of string |  | Columns of {tabla_conceptos}, in their order. |
| `data[].follow_ups[].actions[].columns.tabla_productos` | array of string |  | Columns of {tabla_productos}, in their order. |
| `data[].follow_ups[].actions[].cc` | array of string |  | email_supplier: team members copied (mem_…). |
| `data[].follow_ups[].actions[].findings` | array of string |  | review_findings: the findings it marks as reviewed (their codes). |
| `data[].follow_ups[].actions[].signatures` | integer |  | extra_signature: how many more signatures it asks for (1 to 3). (from -9007199254740991 to 9007199254740991) |
| `data[].follow_ups[].actions[].reason` | string or null |  | extra_signature: why, for whoever signs. |
| `data[].follow_ups[].actions[].lote_name` | string or null |  | lote: the batch's name; null: «Lote del jueves 27 nov». |
| `data[].follow_ups[].actions[].pay_on` | `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `in_days`, `due` |  | lote: the day it pays (next weekday, some days later, or the contrarecibo's date). |
| `data[].follow_ups[].actions[].days` | integer |  | lote with pay_on in_days: how many days. (from -9007199254740991 to 9007199254740991) |
| `data[].stop_after` | boolean | yes | true: if it's met, the following rules don't run for that record. |
| `data[].enabled` | boolean | yes | false: paused. |
| `data[].position` | integer | yes | Its place in the order they run in (1 first). (from -9007199254740991 to 9007199254740991) |
| `data[].created_at` | string (date-time) or null | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |
| `data[].updated_at` | string (date-time) or null | yes | When it last changed, ISO 8601 (-06:00). |
| `has_more` | boolean | yes | true if there are more: request the next one with starting_after set to the id of the last one. |
| `url` | string | yes | This list's path. |

```json
{
  "object": "list",
  "data": [
    {
      "id": "rul_OufpKqnrvx9p2Hq8vR4nXk7LmT3wYc9pB6",
      "object": "rule",
      "livemode": false,
      "issuer": "iss_OufpKqnrvx9p",
      "name": "Aceros del Norte a Obra Norte",
      "trigger": "invoice.received",
      "conditions": {
        "match": "all",
        "conditions": [
          {
            "field": "supplier",
            "operator": "is",
            "values": [
              "ADN0101019Z3"
            ]
          }
        ],
        "groups": []
      },
      "actions": [
        {
          "type": "cost_center",
          "cost_center": "ccn_OufpKqnrvx9p1"
        }
      ],
      "else_actions": [],
      "once_per_record": true,
      "wait_days": 0,
      "follow_ups": [],
      "stop_after": false,
      "enabled": true,
      "position": 1,
      "created_at": "2026-11-20T10:00:00-06:00",
      "updated_at": "2026-11-20T10:00:00-06:00"
    }
  ],
  "has_more": false,
  "url": "/v1/rules"
}
```

## Errors

- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
