Italy PA e-Invoicing Codes – Codice Univoco Ufficio (SDI) avatar

Italy PA e-Invoicing Codes – Codice Univoco Ufficio (SDI)

Pricing

$5.00 / 1,000 results

Go to Apify Store
Italy PA e-Invoicing Codes – Codice Univoco Ufficio (SDI)

Italy PA e-Invoicing Codes – Codice Univoco Ufficio (SDI)

Find the Codice Univoco Ufficio (SDI destination code) needed to e-invoice any Italian public administration. Look up by tax code, IPA code, office code, name or location. 56,000+ invoicing offices with PEC, address and PEPPOL ID, from official AgID IPA open data (CC BY 4.0).

Pricing

$5.00 / 1,000 results

Rating

0.0

(0)

Developer

Federico Rossi

Federico Rossi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Share

Every e-invoice to an Italian public administration goes through the SDI (Sistema di Interscambio) and carries the Codice Univoco Ufficio, the 6-character code of the receiving office. A wrong or inactive code can lead to rejection or misrouting, and to late payment.

This Actor verifies codes in bulk and finds the candidate invoicing offices of public bodies in the official IPA registry (AgID): 56,000+ offices of ~23,000 bodies, with the tax code to invoice, start date, PEPPOL ID, PEC and address. It reads the official IPA open-data API (CC BY 4.0) live at every run.

Limits of verification. IPA tells you that an office exists and can receive e-invoices. It does not tell you which office a given invoice must go to. A registered code isn't necessarily the right office for your invoice: follow your purchase order or contract. Every result is a CANDIDATE_OFFICE and carries requiresBillingInstructionConfirmation: true.

Fatturazione elettronica PA: verifica del codice univoco ufficio (codice destinatario PA per FatturaPA) e ricerca degli uffici di fatturazione di un ente.

Use cases

  • Accounting / billing teams: check the codes in your customer master data before issuing FatturaPA invoices.
  • ERP & billing software: validate CodiceDestinatario automatically via API or schedules.
  • Commercialisti / CAF: verify a client's list of PA customers in one run.
  • Discovery: list the invoicing offices of a body, a comune or a region.

How it works

Exact lookup (any officeCodes, fiscalCodes or ipaCodes). Search, location and date filters are ignored (a warning is logged). Office codes are verified first. Every requested code gets a free status row (resultType: "LOOKUP_STATUS"): FOUND, FOUND_NOT_RETURNED (exists, but your Max results or maximum cost stopped it), NOT_FOUND (the official query completed with no match) or INVALID_FORMAT_NOT_FOUND. Codes are trimmed and upper-cased, and the IT prefix is removed from tax codes. The VERIFICATION_REPORT record has the counts. A code is never reported as missing unless it was actually checked.

Search (no codes): words matched as word-prefixes against body name + office name combined (comune torino ragioneria can match body "Comune di Torino" + office "Ragioneria"), plus regions, provinces, comuni and updatedSince.

⚠️ A tax-code or IPA-code lookup returns every invoicing office of the body. The City of Milan has 100+, and each one is a billed result. Keep Max results low, or use central office only.

Each candidate office has a matchStatus, computed against the full IPA registry, not just the returned rows:

matchStatusmeaning
EXACT_CODE_FOUNDyou asked for this office code and it exists
BODY_HAS_ONE_REGISTERED_OFFICEthe body has exactly one invoicing office in IPA (bodyOfficeCount = 1)
MULTIPLE_REGISTERED_OFFICESthe body has several (bodyOfficeCount); pick the one in your order/contract

Example tasks

Verify codes (UFRECE is the prefilled demo; ZZZZZZ shows a free NOT_FOUND status row):

{ "officeCodes": ["UFRECE", "ZZZZZZ"] }

Central invoicing office of every local health authority in Piedmont:

{ "search": "sanitaria locale", "regions": ["Piemonte"], "centralOfficeOnly": true }

Offices located in one comune:

{ "comuni": ["Bergamo"], "maxResults": 200 }

Use it from code

curl (runs the Actor and returns the results in one call):

curl -X POST "https://api.apify.com/v2/acts/nobler_zirconia~italy-pa-einvoice-codes/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"officeCodes": ["UFRECE"]}'

JavaScript (npm i apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('nobler_zirconia/italy-pa-einvoice-codes').call({"officeCodes": ["UFRECE"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

Python (pip install apify-client):

from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("nobler_zirconia/italy-pa-einvoice-codes").call(run_input={"officeCodes": ["UFRECE"]})
items = client.dataset(run["defaultDatasetId"]).list_items().items

You can also use it from Make, Zapier, n8n, schedules, webhooks or the Apify MCP server for AI agents.

Output

A candidate office (billed):

{
"resultType": "CANDIDATE_OFFICE",
"matchStatus": "EXACT_CODE_FOUND",
"bodyOfficeCount": 1,
"bodyOfficeCountComplete": true,
"requiresBillingInstructionConfirmation": true,
"officeCode": "UFRECE",
"officeName": "Uff_eFatturaPA",
"isCentralOffice": true,
"bodyName": "Azienda sanitaria Locale - ASL - Asti",
"bodyFiscalCode": "01120620057",
"ipaCode": "as_asti",
"bodyCategory": "Aziende Sanitarie Locali",
"invoiceFiscalCode": "01120620057",
"einvoicingStartDate": "2015-03-31",
"startDateReached": true,
"fiscalCodeVerifiedOn": "2015-03-26",
"peppolId": null,
"primaryPec": "protocollo@pec.asl.at.it",
"pec": [
"protocollo@pec.asl.at.it"
],
"otherEmails": [],
"phone": null,
"address": "Via Conte Verde, 125",
"postalCode": "14100",
"comune": "Asti",
"comuneIstatCode": "005005",
"province": "AT",
"region": "Piemonte",
"lastUpdated": "2025-03-17",
"source": "IPA – Unità organizzative che ricevono fatture elettroniche (AgID)",
"sourceUrl": "https://indicepa.gov.it/ipa-dati/dataset/unita-organizzative-che-ricevono-fatture-elettroniche",
"license": "CC BY 4.0",
"licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
"attribution": "Fonte: IPA – AgID (CC BY 4.0); comuni: ISTAT (CC BY 4.0). Not endorsed by AgID or the Italian government.",
"retrievedAt": "2026-10-15T09:28:15.009Z"
}

A status row for a code that does not exist (free):

{
"resultType": "LOOKUP_STATUS",
"lookupType": "officeCode",
"requestedValue": "ZZZZZZ",
"validFormat": true,
"status": "NOT_FOUND",
"checked": true,
"billable": false,
"source": "IPA – Unità organizzative che ricevono fatture elettroniche (AgID)",
"sourceUrl": "https://indicepa.gov.it/ipa-dati/dataset/unita-organizzative-che-ricevono-fatture-elettroniche",
"license": "CC BY 4.0",
"licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
"attribution": "Fonte: IPA – AgID (CC BY 4.0); comuni: ISTAT (CC BY 4.0). Not endorsed by AgID or the Italian government.",
"retrievedAt": "2026-10-15T09:28:15.009Z"
}
FieldDescription
resultType, matchStatus, bodyOfficeCount, bodyOfficeCountCompleteSee the table above. The count comes from the full registry.
requiresBillingInstructionConfirmationAlways true: confirm the destination with your order/contract
officeCodeCodice Univoco Ufficio, the value for CodiceDestinatario in FatturaPA
officeName, isCentralOfficeOffice name; true for the "Uff_eFatturaPA" office
bodyName, bodyFiscalCode, ipaCode, bodyCategoryThe public body
invoiceFiscalCodeTax code to use for this office (can differ from the body's)
einvoicingStartDate, startDateReachedStart date of e-invoice reception, and whether that date has passed. IPA has no end date, so this does not prove the office is still active.
fiscalCodeVerifiedOn, peppolIdVerification date of the tax code; PEPPOL ID if any
primaryPec, pec, otherEmails, phone, address, postalCode, comune, comuneIstatCode, province, regionContacts and location
lastUpdatedLast update in IPA
source, sourceUrl, license, licenseUrl, attribution, retrievedAtProvenance on every item: data source, licence (CC BY 4.0), required attribution, and the UTC time the data was retrieved

SUMMARY record: complete, truncatedReason, recordsScanned, billableResults, datasetItemsWritten, lookup counts.

Pricing

$0.005 per candidate office returned (pay per event result). Status rows are free. Verifying 100 codes costs about $0.50. Zero matches cost nothing beyond Apify's start event. If the source fails, the run fails.

Data source, licence and privacy

  • Source: IPA open data – AgID, dataset Unità organizzative che ricevono fatture elettroniche, CC BY 4.0. Attribution: "Fonte: IPA – AgID". Municipality data: ISTAT, CC BY 4.0.
  • Institutional data only; names of officials are not included.

FAQ

Codice Univoco Ufficio vs private "codice destinatario"? Private companies receive invoices through a 7-character recipient code or a PEC. Public administrations use the 6-character Codice Univoco Ufficio published in IPA. A public body (identified by its IPA code and codice fiscale) can have many invoicing offices, each with its own code.

Which office should I invoice? The one in your order or contract. The central Uff_eFatturaPA office is the usual starting point; confirm it with the body. Central office only returns nothing for bodies without such an office.

Companion Actor: Italy IPA Directory – Public Bodies, PEC & Tax Codes.

Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by AgID, the Agenzia delle Entrate or any Italian government body. The data is reproduced from official open data under its licence. It is provided "as is", may contain errors or delays from the source, and is not legal or fiscal advice.