File & Url/Webhook output
Currently two target types are supported: File and URL.
Output Configuration
The output configuration is defined in the output section of the configuration file. And the output items are defined in the outputitems section.
You can add as many output items as you need.
Output Items generic configuration
The name field specifies the name of the output item. The format field specifies the output format. The config field specifies the output configuration.
Name of the output item
The name of the output item is used to identify the output item in the output file.
- File: Indicates a file output item.
- URL: Indicates a URL output item.
Format of the output item
The format of the output item is used to specify the output format. Currently, the following formats are supported:
- TEXT
- JSON
- XML
File Target
To configure a file target, add a named File entry to your configuration file under the output/outputitems section:
- name: File
format: JSON
config:
file_name: <time>-<doccode>-<issuer>
file_path: ./Output File Naming
The naming of the output file is based on the template specified in the file_name field. The following placeholders are available:
<time>: The current date and time in the formatYYYY-MM-DD_HH-MM-SS.<doccode>: The document code.<docnum>: The document number.<issuer>: The issuer code.<name_first>: The first name of the holder.<name_last>: The last name of the holder.
Output Folder
The file_path field specifies the folder where the output file will be saved. If the folder does not exist, it will be created automatically.
URL Target
To configure a URL target, add a named URL entry to your configuration file under the output/outputitems section:
- name: URL # sample url output item
format: JSON # TEXT, JSON, XML
config:
url: https://localhost # url to post data toTarget URL
The url field specifies the URL to which the output data will be posted.