Sending requests
Base URL and form field
You need to send the requests to the same URL every time: https://www.szamlazz.hu/szamla/. Számla Agent decides which function to perform using the name of the form field containing the XML file in the HTTPS request. The following table contains the field names for each function.
| Function | Form field name |
|---|---|
| Generate invoice | action-xmlagentxmlfile |
| Reverse invoice | action-szamla_agent_st |
| Register credit entry | action-szamla_agent_kifiz |
| Query document (PDF) | action-szamla_agent_pdf |
| Query document (XML) | action-szamla_agent_xml |
| Delete pro forma invoice | action-szamla_agent_dijbekero_torlese |
| Create receipt | action-szamla_agent_nyugta_create |
| Reverse receipt | action-szamla_agent_nyugta_storno |
| Query receipt | action-szamla_agent_nyugta_get |
| Send receipt | action-szamla_agent_nyugta_send |
| Query taxpayer | action-szamla_agent_taxpayer |
Requirements
Each request is sent as an HTTPS POST to Számlázz.hu, with an XML file containing the controlling parameters and data required for the given operation. Make sure to handle session cookies.
The request and response structure for each operation is documented on its own page:
- Generate invoice
- Reverse invoice
- Register credit entry
- Query document (PDF)
- Query document (XML)
- Delete pro-forma invoice
- Create receipt
- Reverse receipt
- Query receipt
- Send receipt
- Query taxpayer
One XML per document
Each XML file contains the information of a single invoice or receipt only. You cannot include details of multiple invoices (or receipts) in one XML file.
XML validation and misspelled tags
Each incoming XML is processed according to the XSD of the given operation (for invoice generation: xmlszamla.xsd).
XML element names are case-sensitive: for example <simpleitems> is not the same as <simpleItems>. A request containing a mistyped tag may fail with error code 57 (XML beolvasási hiba.), or the document may be created without the setting in the mistyped tag being applied. Always validate your XML against the XSD before sending, and check the generated document when testing your integration on a test account. See Error handling & error codes.
Testing
During the testing phase, a rate limit applies in the testing environment (maximum 500 invoices per 10 minutes). See Error handling & error codes for the limit and how to use the test account (can be turned on and off by the user).
Multiple websites (invoice prefix)
If you use Számla Agent across multiple webshops and want to separate documents by webshop, configure a separate invoice prefix (szamlaszamElotag) for each of them.
Next steps
- Session cookies: understand how to handle session cookies in your requests
- Error handling: handle failures and understand error codes
- Create invoice: generate your first invoice