Skip to main content

Examples for API Usage

The API contains numerous pre-prepared examples that you can use to create or query your existing documents.

The table below lists the examples included in the package, categorized:

Function NameSzamlaAgent MethodExample File Path
creating a standard invoicegenerateInvoice./examples/document/invoice/create_invoice_with_default_data.php
creating a custom invoice with specific datagenerateInvoice./examples/document/invoice/create_invoice_with_custom_data.php
creating an invoice with a waybillgenerateInvoice./examples/document/invoice/create_invoice_with_waybill.php
creating an invoice with a file attachmentgenerateInvoice./examples/document/invoice/create_invoice_with_attachment.php
creating an invoice with data eraser codegenerateInvoice./examples/document/invoice/create_invoice_with_data_eraser_code.php
creating a pro forma invoicegenerateProforma./examples/document/create_proforma.php
deleting a pro forma invoicedeleteProforma./examples/document/delete_proforma.php
creating a delivery notegenerateDeliveryNote./examples/document/create_delivery_note.php
creating a prepayment invoicegeneratePrePaymentInvoice./examples/document/invoice/create_prepayment_invoice.php
creating a final invoice based on order numbergenerateFinalInvoice./examples/document/invoice/create_final_invoice_by_ordernumber.php
creating a final invoice based on invoice numbergenerateFinalInvoice./examples/document/invoice/create_final_invoice_by_invoicenumber.php
creating a corrective invoicegenerateCorrectiveInvoice./examples/document/invoice/create_corrective_invoice.php
creating a reverse invoicegenerateReverseInvoice./examples/document/invoice/create_reverse_invoice.php
querying invoice datagetInvoiceData./examples/document/invoice/get_invoice_data.php
querying invoice in PDF formatgetInvoicePdf./examples/document/invoice/get_invoice_pdf.php
recording invoice paymentspayInvoice./examples/document/invoice/pay_invoice.php
checking invoice by external IDgetInvoicePdf./examples/document/invoice/check_invoice_by_external_id.php
Function NameSzamlaAgent MethodExample File Path
creating a receiptgenerateReceipt./examples/document/receipt/create_receipt_with_default_data.php
creating a custom receipt with specific datagenerateReceipt./examples/document/receipt/create_receipt_with_custom_data.php
creating a custom receipt with data eraser codegenerateReceipt./examples/document/receipt/create_receipt_with_data_deletion_code.php
creating a reverse receiptgenerateReverseReceipt./examples/document/receipt/create_reverse_receipt.php
querying receipt datagetReceiptData./examples/document/receipt/get_receipt_data.php
querying receipt in PDF formatgetReceiptPdf./examples/document/receipt/get_receipt_pdf.php
sending a receiptsendReceipt./examples/document/receipt/send_receipt.php
Function NameSzamlaAgent MethodExample File Path
querying taxpayer datagetTaxPayer./examples/get_taxpayer.php