Module endpoint.ZUGFeRD
ZUGFeRD - CASYMIR REST API Standard Endpunkt ZUGFeRD
    
    
    - 
    
    Methods
    
- 
    
    Usage:OPTIONS,POST  
    - 
    
    POST-Request-Field-Definition
    
- 
     ZUGFeRD verarbeitet die mitgelieferte PDF-Datei und optionale XML-Datei
 gemäss Operation:
 *'Extract' Extraktion der eingebettete XML aus einer ZUGFeRD PDF-Datei
  *'Combine' Einbettung der XML-Datei in die PDF-Datei
 Fields:
        - Operation
            string
         -- 'Extract' or 'Combine'
        
- PDF
            string
         -- Base64 encoded PDF input file
        
- XML
            string
         -- Base64 encoded XML input file
         (optional)
        
- Verbose
            boolean
         -- enable verbose output to casy.log
         (optional)
        
- Debug
            boolean
         -- do not remove workfiles in /home/kommerz/log/tmp
         (optional)
        
 
- 
    
    POST-Extract-Usage
    
- 
    
    Usage:POST /www/zugferd
{
  "Operation": "Extract",
  "PDF":"JVBERi0xLjQNCiWhs8XXDQoxIDA..."
  "Verbose": false,
  "Debug": false,
} 
- 
    
    POST-Combine-Usage
    
- 
    
    Usage:POST /www/zugferd
{
  "Operation": "Combine",
  "PDF":"BERi0xLjQKJbe+raoKMSAwIG9iag...",
  "XML":"PD94bWwgdmVyc2lvbj0iMS4wIiBl..."
  "Verbose": false,
  "Debug": false,
} 
- 
    
    POST-Response-Field-Definition
    
- 
     Die Ausgabe ist eine PDF-Datei oder eine JSON Fehlermeldung.
    
- 
    
    POST-PDF-Response
    
- 
    
    Usage:POST /www/zugferd
HTTP/1.1 200 OK
Content-Length: 131632
Content-Type: application/pdf
Body binary data  
- 
    
    POST-Error-Response
    
- 
    
    Usage:POST /www/zugferd
HTTP/1.1 400 Bad Request
Content-Length: 268
Content-Type: application/json; charset=iso-8859-1
{
   "error_description": "PDF output file not found",
   "error": "endpoint",
   "info":    {
      "filename": "/home/kommerz/log/tmp/lua_ajuYpA.out.pdf",
      "subprocess_output": ["zf:\tError: Mustang JAR not installed: /home/kommerz/r1/StartUp/local/zugferd/Mustang-CLI-2.12.0.jar"]
   }
} 
    - 
    
    ZUGFeRD (DB, EndUrl, Pattern, Methode, UserName, QueryStr, Bodytable)
    
- 
    Endpunkt Handler.
    
    Parameters:
        - DB
            UserData
         -- Datenbank Verbindung
        
- EndUrl
            string
         -- Enthält die Ausgelesene URI aus der Datenbank
        
- Pattern
            string
         -- Enthält den Patter Teil der URI else nil
        
- Methode
            string
         -- HTTP Methode
        
- UserName
            string
         -- Benutzer der Angemeldet wurde
        
- QueryStr
            string
         -- Orginal String ohne Hex Zeichen
        
- Bodytable
            table
         -- Request Body
        
 Returns:
           table
        retBody