RPAfelApi
📖 API Usage Guide - Complete guide on how to use this API from other projects
🔧 cURL Examples - Complete collection of cURL commands for all API endpoints
📝 Credit Notes, Debit Notes & Void Examples - Examples for generating credit notes, debit notes, and voiding invoices
logic
https://cat.desa.sat.gob.gt/xsd/alfa/
xsd GT_Documento-0.1.2.xsd xmldsig-core-schema.xsd /c /out:../Models /namespace:GT_Documento
logic
https://cat.desa.sat.gob.gt/xsd/alfa/
ngrok http http://localhost:5000 --host-header="localhost:5000" --hostname=rpapos02.ngrok.io
Docker
build image
docker build -t fel-api RPAfelApi
list images
docker images
run image on terminal
docker container run -i -t -p 8080:8080 -e ASPNETCORE_ENVIRONMENT=Production fel-api
docker container run -i -t -p 8080:8080 -e ASPNETCORE_ENVIRONMENT=Development fel-api
run image and free terminal
docker run -d -p 8080:8080 fel-api
list container running
docker container ls
stop container
docker stop <containerId>
Cloud run
gcloud builds submit --config cloudbuild.yaml --projectId barto-dev
gcloud builds submit --config cloudbuild_stage.yaml
api/fel/generateCertificateToSign *POST
graph TB
Request-->checkDTEJSON{dteJSON == null};
checkDTEJSON-->|YES|400;
checkDTEJSON-->|NO|checkUUID{rpaUUID == null};
checkUUID-->|YES|400;
checkUUID-->|NO|ifInfile{gface==infile};
ifInfile-->|YES|getFromDB{search rpaUUID in storage}
getFromDB-->|FOUND|200
getFromDB-->|NOT FOUND|FirmarFactura
ifInfile-->|NO|FirmarFactura{Certificate document}
FirmarFactura-->|200 success|saveDB
saveDB-->publishTopic
publishTopic-->200
FirmarFactura-->|406 already signed|FirmarFacturaGet{Get certificate from GFACE}
FirmarFactura-->|other, exception|logError[save error on db]
FirmarFacturaGet-->|success|saveDB
FirmarFacturaGet-->|error, not found|logError
logError-->400
first step
cd RPAfelAPi dotnet restore dotnet restore