# Stamp a batch of invoices

`POST https://api.fiscalisto.com/v1/invoice_batches`

Up to 1,000 income invoices of one issuer, stamped in the background. They're all checked before starting: if one doesn't pass, none is stamped. Answers 202; listen for invoice_batch.completed or look up the batch.

## Before you call

- **An issuer that already stamps.** In production, with its digital seal (CSD) current: [`POST /v1/issuers/{id}/certificates`](https://fiscalisto.com/en/docs/api/referencia/emisores/upload-certificate). In test mode it stamps with SAT's test CSD.
- **The `Idempotency-Key` header**, a new one for each call (for example, the order's id in your system). If the response is lost, repeat the call with the same one and it isn't done twice: [Idempotency](https://fiscalisto.com/en/docs/api/idempotencia).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | yes | A new one per CFDI (8 to 255 characters; your order id works). If the response is lost, repeat the request with the same value: it answers the same and never stamps twice. |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer` | string (iss_…) |  | Issuer (iss_…). If the key has a single issuer or the account has only one, it can be left out. |
| `name` | string |  | The batch's name, for you. (up to 120 characters) |
| `invoices` | array of object | yes | The invoices, like the body of POST /v1/invoices, with an optional reference. (up to 1000) |
| `invoices[].issuer` | string (iss_…) |  | Issuer (iss_…). If the key has a single issuer or the account has only one, it can be left out. |
| `invoices[].branch` | string (brn_…) |  | Branch (brn_…) the invoice is issued from: its postal code goes in LugarExpedicion, its address on the PDF and, if it has them, its series. Without it, the issuer's tax address (the Matriz). |
| `invoices[].cost_center` | string (ccn_…) |  | 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. |
| `invoices[].warehouse` | string (whs_…) |  | Warehouse (whs_…) its track_stock products come out of. By default, its branch's (or the Matriz's). |
| `invoices[].customer` | string (cus_…) or object |  | The customer (Receptor): the id of one from your catalog (cus_…) or their data. Required except on a transfer (type T), whose recipient is the issuer itself. |
| `invoices[].customer.tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `invoices[].customer.legal_name` | string | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). (up to 300 characters) |
| `invoices[].customer.tax_system` | string | yes | Tax regime (RegimenFiscal), a c_RegimenFiscal key: 601, 612, 626… |
| `invoices[].customer.zip` | string | yes | Postal code of the customer's tax address (DomicilioFiscalReceptor), 5 digits. |
| `invoices[].customer.email` | string or null |  | Email to send it to (several separated by commas). Only used if sending is requested. |
| `invoices[].customer.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].customer.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].customer.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].customer.ieps_taxpayer` | boolean |  | true if the customer is an IEPS taxpayer: IEPS is broken out instead of added to the price, except that of alcohol and tobacco (rates 0.5, 1.6 and 0.304), which always goes in the price (LIEPS art. 19 fr. II). |
| `invoices[].items` | array of object | yes | Line items (Conceptos), at least one. (up to 200) |
| `invoices[].items[].product` | string (prd_…) |  | A product from your catalog (prd_…): takes its key, unit, price and taxes. |
| `invoices[].items[].description` | string |  | Line item description (Descripcion), up to 1,000 characters. (up to 1000 characters) |
| `invoices[].items[].product_key` | string |  | Product or service key (ClaveProdServ), 8 digits from c_ClaveProdServ. Look it up with GET /v1/sat_catalogs/product_keys?q=… |
| `invoices[].items[].unit_key` | string |  | Unit key (ClaveUnidad) from c_ClaveUnidad: E48 service unit, H87 piece, ACT activity… By default H87 if the product key is for goods (segments 10 to 60) and E48 if it's for a service. (up to 5 characters) |
| `invoices[].items[].unit_name` | string or null |  | Unit name (Unidad), up to 20 characters. |
| `invoices[].items[].sku` | string or null |  | Identification number or SKU (NoIdentificacion). |
| `invoices[].items[].quantity` | number |  | Quantity (Cantidad). 1 by default. (greater than 0 and up to 1000000000) |
| `invoices[].items[].unit_price` | number |  | Unit price before taxes (ValorUnitario). (from 0 to 1000000000000) |
| `invoices[].items[].discount` | number |  | Discount (Descuento). (from 0 to 1000000000000) |
| `invoices[].items[].taxability` | `01`, `02`, `03`, `04`, `05`, `06`, `07`, `08` |  | Tax object (ObjetoImp), c_ObjetoImp: 01 not subject, 02 subject (the default), 03 not broken out, 04 not taxable… |
| `invoices[].items[].iva` | `0`, `0.16`, `0.08`, `exento` |  | Transferred VAT rate: 0.16 (the default), 0.08 (border region), 0 or exento. |
| `invoices[].items[].ieps` | number |  | Transferred IEPS: rate (0.265…) or amount in pesos per unit, depending on ieps_factor. (from 0 to 72.1605) |
| `invoices[].items[].ieps_factor` | `Tasa`, `Cuota` |  | Tasa or Cuota (IEPS TipoFactor). |
| `invoices[].items[].ieps_units` | number |  | IEPS units for per-unit rates (liters, cigarettes…), if they aren't the quantity. (greater than 0 and up to 1000000000) |
| `invoices[].items[].iva_retention` | number |  | Withheld VAT rate (for example 0.106667, two thirds of 16%). (from 0 to 0.16) |
| `invoices[].items[].isr_retention` | number |  | Withheld ISR rate (for example 0.10 professional fees, 0.0125 RESICO). (from 0 to 0.35) |
| `invoices[].items[].predial` | array of string |  | Property tax account numbers (CuentaPredial) in leasing. (up to 10) |
| `invoices[].items[].pedimentos` | array of string |  | Pedimento numbers (InformacionAduanera) of imported goods. (up to 50) |
| `invoices[].items[].third_party` | object |  | On behalf of third parties (ACuentaTerceros): RFC, name, regime and postal code. |
| `invoices[].items[].third_party.tax_id` | string | yes | RFC of the party on whose behalf (RfcACuentaTerceros). (up to 13 characters) |
| `invoices[].items[].third_party.name` | string | yes | Name (NombreACuentaTerceros). (up to 300 characters) |
| `invoices[].items[].third_party.tax_system` | string | yes | Tax regime (RegimenFiscalACuentaTerceros), c_RegimenFiscal. |
| `invoices[].items[].third_party.zip` | string | yes | Postal code of their tax address (DomicilioFiscalACuentaTerceros). |
| `invoices[].items[].iedu` | object |  | Private educational institutions complement (IEDU): student, CURP, level and RVOE. |
| `invoices[].items[].iedu.student_name` | string | yes | Student's name (nombreAlumno). (up to 300 characters) |
| `invoices[].items[].iedu.curp` | string | yes | CURP, 18 characters. (18 characters) |
| `invoices[].items[].iedu.level` | `Preescolar`, `Primaria`, `Secundaria`, `Profesional técnico`, `Bachillerato o su equivalente` | yes | Education level (nivelEducativo). |
| `invoices[].items[].iedu.rvoe` | string | yes | Official recognition of the studies' validity (autRVOE). (up to 30 characters) |
| `invoices[].items[].iedu.payer_tax_id` | string or null |  | RFC of whoever pays, if it isn't the recipient (rfcPago). |
| `invoices[].items[].used_vehicle` | object |  | Used vehicle complement. |
| `invoices[].items[].used_vehicle.purchase_amount` | number | yes | Acquisition amount (montoAdquisicion). (greater than 0 and up to 1000000000000) |
| `invoices[].items[].used_vehicle.sale_amount` | number | yes | Sale amount (montoEnajenacion). (greater than 0 and up to 1000000000000) |
| `invoices[].items[].used_vehicle.vehicle_key` | string | yes | Vehicle key (claveVehicular). (up to 7 characters) |
| `invoices[].items[].used_vehicle.make` | string | yes | Make (marca). (up to 50 characters) |
| `invoices[].items[].used_vehicle.type` | string | yes | Type or version (tipo). (up to 50 characters) |
| `invoices[].items[].used_vehicle.model` | string | yes | Model year (modelo), 4 digits. |
| `invoices[].items[].used_vehicle.engine_number` | string |  | Engine number (numeroMotor). (up to 17 characters) |
| `invoices[].items[].used_vehicle.serial_number` | string |  | Serial number (numeroSerie). (up to 17 characters) |
| `invoices[].items[].used_vehicle.niv` | string |  | Vehicle identification number (NIV). (up to 17 characters) |
| `invoices[].items[].used_vehicle.guide_value` | number | yes | Value according to the EBC guide or Libro Azul (valor). (greater than 0 and up to 1000000000000) |
| `invoices[].items[].used_vehicle.customs` | array of object |  | Customs information of the vehicle's import (InformacionAduanera). (up to 10) |
| `invoices[].items[].used_vehicle.customs[].number` | string | yes | Number of the import document (numero). (up to 100 characters) |
| `invoices[].items[].used_vehicle.customs[].date` | string | yes | Date of the document (fecha), YYYY-MM-DD. |
| `invoices[].items[].used_vehicle.customs[].office` | string |  | Customs office (aduana). (up to 100 characters) |
| `invoices[].items[].hydrocarbon` | object |  | Hidrocarburos y Petrolíferos complement: required on each line item of diesel (15101505) or gasoline (15101514, 15101515) of an invoice or credit note, in liters (LTR). |
| `invoices[].items[].hydrocarbon.permit_type` | string | yes | CNE or CRE permit type (TipoPermiso, c_TipoPermiso): PER01 to PER11. |
| `invoices[].items[].hydrocarbon.permit_number` | string | yes | CNE or CRE permit number (NumeroPermiso), like PL/12345/EXP/ES/2016: from 15 to 35 characters. (up to 35 characters) |
| `invoices[].items[].hydrocarbon.subproduct` | string | yes | Subproduct (SubProductoHYP, c_SubProductoHYP): SP16 regular gasoline, SP17 premium, SP18 automotive diesel… |
| `invoices[].items[].addenda` | object |  | The recipient's addenda (Walmart, Soriana…), with its own fields. |
| `invoices[].type` | `I`, `T` |  | I income (by default; with global, global invoice) or T delivery note. Credit notes: POST /v1/credit_notes. Payments: POST /v1/payments. (default "I") |
| `invoices[].carta_porte` | object |  | Carta Porte 3.1 complement (transfer of goods). |
| `invoices[].carta_porte.modes` | array of `01`, `02`, `03`, `04` |  | How the goods travel (c_CveTransporte): 01 road, 02 sea, 03 air, 04 rail; several if intermodal. 01 by default. (up to 4) |
| `invoices[].carta_porte.international` | object |  | International transport (TranspInternac Sí): entry or exit, country, route and customs regimes. |
| `invoices[].carta_porte.international.direction` | `Entrada`, `Salida` | yes | EntradaSalidaMerc: Entrada or Salida. |
| `invoices[].carta_porte.international.country` | string | yes | Country of origin or destination (PaisOrigenDestino), c_Pais. (3 characters) |
| `invoices[].carta_porte.international.via` | string | yes | Route of entry or exit (ViaEntradaSalida), c_CveTransporte (05 pipeline included). (up to 2 characters) |
| `invoices[].carta_porte.international.regimes` | array of string | yes | Customs regimes (RegimenAduanero), c_RegimenAduanero. (up to 10) |
| `invoices[].carta_porte.istmo` | object |  | Isthmus of Tehuantepec Interoceanic Corridor: origin and destination hubs (c_RegistroISTMO). |
| `invoices[].carta_porte.istmo.origin` | string | yes | Origin hub (UbicacionPoloOrigen). (up to 2 characters) |
| `invoices[].carta_porte.istmo.destination` | string | yes | Destination hub (UbicacionPoloDestino). (up to 2 characters) |
| `invoices[].carta_porte.reverse_logistics` | boolean |  | Road transport: true if it is reverse logistics, pickup or return. |
| `invoices[].carta_porte.origin` | object | yes | Origin location (Ubicacion TipoUbicacion Origen): sender, departure date and time and address. |
| `invoices[].carta_porte.origin.tax_id` | string | yes | Sender's RFC (RFCRemitenteDestinatario); XEXX010101000 if foreign. |
| `invoices[].carta_porte.origin.name` | string |  | Sender's name (NombreRemitenteDestinatario). (up to 254 characters) |
| `invoices[].carta_porte.origin.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].carta_porte.origin.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].carta_porte.origin.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].carta_porte.origin.date_time` | string | yes | Departure (origin) or arrival (destination) date and time, YYYY-MM-DDTHH:MM, local time. |
| `invoices[].carta_porte.origin.distance_km` | number |  | Distance traveled from the previous location, in km (DistanciaRecorrida). Road and rail. (greater than 0 and up to 99999) |
| `invoices[].carta_porte.origin.station` | object |  | Station, port or airport (TipoEstacion and NumEstacion from c_Estaciones). Only without road transport. |
| `invoices[].carta_porte.origin.station.type` | string |  | Station type (TipoEstacion): 01 origin, 02 intermediate, 03 final destination. (up to 2 characters) |
| `invoices[].carta_porte.origin.station.number` | string |  | Station, port or airport code (NumEstacion), c_Estaciones. (up to 12 characters) |
| `invoices[].carta_porte.origin.station.name` | string |  | Station name (NombreEstacion). (up to 50 characters) |
| `invoices[].carta_porte.origin.station.foreign` | boolean |  | true if the station is abroad (it goes without TipoEstacion). |
| `invoices[].carta_porte.origin.navigation` | `Altura`, `Cabotaje` |  | Sea: traffic type (NavegacionTrafico), Altura or Cabotaje. |
| `invoices[].carta_porte.origin.address` | object | yes | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `invoices[].carta_porte.origin.address.street` | string |  | Street (Calle). (up to 100 characters) |
| `invoices[].carta_porte.origin.address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].carta_porte.origin.address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].carta_porte.origin.address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `invoices[].carta_porte.origin.address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `invoices[].carta_porte.origin.address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `invoices[].carta_porte.origin.address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.origin.address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.origin.address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.destinations` | array of object | yes | Destination locations (TipoUbicacion Destino), in order: recipient, arrival, distance and address. (up to 20) |
| `invoices[].carta_porte.destinations[].tax_id` | string | yes | Recipient's RFC (RFCRemitenteDestinatario); XEXX010101000 if foreign. |
| `invoices[].carta_porte.destinations[].name` | string |  | Recipient's name (NombreRemitenteDestinatario). (up to 254 characters) |
| `invoices[].carta_porte.destinations[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].carta_porte.destinations[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].carta_porte.destinations[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].carta_porte.destinations[].date_time` | string | yes | Departure (origin) or arrival (destination) date and time, YYYY-MM-DDTHH:MM, local time. |
| `invoices[].carta_porte.destinations[].distance_km` | number |  | Distance traveled from the previous location, in km (DistanciaRecorrida). Road and rail. (greater than 0 and up to 99999) |
| `invoices[].carta_porte.destinations[].station` | object |  | Station, port or airport (TipoEstacion and NumEstacion from c_Estaciones). Only without road transport. |
| `invoices[].carta_porte.destinations[].station.type` | string |  | Station type (TipoEstacion): 01 origin, 02 intermediate, 03 final destination. (up to 2 characters) |
| `invoices[].carta_porte.destinations[].station.number` | string |  | Station, port or airport code (NumEstacion), c_Estaciones. (up to 12 characters) |
| `invoices[].carta_porte.destinations[].station.name` | string |  | Station name (NombreEstacion). (up to 50 characters) |
| `invoices[].carta_porte.destinations[].station.foreign` | boolean |  | true if the station is abroad (it goes without TipoEstacion). |
| `invoices[].carta_porte.destinations[].navigation` | `Altura`, `Cabotaje` |  | Sea: traffic type (NavegacionTrafico), Altura or Cabotaje. |
| `invoices[].carta_porte.destinations[].address` | object | yes | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `invoices[].carta_porte.destinations[].address.street` | string |  | Street (Calle). (up to 100 characters) |
| `invoices[].carta_porte.destinations[].address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].carta_porte.destinations[].address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].carta_porte.destinations[].address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `invoices[].carta_porte.destinations[].address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `invoices[].carta_porte.destinations[].address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `invoices[].carta_porte.destinations[].address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.destinations[].address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.destinations[].address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.goods` | array of object | yes | Goods (Mercancia) being transported. (up to 200) |
| `invoices[].carta_porte.goods[].product_key` | string | yes | Code of the goods transported (BienesTransp), c_ClaveProdServCP. |
| `invoices[].carta_porte.goods[].description` | string | yes | Description of the goods (Descripcion). (up to 1000 characters) |
| `invoices[].carta_porte.goods[].quantity` | number | yes | Quantity (Cantidad). (greater than 0 and up to 1000000000) |
| `invoices[].carta_porte.goods[].unit_key` | string | yes | Unit code (ClaveUnidad), c_ClaveUnidad. (up to 5 characters) |
| `invoices[].carta_porte.goods[].weight_kg` | number | yes | Weight in kilograms (PesoEnKg). (from 0.001 to 100000000) |
| `invoices[].carta_porte.goods[].dimensions` | string |  | Dimensions (Dimensiones), like 30/40/30cm or in plg. (up to 20 characters) |
| `invoices[].carta_porte.goods[].hazmat` | object |  | Hazardous material (MaterialPeligroso Sí): UN code and packaging. |
| `invoices[].carta_porte.goods[].hazmat.key` | string | yes | Hazardous material code (CveMaterialPeligroso), c_MaterialPeligroso (UN number). (up to 4 characters) |
| `invoices[].carta_porte.goods[].hazmat.packaging` | string | yes | Packaging type (Embalaje), c_TipoEmbalaje. (up to 4 characters) |
| `invoices[].carta_porte.goods[].hazmat.packaging_description` | string |  | Packaging description (DescripEmbalaje). (up to 100 characters) |
| `invoices[].carta_porte.goods[].cofepris` | object |  | The goods' COFEPRIS data: sector and what each one requires (medicines, precursors, psychotropics, toxic substances, pesticides). |
| `invoices[].carta_porte.goods[].cofepris.sector` | string | yes | COFEPRIS sector (SectorCOFEPRIS): 01 medicine, 02 precursors and dual-use chemicals, 03 psychotropics and narcotics, 04 toxic substances, 05 pesticides and fertilizers. (up to 2 characters) |
| `invoices[].carta_porte.goods[].cofepris.active_ingredient` | string |  | Active ingredient name (NombreIngredienteActivo). (up to 1000 characters) |
| `invoices[].carta_porte.goods[].cofepris.chemical_name` | string |  | Chemical name (NomQuimico). (up to 150 characters) |
| `invoices[].carta_porte.goods[].cofepris.generic_name` | string |  | Product's generic name (DenominacionGenericaProd). (up to 50 characters) |
| `invoices[].carta_porte.goods[].cofepris.brand_name` | string |  | Distinctive name or brand (DenominacionDistintivaProd). (up to 50 characters) |
| `invoices[].carta_porte.goods[].cofepris.manufacturer` | string |  | Manufacturer (Fabricante). (up to 240 characters) |
| `invoices[].carta_porte.goods[].cofepris.expiry` | string |  | Expiry date (FechaCaducidad), YYYY-MM-DD. (up to 10 characters) |
| `invoices[].carta_porte.goods[].cofepris.lot` | string |  | Medicine lot (LoteMedicamento). (up to 10 characters) |
| `invoices[].carta_porte.goods[].cofepris.form` | string |  | Pharmaceutical form (FormaFarmaceutica), c_FormaFarmaceutica. (up to 2 characters) |
| `invoices[].carta_porte.goods[].cofepris.conditions` | string |  | Special transport conditions (CondicionesEspTransp), c_CondicionesEspeciales. (up to 2 characters) |
| `invoices[].carta_porte.goods[].cofepris.sanitary_registry` | string |  | Sanitary registration or authorization folio (RegistroSanitarioFolioAutorizacion). (up to 15 characters) |
| `invoices[].carta_porte.goods[].cofepris.import_permit` | string |  | Import permit (PermisoImportacion). (up to 6 characters) |
| `invoices[].carta_porte.goods[].cofepris.vucem_folio` | string |  | VUCEM import folio (FolioImpoVUCEM). (up to 25 characters) |
| `invoices[].carta_porte.goods[].cofepris.cas` | string |  | The substance's CAS number (NumCAS). (up to 15 characters) |
| `invoices[].carta_porte.goods[].cofepris.importer` | string |  | Importing company's razón social (RazonSocialEmpImp). (up to 80 characters) |
| `invoices[].carta_porte.goods[].cofepris.pesticide_registry` | string |  | COFEPRIS pesticide sanitary registration (NumRegSanPlagCOFEPRIS). (up to 60 characters) |
| `invoices[].carta_porte.goods[].cofepris.manufacturer_data` | string |  | Manufacturer's details (DatosFabricante). (up to 600 characters) |
| `invoices[].carta_porte.goods[].cofepris.formulator_data` | string |  | Formulator's details (DatosFormulador). (up to 600 characters) |
| `invoices[].carta_porte.goods[].cofepris.maquilador_data` | string |  | Contract manufacturer's details (DatosMaquilador). (up to 600 characters) |
| `invoices[].carta_porte.goods[].cofepris.authorized_use` | string |  | Authorized use (UsoAutorizado). (up to 1000 characters) |
| `invoices[].carta_porte.goods[].value` | number |  | Value of the goods (ValorMercancia); required in air transport. (from 0 to 1000000000000000) |
| `invoices[].carta_porte.goods[].currency` | string |  | Currency of the goods' value (Moneda), c_Moneda. (3 characters) |
| `invoices[].carta_porte.goods[].tariff` | string |  | Tariff code (FraccionArancelaria), 10 digits. International transport. (up to 10 characters) |
| `invoices[].carta_porte.goods[].cce_uuid` | string |  | UUID of the CFDI with the foreign trade complement (UUIDComercioExt). (up to 36 characters) |
| `invoices[].carta_porte.goods[].material` | object |  | Material type (TipoMateria, c_TipoMateria) and its description if it is «otra». |
| `invoices[].carta_porte.goods[].material.type` | string | yes | Material type (TipoMateria), c_TipoMateria. (up to 2 characters) |
| `invoices[].carta_porte.goods[].material.description` | string |  | Material description (DescripcionMateria), with type 05 other. (up to 50 characters) |
| `invoices[].carta_porte.goods[].customs_docs` | array of object |  | Customs documentation (DocumentacionAduanera) for goods in international transport. (up to 20) |
| `invoices[].carta_porte.goods[].customs_docs[].type` | string | yes | Document type (TipoDocumento), c_DocumentoAduanero: 01 pedimento… (up to 2 characters) |
| `invoices[].carta_porte.goods[].customs_docs[].pedimento` | string |  | Pedimento number (NumPedimento), in the format «NN  NN  NNNN  NNNNNNN». Only with type 01. (up to 21 characters) |
| `invoices[].carta_porte.goods[].customs_docs[].doc_id` | string |  | Customs document identifier (IdentDocAduanero), with a type other than 01. (up to 150 characters) |
| `invoices[].carta_porte.goods[].customs_docs[].importer_tax_id` | string |  | Importer's RFC (RFCImpo), with a pedimento. (up to 13 characters) |
| `invoices[].carta_porte.goods[].guides` | array of object |  | Parcel delivery: waybills of the packages or pallets (GuiasIdentificacion). (up to 100) |
| `invoices[].carta_porte.goods[].guides[].number` | string | yes | Tracking number (NumeroGuiaIdentificacion). (up to 30 characters) |
| `invoices[].carta_porte.goods[].guides[].description` | string | yes | Description of the contents (DescripGuiaIdentificacion). (up to 1000 characters) |
| `invoices[].carta_porte.goods[].guides[].weight_kg` | number | yes | Weight in kilograms (PesoEnKg). (from 0 to 100000000) |
| `invoices[].carta_porte.goods[].quantities` | array of object |  | How much goes to each destination (CantidadTransporta), per destination. (up to 40) |
| `invoices[].carta_porte.goods[].quantities[].quantity` | number | yes | Quantity going to that destination. (greater than 0 and up to 1000000000) |
| `invoices[].carta_porte.goods[].quantities[].destination` | integer | yes | The destination, by its position in destinations (from 0). (from 0 to 19) |
| `invoices[].carta_porte.goods[].quantities[].mode` | `01`, `02`, `03`, `04` |  | Mode that quantity travels by (CvesTransporte), c_CveTransporte. |
| `invoices[].carta_porte.goods[].detail` | object |  | Sea: goods detail (DetalleMercancia): net kilos, tare and pieces. |
| `invoices[].carta_porte.goods[].detail.net_kg` | number | yes | Net weight in kg (PesoNeto). (from 0 to 100000000) |
| `invoices[].carta_porte.goods[].detail.tare_kg` | number | yes | Tare in kg (PesoTara). (from 0 to 100000000) |
| `invoices[].carta_porte.goods[].detail.pieces` | integer |  | Number of pieces (NumPiezas). (from 0 to 1000000000) |
| `invoices[].carta_porte.goods[].stcc` | string |  | Rail: STCC code (ClaveSTCC). (up to 7 characters) |
| `invoices[].carta_porte.vehicle` | object |  | Road transport (Autotransporte): vehicle, SCT permit, insurance and trailers. |
| `invoices[].carta_porte.vehicle.config` | string | yes | Vehicle configuration (ConfigVehicular), c_ConfigAutotransporte: C2, T3S2… (up to 10 characters) |
| `invoices[].carta_porte.vehicle.plate` | string | yes | Plate (PlacaVM), without dashes or spaces. (up to 10 characters) |
| `invoices[].carta_porte.vehicle.year` | integer | yes | Model year (AnioModeloVM). (from 0 to 2100) |
| `invoices[].carta_porte.vehicle.gross_weight` | number | yes | Gross vehicle weight in tons (PesoBrutoVehicular). (from 0 to 999) |
| `invoices[].carta_porte.vehicle.permit_type` | string | yes | SCT permit type (PermSCT), c_TipoPermiso. (up to 50 characters) |
| `invoices[].carta_porte.vehicle.permit_number` | string | yes | SCT permit number (NumPermisoSCT). (up to 50 characters) |
| `invoices[].carta_porte.vehicle.insurer` | string | yes | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `invoices[].carta_porte.vehicle.policy` | string | yes | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `invoices[].carta_porte.vehicle.env_insurer` | string |  | Environmental damage insurer (AseguraMedAmbiente); mandatory with hazardous material. (up to 50 characters) |
| `invoices[].carta_porte.vehicle.env_policy` | string |  | Environmental damage policy (PolizaMedAmbiente). (up to 30 characters) |
| `invoices[].carta_porte.vehicle.cargo_insurer` | string |  | Cargo insurer (AseguraCarga). (up to 50 characters) |
| `invoices[].carta_porte.vehicle.cargo_policy` | string |  | Cargo policy (PolizaCarga). (up to 30 characters) |
| `invoices[].carta_porte.vehicle.premium` | number |  | Insurance premium (PrimaSeguro). (from 0 to 1000000000000) |
| `invoices[].carta_porte.vehicle.trailers` | array of object |  | Trailers or semi-trailers (Remolque): type (c_SubTipoRem) and plate. (up to 2) |
| `invoices[].carta_porte.vehicle.trailers[].type` | string | yes | Trailer subtype (SubTipoRem), c_SubTipoRem. (up to 10 characters) |
| `invoices[].carta_porte.vehicle.trailers[].plate` | string | yes | Trailer plate (Placa). (up to 10 characters) |
| `invoices[].carta_porte.sea` | object |  | Sea transport (TransporteMaritimo): vessel, shipping agent and containers. |
| `invoices[].carta_porte.sea.permit_type` | string |  | SCT permit type (PermSCT), c_TipoPermiso. (up to 10 characters) |
| `invoices[].carta_porte.sea.permit_number` | string |  | SCT permit number (NumPermisoSCT). (up to 30 characters) |
| `invoices[].carta_porte.sea.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `invoices[].carta_porte.sea.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `invoices[].carta_porte.sea.vessel_type` | string | yes | Vessel type (TipoEmbarcacion), c_ConfigMaritima. (up to 4 characters) |
| `invoices[].carta_porte.sea.registration` | string | yes | Registration (Matricula). (up to 30 characters) |
| `invoices[].carta_porte.sea.imo` | string | yes | IMO number (NumeroOMI): IMO and 7 digits. (up to 10 characters) |
| `invoices[].carta_porte.sea.year` | integer |  | Vessel year (AnioEmbarcacion). (from 0 to 2100) |
| `invoices[].carta_porte.sea.vessel_name` | string |  | Vessel name (NombreEmbarc). (up to 50 characters) |
| `invoices[].carta_porte.sea.flag` | string | yes | Vessel nationality (NacionalidadEmbarc), c_Pais. (3 characters) |
| `invoices[].carta_porte.sea.gross_tonnage` | number | yes | Gross tonnage units (UnidadesDeArqBruto). (from 0 to 1000000000) |
| `invoices[].carta_porte.sea.cargo_type` | string | yes | Cargo type (TipoCarga), c_ClaveTipoCarga. (up to 4 characters) |
| `invoices[].carta_porte.sea.length` | number |  | Length in meters (Eslora). (from 0 to 100000) |
| `invoices[].carta_porte.sea.beam` | number |  | Beam in meters (Manga). (from 0 to 100000) |
| `invoices[].carta_porte.sea.draft` | number |  | Draft in meters (Calado). (from 0 to 100000) |
| `invoices[].carta_porte.sea.depth` | number |  | Depth in meters (Puntal). (from 0 to 100000) |
| `invoices[].carta_porte.sea.line` | string |  | Shipping line (LineaNaviera). (up to 50 characters) |
| `invoices[].carta_porte.sea.agent_name` | string | yes | Consignee shipping agent's name (NombreAgenteNaviero). (up to 100 characters) |
| `invoices[].carta_porte.sea.agent_authorization` | string | yes | Shipping agent authorization (NumAutorizacionNaviero), c_NumAutorizacionNaviero. (up to 20 characters) |
| `invoices[].carta_porte.sea.voyage` | string |  | Voyage number (NumViaje). (up to 30 characters) |
| `invoices[].carta_porte.sea.bill_of_lading` | string |  | Bill of lading number (NumConocEmbarc). (up to 30 characters) |
| `invoices[].carta_porte.sea.temp_permit` | string |  | Temporary navigation permit (PermisoTempNavegacion), for a foreign vessel. (up to 19 characters) |
| `invoices[].carta_porte.sea.containers` | array of object |  | Containers (Contenedor). (up to 100) |
| `invoices[].carta_porte.sea.containers[].type` | string | yes | Container type (TipoContenedor), c_ContenedorMaritimo or c_Contenedor for rail. (up to 6 characters) |
| `invoices[].carta_porte.sea.containers[].registration` | string |  | Registration (Matricula). (up to 15 characters) |
| `invoices[].carta_porte.sea.containers[].seal` | string |  | Seal number (NumPrecinto). (up to 20 characters) |
| `invoices[].carta_porte.sea.containers[].related_id_ccp` | string |  | Ferry: the IdCCP of the onboard road transport's Carta Porte (IdCCPRelacionado). (up to 36 characters) |
| `invoices[].carta_porte.sea.containers[].truck_plate` | string |  | Ferry: plate of the onboard vehicle (PlacaVMCCP). (up to 10 characters) |
| `invoices[].carta_porte.sea.containers[].certified_at` | string |  | Ferry: certification date of the vehicle's Carta Porte (FechaCertificacionCCP). (up to 19 characters) |
| `invoices[].carta_porte.sea.containers[].trailers` | array of object |  | Trailers or semi-trailers (Remolque): type (c_SubTipoRem) and plate. (up to 2) |
| `invoices[].carta_porte.sea.containers[].trailers[].type` | string | yes | Trailer subtype (SubTipoRem), c_SubTipoRem. (up to 10 characters) |
| `invoices[].carta_porte.sea.containers[].trailers[].plate` | string | yes | Trailer plate (Placa). (up to 10 characters) |
| `invoices[].carta_porte.air` | object |  | Air transport (TransporteAereo): permit, waybill and carrier. |
| `invoices[].carta_porte.air.permit_type` | string | yes | SCT permit type (PermSCT), c_TipoPermiso. (up to 10 characters) |
| `invoices[].carta_porte.air.permit_number` | string | yes | SCT permit number (NumPermisoSCT). (up to 50 characters) |
| `invoices[].carta_porte.air.aircraft` | string |  | Aircraft registration (MatriculaAeronave). (up to 11 characters) |
| `invoices[].carta_porte.air.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `invoices[].carta_porte.air.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `invoices[].carta_porte.air.waybill` | string | yes | Air waybill number (NumeroGuia), 12 to 15 characters. (up to 15 characters) |
| `invoices[].carta_porte.air.contract_place` | string |  | Place of contract (LugarContrato). (up to 120 characters) |
| `invoices[].carta_porte.air.carrier` | string | yes | Carrier code (CodigoTransportista), c_CodigoTransporteAereo. (up to 6 characters) |
| `invoices[].carta_porte.air.shipper` | object |  | Shipper (RFCEmbarcador or NumRegIdTribEmbarc and ResidenciaFiscalEmbarc, NombreEmbarcador). |
| `invoices[].carta_porte.air.shipper.tax_id` | string |  | Shipper's RFC (RFCEmbarcador). (up to 13 characters) |
| `invoices[].carta_porte.air.shipper.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].carta_porte.air.shipper.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].carta_porte.air.shipper.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].carta_porte.air.shipper.name` | string |  | Shipper's name (NombreEmbarcador). (up to 254 characters) |
| `invoices[].carta_porte.air.rate_charge` | number |  | Valuation charge (CargoPorTasacion). (from 0 to 1000000000000000) |
| `invoices[].carta_porte.rail` | object |  | Rail transport (TransporteFerroviario): service, traffic, rights of way and cars. |
| `invoices[].carta_porte.rail.service` | string | yes | Service type (TipoDeServicio), c_TipoDeServicio. (up to 4 characters) |
| `invoices[].carta_porte.rail.traffic` | string | yes | Traffic type (TipoDeTrafico), c_TipoDeTrafico. (up to 4 characters) |
| `invoices[].carta_porte.rail.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `invoices[].carta_porte.rail.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `invoices[].carta_porte.rail.rights` | array of object |  | Rights of way (DerechosDePaso): type and kilometers. (up to 50) |
| `invoices[].carta_porte.rail.rights[].type` | string | yes | Right-of-way type (TipoDerechoDePaso), c_DerechosDePaso. (up to 6 characters) |
| `invoices[].carta_porte.rail.rights[].km` | number | yes | Kilometers paid (KilometrajePagado). (from 0 to 100000) |
| `invoices[].carta_porte.rail.cars` | array of object | yes | Cars (Carro). (up to 200) |
| `invoices[].carta_porte.rail.cars[].type` | string | yes | Car type (TipoCarro), c_TipoCarro. (up to 4 characters) |
| `invoices[].carta_porte.rail.cars[].registration` | string | yes | Registration (Matricula). (up to 15 characters) |
| `invoices[].carta_porte.rail.cars[].guide` | string | yes | Car waybill (GuiaCarro). (up to 15 characters) |
| `invoices[].carta_porte.rail.cars[].net_tons` | number | yes | Car net tons (ToneladasNetasCarro). (from 0 to 1000000) |
| `invoices[].carta_porte.rail.cars[].containers` | array of object |  | Containers (Contenedor). (up to 10) |
| `invoices[].carta_porte.rail.cars[].containers[].type` | string | yes | Container type (TipoContenedor), c_ContenedorMaritimo or c_Contenedor for rail. (up to 4 characters) |
| `invoices[].carta_porte.rail.cars[].containers[].empty_kg` | number | yes | Empty container weight in kg (PesoContenedorVacio). (from 0 to 100000000) |
| `invoices[].carta_porte.rail.cars[].containers[].net_kg` | number | yes | Net weight in kg (PesoNeto). (from 0 to 100000000) |
| `invoices[].carta_porte.drivers` | array of object | yes | Operators (FiguraTransporte type 01): RFC, license and name. (up to 5) |
| `invoices[].carta_porte.drivers[].tax_id` | string or `""` | yes | Operator's RFC (RFCFigura); empty if foreign (with foreign). |
| `invoices[].carta_porte.drivers[].license` | string | yes | License number (NumLicencia). (up to 16 characters) |
| `invoices[].carta_porte.drivers[].name` | string | yes | Operator's name (NombreFigura). (up to 254 characters) |
| `invoices[].carta_porte.drivers[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].carta_porte.drivers[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].carta_porte.drivers[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].carta_porte.figures` | array of object |  | Other transport figures: 02 owner, 03 lessor, 04 notified party, 05 member of a coordinated group. (up to 10) |
| `invoices[].carta_porte.figures[].type` | `02`, `03`, `04`, `05` | yes | Figure type (TipoFigura): 02 owner, 03 lessor, 04 notified party, 05 member. |
| `invoices[].carta_porte.figures[].tax_id` | string |  | The figure's RFC (RFCFigura). |
| `invoices[].carta_porte.figures[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `invoices[].carta_porte.figures[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `invoices[].carta_porte.figures[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `invoices[].carta_porte.figures[].name` | string | yes | The figure's name (NombreFigura). (up to 254 characters) |
| `invoices[].carta_porte.figures[].parts` | array of string |  | Transport parts they own or lease (ParteTransporte), c_ParteTransporte. (up to 20) |
| `invoices[].carta_porte.figures[].address` | object |  | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `invoices[].carta_porte.figures[].address.street` | string |  | Street (Calle). (up to 100 characters) |
| `invoices[].carta_porte.figures[].address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].carta_porte.figures[].address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].carta_porte.figures[].address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `invoices[].carta_porte.figures[].address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `invoices[].carta_porte.figures[].address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `invoices[].carta_porte.figures[].address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.figures[].address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte.figures[].address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `invoices[].carta_porte_exemption` | `2.7.7.2.1`, `2.7.7.2.2`, `2.7.7.2.3` |  | Only on a delivery note (type T) without carta_porte: the RMF 2026 rule that allows it. 2.7.7.2.1 own goods on a local transfer (not medicines, hydrocarbons or goods for customs clearance); 2.7.7.2.2 parcel or courier delivery on the first or last mile, one line item per package with its tracking number in sku; 2.7.7.2.3 local towing or salvage truck, relating with related (05) the service's income invoice. Sending it declares that the transfer doesn't cross any stretch under federal jurisdiction. The line items go with unit_price 0 and taxability 01 (the default on a delivery note). |
| `invoices[].ine` | object |  | INE complement (electoral processes). |
| `invoices[].ine.process` | `Ordinario`, `Precampaña`, `Campaña` | yes | Process type (TipoProceso): Ordinario, Precampaña or Campaña. |
| `invoices[].ine.committee` | `Ejecutivo Nacional`, `Ejecutivo Estatal`, `Directivo Estatal` |  | Committee type (TipoComite), with the Ordinario process. |
| `invoices[].ine.accounting_id` | string |  | Accounting code (IdContabilidad), up to 6 digits. |
| `invoices[].ine.entities` | array of object |  | Entities (Entidad): state code, scope and accounting codes. (up to 64) |
| `invoices[].ine.entities[].key` | string | yes | Entity code (ClaveEntidad): the state's (JAL, QUE…), NAC (national) or the electoral district CR1 to CR5; these six don't go with Local scope. (3 characters) |
| `invoices[].ine.entities[].scope` | `Local`, `Federal` |  | Scope (Ambito): Local or Federal. |
| `invoices[].ine.entities[].accounting_ids` | array of string |  | Accounting codes (IdContabilidad). (up to 50) |
| `invoices[].leyendas` | array of object |  | Tax legends complement. (up to 10) |
| `invoices[].leyendas[].text` | string | yes | Text of the legend (textoLeyenda). (up to 1000 characters) |
| `invoices[].leyendas[].disposition` | string |  | Tax provision (disposicionFiscal), for example LISR. (up to 30 characters) |
| `invoices[].leyendas[].norm` | string |  | Rule or article (norma). (up to 100 characters) |
| `invoices[].donation` | object |  | Donee complement: a donation receipt. The issuer must be a donee (tax_system 603) with its official letter in donation_authorization (POST /v1/issuers/{id}). |
| `invoices[].donation.in_kind` | boolean |  | true if the donation is in kind (goods): it goes with payment form 12 (dación en pago) and one line item per type of good. |
| `invoices[].donation.deducted` | boolean |  | true if the donor had already deducted the goods they donate: the receipt says the donation isn't deductible. |
| `invoices[].local_taxes` | array of object |  | Local taxes (implocal complement): state transfers and withholdings. (up to 20) |
| `invoices[].local_taxes[].retention` | boolean | yes | true if it's a local withholding; false if it's a transfer. |
| `invoices[].local_taxes[].name` | string | yes | Name of the local tax (ImpLocTrasladado or ImpLocRetenido), like ISH. (up to 100 characters) |
| `invoices[].local_taxes[].rate` | number | yes | Rate in percent (TasadeTraslado or TasadeRetencion). (from 0 to 100) |
| `invoices[].local_taxes[].amount` | number | yes | Local tax amount. (from 0 to 1000000000000) |
| `invoices[].export` | `01`, `02`, `03`, `04` |  | Export (Exportacion), c_Exportacion: 01 not applicable (default), 02 definitive with code A1 (carries comercio_exterior), 03 temporary (without it), 04 definitive with a code other than A1 or without a sale (with or without comercio_exterior; with it, incoterm optional). |
| `invoices[].comercio_exterior` | object |  | Foreign trade complement 2.0. |
| `invoices[].comercio_exterior.motive` | `99`, `01`, `02`, `03`, `04`, `05` |  | Transfer reason (MotivoTraslado), c_MotivoTraslado, only on a delivery note: 01 goods invoiced earlier (relate the sales invoice in related), 02 relocation of own goods, 03 consignment, 04 for later sale, 05 third-party property (with owners), 99 other. |
| `invoices[].comercio_exterior.owners` | array of object |  | Owners of the goods if not the issuer (Propietario), with motive 05. (up to 10) |
| `invoices[].comercio_exterior.owners[].tax_id` | string | yes | Owner's tax registration number (NumRegIdTrib). (up to 40 characters) |
| `invoices[].comercio_exterior.owners[].country` | string | yes | Owner's country of residence (ResidenciaFiscal), c_Pais. (3 characters) |
| `invoices[].comercio_exterior.incoterm` | string |  | Incoterm (Incoterm), c_INCOTERM: EXW, FOB, CIF, DAP, DDP… (3 characters) |
| `invoices[].comercio_exterior.certificate` | string |  | Certificate of origin number (NumCertificadoOrigen). (up to 40 characters) |
| `invoices[].comercio_exterior.usd_rate` | number | yes | Exchange rate to dollars (TipoCambioUSD). (greater than 0 and up to 1000000) |
| `invoices[].comercio_exterior.issuer_curp` | string |  | CURP of the persona física issuer (Emisor Curp). (18 characters) |
| `invoices[].comercio_exterior.issuer_address` | object |  | Issuer's address (Emisor Domicilio): street and numbers; the rest comes from its postal code. |
| `invoices[].comercio_exterior.issuer_address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `invoices[].comercio_exterior.issuer_address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].comercio_exterior.issuer_address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].comercio_exterior.issuer_address.zip` | string |  | Issuer's postal code (CodigoPostal). |
| `invoices[].comercio_exterior.receiver_address` | object |  | Recipient's address abroad (Receptor Domicilio). |
| `invoices[].comercio_exterior.receiver_address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `invoices[].comercio_exterior.receiver_address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].comercio_exterior.receiver_address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].comercio_exterior.receiver_address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.receiver_address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.receiver_address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.receiver_address.state` | string |  | State (Estado), c_Estado for USA and CAN. (up to 30 characters) |
| `invoices[].comercio_exterior.receiver_address.country` | string | yes | Country (Pais), c_Pais. (3 characters) |
| `invoices[].comercio_exterior.receiver_address.zip` | string | yes | Postal code in its country (CodigoPostal). (up to 12 characters) |
| `invoices[].comercio_exterior.recipient` | object |  | Consignee, if not the recipient (Destinatario). |
| `invoices[].comercio_exterior.recipient.name` | string |  | Consignee's name (Nombre). (up to 300 characters) |
| `invoices[].comercio_exterior.recipient.tax_id` | string |  | Consignee's tax registration number (NumRegIdTrib). (up to 40 characters) |
| `invoices[].comercio_exterior.recipient.address` | object | yes | Consignee's address (Domicilio). |
| `invoices[].comercio_exterior.recipient.address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `invoices[].comercio_exterior.recipient.address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `invoices[].comercio_exterior.recipient.address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `invoices[].comercio_exterior.recipient.address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.recipient.address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.recipient.address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `invoices[].comercio_exterior.recipient.address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `invoices[].comercio_exterior.recipient.address.country` | string | yes | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `invoices[].comercio_exterior.recipient.address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `invoices[].comercio_exterior.goods` | array of object | yes | Goods (Mercancia), one per exported line item. (up to 200) |
| `invoices[].comercio_exterior.goods[].id` | string |  | Goods identification number (NoIdentificacion): its line item's sku. (up to 100 characters) |
| `invoices[].comercio_exterior.goods[].tariff` | string |  | Tariff code (FraccionArancelaria), 10 digits with the NICO, current in c_FraccionArancelaria (look it up in `GET /v1/sat_catalogs/customs_tariffs`); one that isn't current is rejected before stamping. |
| `invoices[].comercio_exterior.goods[].unit` | string |  | Customs unit (UnidadAduana), c_UnidadAduana; 99 for a service. With `tariff` it can be omitted: the tariff code's UMT from the SAT catalog is used (the SAT rejects another one with CCE161). |
| `invoices[].comercio_exterior.goods[].quantity` | number |  | Quantity in the customs unit (CantidadAduana). (greater than 0 and up to 100000000000000) |
| `invoices[].comercio_exterior.goods[].unit_value_usd` | number |  | Unit value in dollars (ValorUnitarioAduana). (from 0 to 10000000000000000) |
| `invoices[].comercio_exterior.notes` | string |  | Complement remarks (Observaciones). (up to 300 characters) |
| `invoices[].global` | object |  | Global invoice to the general public (InformacionGlobal): frequency, months and year. |
| `invoices[].global.periodicity` | string | yes | Frequency (Periodicidad), c_Periodicidad: 01 daily, 02 weekly, 03 biweekly, 04 monthly, 05 two-monthly. |
| `invoices[].global.months` | string | yes | Months (Meses), c_Meses: 01 to 12, or 13 to 18 for two-month periods. |
| `invoices[].global.year` | integer | yes | Year (Año): the invoice date's or up to five years earlier (CFDI40136). (from 2019 to 2100) |
| `invoices[].global.keep_concepts` | boolean |  | Only issuers with tax regime 603 (donees and associations): true keeps each line item's description, codes, unit and quantity instead of «Venta», 01010101, ACT. |
| `invoices[].use` | string |  | CFDI use (UsoCFDI), a c_UsoCFDI key. G03 by default, or S01 with regime 616. |
| `invoices[].payment_form` | string |  | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `invoices[].payment_method` | `PUE`, `PPD` |  | Payment method (MetodoPago): PUE (a single payment, the default) or PPD (in installments or deferred, collected with payment complements). |
| `invoices[].paid_later` | boolean |  | With PUE: true if it hasn't been paid yet («Por cobrar» in the app) even though it will be paid this month. |
| `invoices[].currency` | string |  | Currency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default. (3 characters) |
| `invoices[].series` | string |  | Series (Serie), up to 25 characters. Each series has its own folios. (up to 25 characters) |
| `invoices[].notes` | string |  | Remarks that appear on the PDF (they don't go into the XML). (up to 1000 characters) |
| `invoices[].payment_terms` | string |  | Payment terms (CondicionesDePago), up to 1,000 characters without «\|»: «Crédito a 30 días», «50 % anticipo». They go in the XML and the PDF; income and expense receipts only. They don't change when it is due (due_date uses the customer's credit days). (up to 1000 characters) |
| `invoices[].pdf_language` | `es`, `en`, `bi` |  | PDF language: es (default) or en. |
| `invoices[].addenda` | object |  | The recipient's addenda (Walmart, Soriana…), with its own fields. |
| `invoices[].related` | object |  | Related CFDIs (CfdiRelacionados): relation type from c_TipoRelacion and the UUIDs. |
| `invoices[].related.relationship` | string | yes | Relation type (TipoRelacion): 01 credit note, 03 return, 04 replacement, 07 advance payment… |
| `invoices[].related.uuids` | array of string | yes | Related tax folios. (up to 20) |
| `invoices[].exchange_rate` | number |  | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. (greater than 0 and up to 1000000) |
| `invoices[].folio` | integer |  | Folio (Folio). Fiscalisto assigns the series' next one; only send one if it must be that one. (from 1 to 2000000000) |
| `invoices[].continue_sequence` | boolean |  | With a chosen folio: true so the following ones continue from that number. |
| `invoices[].date` | string |  | Issue date (Fecha) if not now, YYYY-MM-DDTHH:MM:SS Mexico City time: up to 72 hours earlier. |
| `invoices[].send_email` | boolean |  | true to send the PDF and the XML by email when stamping, with Fiscalisto's design. Not sent by default. (default false) |
| `invoices[].email_cc` | string or null |  | CC emails, separated by commas. |
| `invoices[].metadata` | object |  | Your own data: up to 50 keys of 40 characters with text values of up to 500. They don't go into the CFDI; they come back in the object and in webhooks. |
| `invoices[].async` | boolean |  | Only in POST /v1/invoices. true: it answers 202 as soon as the invoice is saved with its folio (status processing) and stamps it after answering; invoice.stamped or invoice.failed say how it ended. On the other routes that receive an invoice it changes nothing. (default false) |
| `invoices[].reference` | string |  | Your identifier for this invoice (your order number), up to 100 characters. (up to 100 characters) |

Example:

```json
{
  "name": "Cuotas de octubre",
  "invoices": [
    {
      "reference": "depto-101",
      "customer": "cus_OufpKqnrvx9p1",
      "payment_form": "03",
      "items": [
        {
          "product": "prd_OufpKqnrvx9p1"
        }
      ]
    },
    {
      "reference": "depto-102",
      "customer": {
        "tax_id": "ICV060329BY0",
        "legal_name": "INMOBILIARIA CVA",
        "tax_system": "601",
        "zip": "33826",
        "email": "pagos@cva.example"
      },
      "payment_form": "03",
      "items": [
        {
          "description": "Cuota de mantenimiento",
          "product_key": "80131500",
          "unit_price": 1500
        }
      ]
    }
  ]
}
```

## With the TypeScript SDK

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

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

const invoiceBatch = await fiscalisto.invoiceBatches.create({
  name: "Cuotas de octubre",
  invoices: [
    {
      reference: "depto-101",
      customer: "cus_OufpKqnrvx9p1",
      payment_form: "03",
      items: [{ product: "prd_OufpKqnrvx9p1" }],
    },
    {
      reference: "depto-102",
      customer: {
        tax_id: "ICV060329BY0",
        legal_name: "INMOBILIARIA CVA",
        tax_system: "601",
        zip: "33826",
        email: "pagos@cva.example",
      },
      payment_form: "03",
      items: [
        {
          description: "Cuota de mantenimiento",
          product_key: "80131500",
          unit_price: 1500,
        },
      ],
    },
  ],
}, { idempotencyKey: "lote-cuotas-2026-10" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

invoice_batch = fiscalisto.invoice_batches.create({
    "name": "Cuotas de octubre",
    "invoices": [
        {
            "reference": "depto-101",
            "customer": "cus_OufpKqnrvx9p1",
            "payment_form": "03",
            "items": [{"product": "prd_OufpKqnrvx9p1"}],
        },
        {
            "reference": "depto-102",
            "customer": {
                "tax_id": "ICV060329BY0",
                "legal_name": "INMOBILIARIA CVA",
                "tax_system": "601",
                "zip": "33826",
                "email": "pagos@cva.example",
            },
            "payment_form": "03",
            "items": [
                {
                    "description": "Cuota de mantenimiento",
                    "product_key": "80131500",
                    "unit_price": 1500,
                },
            ],
        },
    ],
}, idempotency_key="lote-cuotas-2026-10")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$invoiceBatch = $fiscalisto->invoiceBatches->create([
    'name' => 'Cuotas de octubre',
    'invoices' => [
        [
            'reference' => 'depto-101',
            'customer' => 'cus_OufpKqnrvx9p1',
            'payment_form' => '03',
            'items' => [['product' => 'prd_OufpKqnrvx9p1']],
        ],
        [
            'reference' => 'depto-102',
            'customer' => [
                'tax_id' => 'ICV060329BY0',
                'legal_name' => 'INMOBILIARIA CVA',
                'tax_system' => '601',
                'zip' => '33826',
                'email' => 'pagos@cva.example',
            ],
            'payment_form' => '03',
            'items' => [
                [
                    'description' => 'Cuota de mantenimiento',
                    'product_key' => '80131500',
                    'unit_price' => 1500,
                ],
            ],
        ],
    ],
], ['idempotency_key' => 'lote-cuotas-2026-10']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var invoiceBatch = await fiscalisto.InvoiceBatches.CreateAsync(new CreateInvoiceBatchParams
{
    Name = "Cuotas de octubre",
    Invoices = new()
    {
        new()
        {
            Reference = "depto-101",
            Customer = "cus_OufpKqnrvx9p1",
            PaymentForm = "03",
            Items = new()
            {
                new() { Product = "prd_OufpKqnrvx9p1" },
            },
        },
        new()
        {
            Reference = "depto-102",
            Customer = new InvoiceCreateCustomer
            {
                TaxId = "ICV060329BY0",
                LegalName = "INMOBILIARIA CVA",
                TaxSystem = "601",
                Zip = "33826",
                Email = "pagos@cva.example",
            },
            PaymentForm = "03",
            Items = new()
            {
                new()
                {
                    Description = "Cuota de mantenimiento",
                    ProductKey = "80131500",
                    UnitPrice = 1500,
                },
            },
        },
    },
}, new RequestOptions { IdempotencyKey = "lote-cuotas-2026-10" });
```

## 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()

	invoiceBatch, err := client.InvoiceBatches.Create(ctx, &fiscalisto.CreateInvoiceBatchParams{
		Name: fiscalisto.String("Cuotas de octubre"),
		Invoices: []fiscalisto.CreateInvoiceBatchParamsInvoice{
			{
				Reference:   fiscalisto.String("depto-101"),
				Customer:    fiscalisto.IDOf[fiscalisto.InvoiceCreateCustomer]("cus_OufpKqnrvx9p1"),
				PaymentForm: fiscalisto.String("03"),
				Items: []fiscalisto.InvoiceCreateItem{
					{Product: fiscalisto.String("prd_OufpKqnrvx9p1")},
				},
			},
			{
				Reference: fiscalisto.String("depto-102"),
				Customer: fiscalisto.ObjectOf(fiscalisto.InvoiceCreateCustomer{
					TaxID:     "ICV060329BY0",
					LegalName: "INMOBILIARIA CVA",
					TaxSystem: "601",
					Zip:       "33826",
					Email:     fiscalisto.String("pagos@cva.example"),
				}),
				PaymentForm: fiscalisto.String("03"),
				Items: []fiscalisto.InvoiceCreateItem{
					{
						Description: fiscalisto.String("Cuota de mantenimiento"),
						ProductKey:  fiscalisto.String("80131500"),
						UnitPrice:   fiscalisto.Float64(1500),
					},
				},
			},
		},
	}, fiscalisto.WithIdempotencyKey("lote-cuotas-2026-10"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(invoiceBatch.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreateInvoiceBatchParams;
import com.fiscalisto.model.CreateInvoiceBatchParamsInvoice;
import com.fiscalisto.model.InvoiceCreateCustomer;
import com.fiscalisto.model.InvoiceCreateItem;
import java.util.List;

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

var invoiceBatch = fiscalisto.invoiceBatches().create(new CreateInvoiceBatchParams()
        .setName("Cuotas de octubre")
        .setInvoices(List.of(
                new CreateInvoiceBatchParamsInvoice()
                        .setReference("depto-101")
                        .setCustomer("cus_OufpKqnrvx9p1")
                        .setPaymentForm("03")
                        .setItems(List.of(
                                new InvoiceCreateItem()
                                        .setProduct("prd_OufpKqnrvx9p1")
                        )),
                new CreateInvoiceBatchParamsInvoice()
                        .setReference("depto-102")
                        .setCustomer(new InvoiceCreateCustomer()
                                .setTaxId("ICV060329BY0")
                                .setLegalName("INMOBILIARIA CVA")
                                .setTaxSystem("601")
                                .setZip("33826")
                                .setEmail("pagos@cva.example"))
                        .setPaymentForm("03")
                        .setItems(List.of(
                                new InvoiceCreateItem()
                                        .setDescription("Cuota de mantenimiento")
                                        .setProductKey("80131500")
                                        .setUnitPrice(1500)
                        ))
        )), RequestOptions.idempotencyKey("lote-cuotas-2026-10"));
System.out.println(invoiceBatch.getId());
```

## Response 202

OK. Repeating the request with the same Idempotency-Key answers the same, with the same status and the idempotent-replayed: true header.

A `InvoiceBatch` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"invoice_batch"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer (iss_…). |
| `name` | string | yes | The batch's name, for you. |
| `status` | `processing`, `completed` | yes | processing: stamping. completed: none are left to stamp. |
| `total` | integer | yes | How many invoices the batch has. (from -9007199254740991 to 9007199254740991) |
| `stamped` | integer | yes | How many were stamped. (from -9007199254740991 to 9007199254740991) |
| `failed` | integer | yes | How many weren't stamped (they keep their reason). (from -9007199254740991 to 9007199254740991) |
| `processing` | integer |  | How many are still processing. (from -9007199254740991 to 9007199254740991) |
| `created_at` | string (date-time) or null | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |
| `completed_at` | string (date-time) or null | yes | When it finished. |
| `invoices` | array of object |  | Each invoice in the batch (not included in lists or events). |
| `invoices[].index` | integer | yes | Its position in invoices, from 0. (from -9007199254740991 to 9007199254740991) |
| `invoices[].reference` | string or null | yes | Your identifier for this invoice (your order number), up to 100 characters. |
| `invoices[].status` | `processing`, `valid`, `failed` | yes | processing, valid (stamped) or failed (not stamped; see error). |
| `invoices[].invoice` | string or null | yes | The stamped invoice (inv_…). |
| `invoices[].uuid` | string or null | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `invoices[].total` | number | yes | Total in the receipt's currency (Total). |
| `invoices[].error` | string or null | yes | Why it wasn't stamped. |
| `invoices[].warnings` | array of string |  | Only in the POST /v1/invoice_batches response: this invoice's warnings before stamping it, the same ones POST /v1/invoices would give. It is stamped as sent. |

```json
{
  "id": "bat_OufpKqnrvx9p4hMdcoapAo5aaGJEme7mXj",
  "object": "invoice_batch",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "name": "Cuotas de octubre",
  "status": "processing",
  "total": 2,
  "stamped": 0,
  "failed": 0,
  "created_at": "2026-10-24T10:15:42-06:00",
  "completed_at": null,
  "processing": 2,
  "invoices": [
    {
      "index": 0,
      "reference": "depto-101",
      "status": "processing",
      "invoice": null,
      "uuid": null,
      "total": 1740,
      "error": null
    },
    {
      "index": 1,
      "reference": "depto-102",
      "status": "processing",
      "invoice": null,
      "uuid": null,
      "total": 1740,
      "error": null
    }
  ]
}
```

## Errors

- `batch_invalid` (422): An invoice of the batch doesn't pass the checks; `param` says which (invoices.3.items.0.unit_price). None of the batch was stamped.
- `daily_limit` (429): You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.
- `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.
- `idempotency_key_missing` (400): Stamping requires the Idempotency-Key header (8 to 255 characters, a new one per document), so a retry never stamps twice.
- `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.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

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