> 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

| 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="/files/A5VF4kYI0RO0B8uFSkSA" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
