# Romania Supplier Monitor (ANAF VAT & Inactive Taxpayers) (`nocturntools/ro-supplier-monitor`) Actor

Bulk Romania VAT and ANAF inactive taxpayer check by CUI. Schedule weekly supplier monitoring and get alerts when a supplier becomes inactive or loses VAT.

- **URL**: https://apify.com/nocturntools/ro-supplier-monitor.md
- **Developed by:** [Nocturn Tools](https://apify.com/nocturntools) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Romania Supplier Monitor (ANAF VAT & Inactive Taxpayers)

**Find out when a Romanian supplier becomes inactive or loses VAT, before you pay their next invoice.** Give this Actor your list of supplier CUIs and schedule it weekly. It checks every company against ANAF's official registers (inactive taxpayers, VAT registration, deregistration) and tells you only what changed since the last run. Alerts arrive by email, Slack or webhook through Apify integrations. Every row is dated, so you also keep a record that each supplier was checked and when. You can run it as a one-off bulk check too, or with an invoice date, but its main job is to keep watch so you don't have to. Free during launch; planned price $2 per 1,000 companies checked.

Built for accounts payable, finance and procurement teams that pay Romanian suppliers, for accountants who check their clients' supplier lists every month, and for vendor due diligence / KYB workflows.

### Why use it

In Romania, buying from an **inactive taxpayer** costs you money. Under the Romanian Fiscal Code, a buyer who purchases goods or services from a supplier **after** that supplier was entered as inactive in ANAF's register of inactive/reactivated taxpayers cannot deduct either the **expense** or the **VAT** on those purchases. A parallel rule applies to suppliers whose **VAT registration was cancelled**: the buyer cannot deduct the VAT.

This actor checks your whole supplier list in one run, and in monitor mode tells you only what changed since the last run, so you can catch a status change early, ideally before the next invoice is booked.

#### The legal basis

Romanian Fiscal Code (Law no. 227/2015), [art. 11 on legislatie.just.ro](https://legislatie.just.ro/Public/DetaliiDocument/171282):

- **Art. 11 alin. (7)**: buyers who purchase goods and/or services from taxable persons established in Romania, after those persons are entered as inactive in the Register of inactive/reactivated taxpayers (Registrul contribuabililor inactivi/reactivați), do not have the right to deduct the expenses and the VAT on those purchases. Exceptions: goods bought in a forced-execution procedure (executare silită), and goods/services bought from taxable persons in bankruptcy proceedings (procedura falimentului) under Law no. 85/2014.
- **Art. 11 alin. (9)**: buyers who purchase goods and/or services from taxable persons established in Romania whose VAT registration was cancelled under art. 316 alin. (11) lit. c)–e) and h), and who are entered in the register of persons whose VAT registration was cancelled, do not have the right to deduct the VAT on those purchases. Exceptions: goods bought in a forced-execution procedure, and goods bought from taxable persons in bankruptcy proceedings under Law no. 85/2014.

Both paragraphs also set out how deduction works once the supplier is reactivated or registered for VAT again. Wording checked against the consolidated text of 25.10.2026 (both paragraphs in force in this form since 01.01.2017). Read the full text on legislatie.just.ro before relying on it. This README is not tax or legal advice.

Note: the `VAT_CANCELLED` flag is raised for **any** cancelled VAT registration. Alin. (9) applies only to some cancellation grounds, so check `vatPeriods[].cancellationReason` (ANAF's own text) for the reason.

### Quick start

1. Paste your suppliers' CUIs into **Company fiscal codes** (with or without `RO`).
2. Leave **Mode** on `check` and click **Start**.
3. Open the **Overview** view of the dataset: one row per CUI, in your input order (monitor mode can change the order, see **Rotation** below).

#### Input example

```json
{
  "cuis": ["RO14399840", "1590082", "160796"],
  "references": { "RO14399840": "SUP-001" },
  "includeAddress": true,
  "mode": "check"
}
```

`references` is optional: your own label per CUI (for example the supplier ID in your ERP), echoed back in the `reference` field.

#### Output example (legal entity)

Real response for Automobile-Dacia SA, recorded from ANAF on 2026-11-04:

```json
{
  "input": "160796",
  "cui": "160796",
  "reference": null,
  "status": "OK",
  "error": null,
  "checkDate": "2026-11-04",
  "name": "AUTOMOBILE-DACIA SA",
  "tradeRegisterNo": "J1991000081036",
  "legalForm": "SOCIETATE COMERCIALĂ PE ACŢIUNI",
  "ownershipForm": "PROPR.PRIVATA-CAPITAL PRIVAT AUTOHTON SI STRAIN",
  "organizationForm": "PERSOANA JURIDICA",
  "caen": "2910",
  "registrationStatus": "INREGISTRAT din data 30.11.1992",
  "county": "ARGEŞ",
  "locality": "Loc. Mioveni Orş. Mioveni",
  "address": "JUD. ARGEŞ, LOC. MIOVENI ORŞ. MIOVENI, STR. UZINEI, NR.1",
  "vatRegistered": true,
  "vatPeriods": [{ "start": "1993-07-01", "end": null, "cancellationAppliedOn": null, "cancellationReason": null }],
  "cashAccountingVat": false,
  "inactive": false,
  "inactiveSince": null,
  "reactivatedOn": null,
  "deregisteredOn": null,
  "splitVat": false,
  "eFacturaRegistryLegacy": false,
  "eFacturaRegistryLegacyDate": null,
  "isNaturalPersonEntity": false,
  "redacted": false,
  "riskFlags": [],
  "source": { "vat": "ANAF PlatitorTvaRest v9" },
  "checkedAt": "2026-11-04T10:00:00.000Z"
}
```

#### Output example (redacted natural-person entity)

For a PFA / II / IF, the identifying fields are always `null` and `redacted` is `true`. The fiscal status (VAT, inactive, deregistered) is still returned. The CUI below is synthetic (fields shortened).

```json
{
  "cui": "12345674",
  "status": "OK",
  "name": null,
  "tradeRegisterNo": null,
  "county": null,
  "locality": null,
  "address": null,
  "vatRegistered": false,
  "inactive": true,
  "inactiveSince": "2025-03-14",
  "deregisteredOn": null,
  "isNaturalPersonEntity": true,
  "redacted": true,
  "riskFlags": ["INACTIVE"]
}
```

### Two modes

#### `check`: one-off check of a list

Returns the current status of every CUI. Use **Check date** (`checkDate`) for a point-in-time check, for example "was this supplier VAT-registered and active on the invoice date?". Leave it empty for today (Europe/Bucharest time). Future dates are rejected.

#### `monitor`: scheduled runs with change alerts

Monitor mode checks the list **today** and compares each CUI with the previous run of the same monitor.

- **Baseline.** The first run for a monitor saves a baseline. Each CUI gets `monitorStatus: "BASELINE"` and one `FIRST_SEEN` event. A CUI added to the list later also starts with `FIRST_SEEN`.

- **Events** (in the `changes` array, each with `type`, `field`, `from`, `to`, `previousCheckDate`):

  | Event | Meaning |
  |---|---|
  | `BECAME_INACTIVE` / `REACTIVATED` | Entered in / removed from the inactive taxpayer register |
  | `VAT_CANCELLED` / `VAT_REGISTERED` | VAT registration lost / gained |
  | `DEREGISTERED` | A deregistration (radiere) date appeared |
  | `CASH_VAT_CHANGED` | Cash-accounting VAT (TVA la încasare) switched on or off |
  | `SPLIT_VAT_CHANGED` | Split VAT switched on or off |
  | `NAME_CHANGED`, `ADDRESS_CHANGED`, `CAEN_CHANGED` | Company name, fiscal address or main activity code changed (legal entities only) |
  | `FIRST_SEEN` | First time this monitor sees the CUI, or a CUI that was not found before now exists |
  | `NOW_NOT_FOUND` | A CUI that existed is no longer found by ANAF, two runs in a row |

- **A failed check is never a change.** If ANAF doesn't answer for a CUI, its row gets `status: "SOURCE_ERROR"` and `monitorStatus: "NOT_CHECKED"`, no event is emitted and its saved state is kept.

- **NOT_FOUND needs two runs.** The first time a known CUI is not found, the row gets `monitorStatus: "NOT_FOUND_UNCONFIRMED"` and no event. `NOW_NOT_FOUND` fires only if the next run confirms it.

- **Saved as it goes.** The monitor state is saved after every block of 100 CUIs and at the end, and it only ever holds successful checks. If a run stops early (timeout, maximum cost, abort, platform restart), the CUIs already checked stay saved and the next run doesn't report their events again.

- **Rotation.** Monitor mode checks first the CUIs not checked for the longest time (never-checked and newly added CUIs first), so if a run stops early (maximum cost per run, timeout, abort), the next run continues where the list was left instead of starting over. **Rows therefore follow the check order, not always your input order.** After complete runs every CUI has the same last-check time, so the order is your input order again.

- **20% guard.** If more than 20% of the CUIs checked so far end in `SOURCE_ERROR` (judged once at least 10 were checked), the monitor state is **not updated from that point on**. The run still finishes, its status message starts with `WARNING: monitor state NOT saved`, and what was saved before stays, so real changes found in the bad part of the run show up again next run rather than being lost.

- **Only today.** In monitor mode, leave `checkDate` empty (or set it to today). A fixed past date would make a scheduled monitor compare the same day forever.

- **`onlyChanges`.** When `true`, the dataset contains only rows with events, new CUIs, errors, invalid entries and unconfirmed NOT_FOUND. **`onlyChanges` hides the unchanged rows, but they were checked.** The log and the run's status message always say how many CUIs were checked and how many rows were output, for example: `9 of 10 CUIs checked at ANAF, 3 rows output (onlyChanges hid 7 unchanged rows; they were checked).`

- **One `monitorId` per list and schedule.** The state is saved in your key-value store `ro-supplier-monitor-state` under `state-<monitorId>`. Use a different `monitorId` for each supplier list (for example `suppliers-weekly`, `client-acme`). Don't run two runs with the same `monitorId` at the same time: the run that finishes last overwrites the other's state.

Example monitor input:

```json
{
  "cuis": ["RO14399840", "1590082", "160796"],
  "mode": "monitor",
  "monitorId": "suppliers-weekly",
  "onlyChanges": true
}
```

Example event in a `changes` array (illustrative):

```json
{ "type": "BECAME_INACTIVE", "field": "inactive", "from": false, "to": true, "previousCheckDate": "2026-11-02" }
```

The dataset view **Changes (monitor mode)** shows only the monitor columns.

#### Weekly schedule, step by step

1. In Apify Console, open this actor, fill in the monitor input above (your CUIs, `mode: monitor`, your own `monitorId`) and click **Save as a new task**.
2. Run the task once by hand. This is the baseline run.
3. Go to **Schedules** → **Create new**, set it to weekly (for example Monday 07:00, timezone Europe/Bucharest) and add the task you saved.
4. On the task, open **Integrations** to get the results where you work.

#### Getting alerts

Use Apify's built-in integrations on the task: an **email** notification when a run finishes, a **webhook** to your own system (or to n8n / Make / Zapier), or the **Slack** integration. With `onlyChanges: true`, an empty dataset means nothing changed; anything in it needs a look. Check the run's status message too: a `WARNING` there means ANAF had trouble and the state was not (fully) updated.

### Output fields

| Field | Description |
|---|---|
| `input`, `cui` | The entry as you gave it, and the normalized CUI (digits only; null if invalid) |
| `reference` | Your own label from `references` |
| `status` | `OK`, `NOT_FOUND`, `INVALID_CUI` or `SOURCE_ERROR`; `error` gives a short reason |
| `checkDate` | Date the registers were checked for (YYYY-MM-DD) |
| `name`, `tradeRegisterNo` | Company name and trade register number (null when redacted) |
| `legalForm`, `ownershipForm`, `organizationForm`, `caen` | As reported by ANAF; CAEN padded to 4 digits |
| `registrationStatus` | ANAF's registration status text, e.g. `INREGISTRAT din data 30.11.1992` |
| `county`, `locality`, `address` | Fiscal address (legal entities, when `includeAddress` is on) |
| `vatRegistered`, `vatPeriods` | VAT-registered on `checkDate`; registration periods with cancellation date and reason |
| `cashAccountingVat`, `splitVat` | Cash-accounting VAT and split VAT on `checkDate` |
| `inactive`, `inactiveSince`, `reactivatedOn` | Inactive taxpayer status and dates |
| `deregisteredOn` | Deregistration (radiere) date |
| `riskFlags` | `INACTIVE`, `VAT_CANCELLED`, `DEREGISTERED`, `NOT_FOUND` |
| `isNaturalPersonEntity`, `redacted` | PFA / II / IF detected; identifying fields removed |
| `eFacturaRegistryLegacy`, `eFacturaRegistryLegacyDate` | **Informational only, not a risk signal.** A legacy RO e-Factura registry flag from the VAT register. Since 2024 RO e-Factura is mandatory for B2B invoices between Romanian taxpayers, so `false` says nothing about risk (it is `false` for Dacia, OMV Petrom and Dante International, for example). Never part of `riskFlags` or monitor events. |
| `monitorStatus`, `previousCheckDate`, `changes` | Monitor mode only (see above) |
| `source`, `checkedAt` | ANAF service used and when the row was produced |

Never in the output: phone, fax, bank accounts, postal code.

### Pricing

**Free during launch.** Right now there are no per-event charges: you pay only the usual Apify platform usage (compute, storage) of your runs, from your own Apify account. The table below is the **planned** pay-per-event pricing. When it starts, Apify notifies users at least 14 days in advance, and from then on platform usage is no longer billed to you separately.

Planned pricing (pay per event):

| Event | Price |
|---|---|
| Company checked | **$0.002** per company ($2.00 per 1,000) |
| Run start | Apify's standard start event, $0.00005 per run |

What is charged:

- **Run start:** Apify's standard start event, once per run.
- **Company checked:** once per CUI that ANAF found (status `OK`). A CUI that appears several times in your list is checked and charged once.
- **Free:** `NOT_FOUND` (ANAF does not know the CUI), `INVALID_CUI` (never sent to ANAF) and `SOURCE_ERROR` (ANAF could not answer). Retries are never charged.
- **Monitor mode with `onlyChanges`:** hidden unchanged rows **are charged** if ANAF found them, because they were checked. The status message says how many CUIs were checked, how many rows were output, and how many events were charged.

**Maximum cost per run.** If you set one, the actor never checks more CUIs than it can still charge. When the limit is reached it stops cleanly: the rows already checked stay in the dataset, the remaining CUIs get no rows, and the status message starts with `STOPPED` and says how many were not checked. In monitor mode, the CUIs checked before the stop **stay saved**, so the next run doesn't report their events again. Each monitor check of a CUI found by ANAF is charged, changed or not: the row is the proof that the supplier was checked on that date. With a limit below the list size, the monitor rotates: each run starts with the CUIs not checked for the longest time, so the whole list is covered over a few runs and every check is charged once.

**Example monthly cost** (planned pricing) for a weekly monitor (52 runs a year, about 4.33 runs a month), assuming every CUI is found by ANAF. `NOT_FOUND`, invalid CUIs and ANAF errors are free and lower the cost; `onlyChanges` does not change it.

| Suppliers | Per run | Per month |
|---|---|---|
| 100 | $0.20 | ≈ $0.87 |
| 1,000 | $2.00 | ≈ $8.67 |
| 5,000 | $10.00 | ≈ $43.33 |

The run start event adds about $0.0002 a month (4.33 × $0.00005), which does not change the rounded totals. Once this pricing applies, there is no separate platform usage charge on top of these amounts.

### Limits

- **Legal entities in full only.** Natural-person entities (PFA, II, IF and similar) are detected and redacted (GDPR): no name, trade register number or address. Their fiscal status is still shown.
- **Up to 5,000 CUIs per run.** For more, split the list into several runs (in monitor mode, each list with its own `monitorId`).
- **CUI format:** 2–9 digits after an optional `RO` prefix; spaces, dashes and dots are ignored. The control digit is validated. Invalid entries get `INVALID_CUI` and are never sent to ANAF. Duplicates are checked once.
- **ANAF rate limit.** ANAF allows at most 100 CUIs per request and 1 request per second. The actor sends batches of 100, one at a time, a little over a second apart. 1,000 CUIs need at least 10 requests and 5,000 CUIs at least 50, so a full run takes at least about a minute, more if ANAF is slow or a request has to be retried. These limits are fixed and can't be raised.
- **Only what ANAF's VAT register reports.** No financial statements, no insolvency/bankruptcy data, no trade register (ONRC) data. A company in bankruptcy is not necessarily inactive in this register.

### Part of a supplier-check suite

Same CUI list, three angles:

- **Romania Supplier Monitor (ANAF VAT & Inactive Taxpayers)** (this actor): today's ANAF tax status.
- [Romania Supplier Financial Health (ANAF Risk Flags)](https://apify.com/nocturntools/ro-supplier-financial-health): risk flags from the balance sheets ANAF publishes.
- [Romania Supplier Litigation Monitor (portal.just.ro)](https://apify.com/nocturntools/ro-supplier-litigation): court cases from portal.just.ro (insolvency as debtor, active cases as defendant, new cases).

**Monitor pricing differs on purpose.** This actor charges **every check** of a company ANAF found, changed or not: each row is dated proof that the supplier's tax status was verified that day. Financial Health and Litigation Monitor charge only for **changes** in monitor mode.

### Data source, legality and privacy

- **Source:** ANAF's public web service for the VAT registers (PlatitorTvaRest v9), which covers VAT registration, cash-accounting VAT, the inactive/reactivated taxpayer register, split VAT and general company data. It is a public service meant for automated queries: no login, no captcha, no scraping.
- **Data is as reported by ANAF** for the check date. The actor does not correct, enrich or guarantee it.
- **Privacy:** the CUIs you enter are sent only to ANAF. Results stay in your Apify account (your dataset). In monitor mode, a minimal snapshot per CUI is kept in your own key-value store `ro-supplier-monitor-state`; for natural-person entities that snapshot holds status fields only. Personal data is not logged.

**Unofficial. Not affiliated with or endorsed by ANAF or the Ministry of Finance.** The data comes from ANAF's public web services. This actor is not tax or legal advice.

### FAQ

**Is this ANAF's API?**
No. It is an independent tool that calls ANAF's public web service for you, respects its limits, and turns the answers into one clean row per CUI.

**Can I check a date in the past?**
Yes, in `check` mode: set `checkDate` to, for example, the invoice date. The registers are queried as they were on that date. Monitor mode always checks today.

**Why are some names hidden?**
They belong to natural-person entities (PFA, II, IF). Their name and address are personal data, so the actor removes them and sets `redacted: true`. The VAT and inactive status is still returned.

**What happens if ANAF is down during a monitor run?**
The affected CUIs get `SOURCE_ERROR` and no events, and their saved state is kept. If more than 20% of the CUIs checked so far fail, the state isn't updated from that point on and the status message starts with `WARNING`. The next run compares against the last good state of those CUIs.

**Why do I see fewer rows than CUIs in monitor mode?**
You have `onlyChanges` on. Unchanged rows are hidden but were checked (and charged if ANAF found them; `NOT_FOUND` rows are free); the status message gives both numbers. If the status message starts with `STOPPED`, your maximum cost per run was reached before all CUIs were checked.

**What makes this monitor different?**

- **Point-in-time checks.** In `check` mode, `checkDate` queries the registers as they were on a past date, for example the invoice date.
- **An ANAF error is never reported as a change.** Failed CUIs keep their saved state; if more than 20% of a run fails, the state stops being updated from that point on; a CUI that disappears is reported as `NOW_NOT_FOUND` only after two runs in a row.
- **The legal basis is explained.** This README links the Fiscal Code, art. 11 (7) and (9), and has a summary in Romanian.
- **You pay only for companies ANAF actually found.** `NOT_FOUND`, invalid CUIs and ANAF errors are free.

**Can I monitor several supplier lists?**
Yes. Give each list its own `monitorId` and its own schedule, and don't run the same `monitorId` twice at the same time.

**Why is `eFacturaRegistryLegacy` false for large companies?**
It is a legacy flag kept for information only. RO e-Factura has been mandatory for B2B invoices since 2024, so this flag is not a risk signal.

### Pe scurt, în română

**Afli când un furnizor devine inactiv sau pierde codul de TVA, înainte să-i plătești următoarea factură.** Îi dai lista de CUI-uri ale furnizorilor și îl programezi săptămânal. Actorul verifică fiecare firmă în registrele oficiale ANAF (contribuabili inactivi, înregistrare în scopuri de TVA, radiere) și îți raportează doar ce s-a schimbat față de rularea anterioară. Alertele vin pe email, Slack sau webhook, prin integrările Apify. Fiecare rând e datat, deci ai și dovada că furnizorul a fost verificat și când. Îl poți folosi și pentru o verificare punctuală în masă, inclusiv la data facturii, dar rolul lui principal e să supravegheze lista în locul tău. Gratuit la lansare; prețul planificat e 2 $ la 1.000 de firme verificate.

- Conform Codului fiscal, [art. 11 alin. (7) și (9)](https://legislatie.just.ro/Public/DetaliiDocument/171282), cheltuielile și TVA-ul pentru achizițiile de la un furnizor după înscrierea lui ca inactiv nu se deduc, iar TVA-ul pentru achizițiile de la un furnizor cu înregistrarea în scopuri de TVA anulată (în cazurile din art. 316 alin. (11) lit. c)–e) și h)) nu se deduce, cu excepțiile prevăzute de lege.
- Modul `check`: verificare punctuală, opțional la o dată din trecut (de exemplu data facturii).
- Modul `monitor`: rulări programate (de exemplu săptămânal) care raportează doar schimbările (devenit inactiv, TVA anulat, radiat etc.). O eroare ANAF nu e considerată schimbare. Starea se salvează după fiecare bloc de 100 de CUI-uri: dacă rularea se oprește mai devreme (timeout, cost maxim, oprire manuală), CUI-urile deja verificate rămân salvate și rularea următoare nu le mai raportează evenimentele. Rotație: monitorul verifică întâi CUI-urile neverificate de cel mai mult timp (cele noi primele), deci cu un cost maxim mai mic decât lista rularea următoare continuă de unde a rămas; rândurile urmează ordinea verificării, nu neapărat ordinea din input.
- PFA / II / IF: numele și adresa sunt ascunse (GDPR); statusul fiscal rămâne.
- Maximum 5.000 de CUI-uri pe rulare; CUI de 2–9 cifre, cu sau fără `RO`.
- Preț: gratuit la lansare (plătești doar consumul de platformă Apify); prețul planificat, anunțat de Apify cu cel puțin 14 zile înainte: 0,002 $ per firmă găsită (2 $ la 1.000); CUI-urile invalide, negăsite sau cu eroare ANAF sunt gratuite. În monitor se taxează fiecare verificare, cu sau fără schimbare (dovada că furnizorul a fost verificat la data respectivă); Financial Health și Litigation Monitor taxează în monitor doar schimbările.
- Rezultat: un rând per CUI (export CSV/Excel/JSON); alerte pe email, Slack sau webhook prin integrările Apify.
- Folosește și [Romania Supplier Financial Health (ANAF Risk Flags)](https://apify.com/nocturntools/ro-supplier-financial-health) (bilanțuri) și [Romania Supplier Litigation Monitor (portal.just.ro)](https://apify.com/nocturntools/ro-supplier-litigation) (dosare în instanțe).

Neoficial. Nu este afiliat cu ANAF sau cu Ministerul Finanțelor și nu este aprobat de acestea. Datele provin din serviciile web publice ANAF. Nu reprezintă consultanță fiscală sau juridică.

# Actor input Schema

## `cuis` (type: `array`):

Romanian fiscal codes to check, one per line. Accepts "RO14399840", "14399840", spaces and dashes; 2 to 9 digits. Invalid lengths and control digits are reported as INVALID_CUI and not sent to ANAF. Duplicates are checked once. Maximum 5,000 per run.

## `checkDate` (type: `string`):

Point-in-time check (YYYY-MM-DD): the registers as they were on this date, for example an invoice date. Leave empty for today (Europe/Bucharest). Can't be in the future.

## `includeAddress` (type: `boolean`):

Include county, locality and fiscal address. Only for legal entities; never shown for natural-person entities (PFA / II / IF).

## `references` (type: `object`):

Optional map CUI -> your own label (e.g. supplier ID in your ERP). Echoed back in the "reference" field.

## `mode` (type: `string`):

"check": report the current status of each CUI. "monitor": also compare with the previous run of the same monitor and report change events (became inactive, VAT cancelled, deregistered, name/address changed...). The first monitor run saves a baseline. Schedule monitor runs (e.g. weekly) to get alerts.

## `monitorId` (type: `string`):

Monitor mode only. Name of the saved state, so you can run several independent supplier lists. Letters, digits and dashes, max. 40 characters. Stored in your key-value store "ro-supplier-monitor-state".

## `onlyChanges` (type: `boolean`):

Monitor mode only. Output only CUIs with change events (and new CUIs, errors and invalid entries); unchanged CUIs are left out.

## Actor input object example

```json
{
  "cuis": [
    "RO14399840",
    "1590082",
    "160796"
  ],
  "includeAddress": true,
  "references": {
    "RO14399840": "SUP-001"
  },
  "mode": "check",
  "monitorId": "default",
  "onlyChanges": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cuis": [
        "RO14399840",
        "1590082",
        "160796"
    ],
    "references": {
        "RO14399840": "SUP-001"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nocturntools/ro-supplier-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "cuis": [
        "RO14399840",
        "1590082",
        "160796",
    ],
    "references": { "RO14399840": "SUP-001" },
}

# Run the Actor and wait for it to finish
run = client.actor("nocturntools/ro-supplier-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cuis": [
    "RO14399840",
    "1590082",
    "160796"
  ],
  "references": {
    "RO14399840": "SUP-001"
  }
}' |
apify call nocturntools/ro-supplier-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nocturntools/ro-supplier-monitor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wS85tuktshSSdgS9a/builds/tva9rTNeTvvdkK5VM/openapi.json
