Skip to main content

Electronic Invoice Processing API

Transform Excel billing data into structured JSON electronic invoices for Venezuelan tax compliance. Automate invoice generation with multi-currency support and IVA calculations.

Quick Start

Get your invoice processing API up and running in minutes

1

Install dependencies

Clone the repository and install required Python packages:
git clone https://github.com/luysmarlcm/api-python-1.git
cd api-python-1
pip install -r requirements.txt
fastapi==0.100.0
pandas==2.0.3
openpyxl==3.1.2
python-multipart==0.0.6
num2words==0.5.11
uvicorn==0.23.2
numpy==1.25.2
2

Start the API server

Launch the FastAPI server using Uvicorn:
uvicorn main:app --host 0.0.0.0 --port 8000
The API will be available at http://localhost:8000. CORS is pre-configured to accept requests from any origin.
3

Upload an Excel file

Send a POST request with your billing Excel file:
cURL
curl -X POST http://localhost:8000/process_excel \
  -F "[email protected]" \
  -o invoices.zip
Your Excel file should contain columns: Correlativo, Fecha Emision, Fecha Vencimiento, DNI/C.I./C.C./IFE, Cliente, Dirección, Telefono, Correo, Plan, Total, Tasa, bolivares, and payment information.
4

Extract generated invoices

The API returns a ZIP file containing JSON invoices organized by date and batch:
unzip invoices.zip
cd FAC-20260304/
ls
# Output: J408185431-20260304-001/
#         ├── 0006746.json
#         ├── 0006747.json
#         └── ...
Each JSON file follows the Venezuelan electronic invoice schema with complete tax calculations, buyer information, and line items.

Key Features

Everything you need for Venezuelan electronic invoice processing

Excel to JSON transformation

Automatically transform Excel billing data into structured electronic invoice JSON following Venezuelan tax authority schemas

Multi-currency support

Process invoices in both USD and BSD (Bolívares) with automatic exchange rate calculations and dual-currency totals

Tax compliance

Built-in IVA (16%) calculation, tax breakdowns, and complete compliance with Venezuelan electronic billing requirements

Batch processing

Handle large Excel files with automatic batching (100 invoices per batch) and organized ZIP output structure

Amount conversion

Convert numeric amounts to Spanish words for both currencies, meeting legal invoice text requirements

Docker support

Pre-configured Docker setup for easy deployment with docker-compose orchestration and volume persistence

Ready to process invoices?

Follow the quickstart guide to set up your local environment and generate your first batch of electronic invoices in minutes.

Get Started