> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/argentina-afip.md).

# ARGENTINA AFIP

ARGENTINA AFIP electronic document support in DocBits

{% hint style="info" %}
Check the country guide for version limits, effective configuration and the country explainer. [Argentina](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/argentina.md). The credit-note classification entry has no dedicated extraction bundle in the inspected status. Verify the effective mapping and test a real credit-note sample.
{% endhint %}

| Property             | Value                                                                      |
| -------------------- | -------------------------------------------------------------------------- |
| **Country / Region** | Argentina                                                                  |
| **Document Types**   | Invoice                                                                    |
| **Format**           | XML                                                                        |
| **Standard**         | AFIP Comprobante Electrónico (Administración Federal de Ingresos Públicos) |
| **Locale**           | `es_AR`                                                                    |

The ARGENTINA AFIP standard is the Argentine federal tax authority's (AFIP) electronic invoice format. Documents are identified by `<tipoComprobante>` — e.g. type `001` = Factura A. Each invoice includes a CAE (Código de Autorización Electrónica) number and barcode for AFIP validation.

## Support Status

| Component        | Status      |
| ---------------- | ----------- |
| Preview          | ✅ Supported |
| Field Extraction | ✅ Supported |
| Transformation   | ✅ Supported |

## Default Preview

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-595617194d582c24b44f3f87240b5709e076d6b4%2Fargentina-afip-preview.png?alt=media" alt="Argentina AFIP invoice preview in DocBits"><figcaption><p>Default DocBits preview for an ARGENTINA AFIP Factura A invoice</p></figcaption></figure>

## Field Mapping

### Header Fields

| DocBits Field          | Source XML Element                                   | Notes                                              |
| ---------------------- | ---------------------------------------------------- | -------------------------------------------------- |
| `invoice_id`           | `<puntoVenta>` + `<numeroComprobante>`               | Formatted as `PPPP-NNNNNNNN`                       |
| `invoice_date`         | `<cabecera>/<fechaEmision>`                          |                                                    |
| `due_date`             | `<cabecera>/<fechaVencimiento>`                      |                                                    |
| `currency`             | Fixed: `ARS`                                         | Always Argentine Peso                              |
| `total_amount`         | `<totales>/<total>`                                  |                                                    |
| `net_amount`           | `<totales>/<netoGravado>` or `<subtotal>`            |                                                    |
| `tax_amount`           | `<totales>/<totalIVA>`                               |                                                    |
| `supplier_name`        | `<emisor>/<razonSocial>`                             |                                                    |
| `supplier_id`          | `<emisor>/<CUIT>` or `<cabecera>/<CUIT>`             | CUIT = Argentine tax ID                            |
| `supplier_address`     | `<emisor>/<domicilioComercial>/<calle>` + `<numero>` |                                                    |
| `supplier_postal_code` | `<emisor>/<domicilioComercial>/<codigoPostal>`       |                                                    |
| `supplier_city`        | `<emisor>/<domicilioComercial>/<localidad>`          |                                                    |
| `supplier_country`     | Fixed: `AR`                                          |                                                    |
| `buyer_name`           | `<receptor>/<razonSocial>`                           |                                                    |
| `buyer_id`             | `<receptor>/<CUIT>`                                  |                                                    |
| `buyer_address`        | `<receptor>/<domicilio>/<calle>` + `<numero>`        |                                                    |
| `buyer_postal_code`    | `<receptor>/<domicilio>/<codigoPostal>`              |                                                    |
| `buyer_city`           | `<receptor>/<domicilio>/<localidad>`                 |                                                    |
| `buyer_country`        | Fixed: `AR`                                          |                                                    |
| `iban`                 | `<PAYMENT/IBAN>`                                     | Usually empty — AFIP docs rarely contain bank data |
| `bic`                  | `<PAYMENT/BIC>`                                      | Usually empty                                      |
| `payment_terms`        | `<PAYMENT_TERMS>`                                    | Usually empty                                      |
| `purchase_order`       | `<PURCHASE_ORDER>`                                   | Usually empty                                      |

### Line Item Table (`INVOICE_TABLE`)

Row path: `<items>/<item>`

| Column        | Source Attribute / Element | Notes                                   |
| ------------- | -------------------------- | --------------------------------------- |
| `POSITION`    | `@numero` attribute        | Item sequence number                    |
| `DESCRIPTION` | `<descripcion>`            |                                         |
| `QUANTITY`    | `<cantidad>`               |                                         |
| `UNIT`        | `<unidadMedida>`           | AFIP unit code (e.g. `7` = unit)        |
| `UNIT_PRICE`  | `<precioUnitario>`         |                                         |
| `VAT_RATE`    | `<alicuotaIVA>`            | e.g. `21.00` for standard Argentine VAT |
| `VAT`         | `<importeIVA>`             |                                         |
| `NET_AMOUNT`  | `<subtotal>`               | Line total before tax                   |

## Classification Rule

DocBits detects ARGENTINA AFIP documents via the regex pattern:

```
<tipoComprobante>001\s*</tipoComprobante>
```

Type `001` corresponds to **Factura A** (invoice to VAT-registered buyers). Other comprobante types are handled by the ARGENTINA FACTURA ELECTRONICA standard.

## Related

* [ARGENTINA FACTURA ELECTRONICA](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/argentina-factura-electronica.md)
* [Supported Electronic Documents](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/argentina-afip.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
