46 lines
1.8 KiB
Markdown
46 lines
1.8 KiB
Markdown
# Python QR Codes API
|
|
|
|
Python API for adding QR Codes in invoices
|
|
|
|
# Deployment
|
|
|
|
docker-compose up
|
|
|
|
The signed invoices are saved at the invoices folder, their filenames are inv_code.pdf
|
|
|
|
# Example Calls
|
|
## Sign with QR
|
|
<ins>HTTP-POST</ins>
|
|
|
|
https://qrcode.argideli.com/signinvoice/?company=Quertex&inv_type=tpy&in_all=0&preset=inv2&inv_series=2&inv_num=5578
|
|
|
|
The call body is a multipart form-data, containing the actual invoice. Upon signing with the QR code the new file is returned
|
|
|
|
<ins>Parameters</ins>
|
|
|
|
* file: UploadFile = File(...) = File to be signed
|
|
* preset: str = Invoice Preset Selection
|
|
* code_content: str = QR code Data, if empty the code data that will be put inside the QR will be the url to download the invoice
|
|
* company: str = Invoice type, english letters (ex. Quertex), NOTE: The Upper Case letter WILL be carried to the filename
|
|
* inv_type: str = Invoice type, english letters (ex. tpy)
|
|
* inv_series: str = Invoice series, english letters (ex. 2 or B1)
|
|
* inv_num: str = Invoice Number
|
|
* in_all: bool = Sign all pages (0|1)
|
|
|
|
|
|
## Get invoice
|
|
<ins>HTTP-GET</ins>
|
|
|
|
https://qrcode.argideli.com/getinvoice/?inv_code=Quertex_tpy_2_5578
|
|
|
|
Get a saved invoice by calling an HTTP/GET and providing the filename as the inv_code parameter, alternatevily the identifier can be reconstructed from the company, inv_type, inv_series, inv_num parameters
|
|
|
|
<ins>Parameters</ins>
|
|
|
|
* inv_code: str = Invoice identifier/Filename without .pdf extention
|
|
* company: str = Invoice type, english letters (ex. Quertex), NOTE: The Upper Case letter WILL be carried to the filename
|
|
* inv_type: str = Invoice type, english letters (ex. tpy)
|
|
* inv_series: str = Invoice series, english letters (ex. 2 or B1)
|
|
* inv_num: str = Invoice Number
|
|
* search_file: bool = Get file by reconstructing the filename from (company, inv_type, inv_series, inv_num), (0|1)
|