This article provides an overview of API functions of the RetailForce Fiscal Service (status: release 1.6.3). The required parameters of each endpoint can be viewed via the Swagger (e.g. http://localhost:7678/swagger/index.html) after installing the Fiscal Middleware.
The API is divided into different areas, which are used for different purposes and products.
Information in "Type" column:
- O ... optional
- M ... mandatory / requird
- M* ... mandatory / requird in certain countries or under certain conditions
- R ... recommended
The headings refer to the respective section in Swagger. For some endpoints you will find links to further information.
Archive
Short description: Archiving function of already fiscalized data.
Endpoints in this section are used to transfer data to the Secure RetailForce Archive.
Endpoint | Type | Description |
POST /api/v1/archive/de/{clientId} | O | This method is used to upload several files to the cloud archive. |
GET /api/v1/archive/de/{clientId} | O | Used to download previously archived data (files) from the cloud archive. |
Backup
Short description: Archiving function for arbitrary POS data
Endpoints in this section are to upload arbitrary data to the Cloud Archive – for service/product: “POS Archive”. Backup-License required in order to use this service.
Endpoint | Type | Description |
POST /api/v1/backup/{clientId} | O | This method backups a given folder to the cloud archive. |
POST /api/v1/backup/{clientId}/restore | O | Restores a previously archived (backup) file to a specific location. |
GET /api/v1/backup/{clientId}/restore | O | Returns a download URL, which can be used to download the requested backup-file from the cloud archive. |
Closing
Short description: Closing functions for cash registers.
This section provides various administrative functions for the accounting of a cash register. For more information on end-of-day closing entries, see the article: Daily closing of the cash register,
Endpoint | Type | Description |
POST /api/v1/closing/{clientId}/book/ openingStock |
O |
Books the opening stock for a cash register closing statement. Books just a pay-in, does not resettle the cash stock. Alternative: As an alternative the cash register can also book a document: documentType [11] = PayIn. |
PUT /api/v1/closing/{clientId}/book/ cashDifference |
O |
Books a cash difference to the fiscalisation system. Alternative: As an alternative the cash register can also book a document with BusinessTransactionType [91] = CashDifference. |
PUT /api/v1/closing/{clientId}/book/ cashLift |
O |
Books a money transfer from cash register system to bank (or any other destination). |
GET /api/v1/closing/{clientId}/ actualStock |
O |
Returns the actual stock of payments of a specific client. This is calculated on the basis of the documents transmitted (in addition to sales and returns receipts, deposits and withdrawals, etc.). |
POST /api/v1/closing/{clientId}/ cashpointCheck |
O |
Checks the actual stock of the payments for this cash register and returns a list of payments with difference (or an empty list if there's no difference). |
POST /api/v1/closing/{clientId}/ cashpointClose |
O |
Closes the actual day with a closing statement. Closing is done based on the documents sent to the client since the last closing. The cash register system does not receive closing statement in return! |
GET /api/v1/closing/{clientId}/ endofdayDocument |
O |
Returns the end of day document for the actual day. The returned document must be stored (storeDocument > documentType 99) |
GET /api/v1/closing/{clientId}/ lastClosing |
O |
Returns date and time of the last closing of a specific client (terminal) |
GET /api/v1/closing/{clientId}/ closingNecessary |
O |
Returns information on whether or not a daily closing is to be made at a particular terminal. (Depending on RetailForce.Fiscalisation.Implementation. |
Information
Short Description: used to query special information
Endpoint | Type | Description |
GET /api/v1/information/version | O | Returns the actual version (SW) of the software (fiscal middleware). |
GET /api/v1/information/version/{clientId} | O | Returns the version of the country module of the given client. |
GET /api/v1/information/countryProperties | O | Returns the fiscalCountryProperties for the requested country. |
GET /api/v1/information/client/{clientId}/ countryProperties |
O | Returns the fiscalCountryProperties for the given client. |
GET /api/v1/information/client/{clientId}/ uniqueCashRegisterId |
O | Returns the unique cash register id (storenumber/terminalnumber). |
GET /api/v1/information/client/{clientId}/ status |
O | Returns the status of the requested fiscal client. |
GET /api/v1/information/client/{clientId}/ accessLicenses |
O | Returns a list of access licenses for the requested client. |
GET /api/v1/information/client/{clientId}/ licenses |
O | Returns the license claim for the requested client. |
GET /api/v1/information/client/{clientId}/ getVatIdentification |
R | Returns the appropriate vat identification for the requested percentage and date/time. |
GET /api/v1/information/client/{clientId}/ documentMandatoryFields/{typeName} |
O | Returns the mandatory fields for type given by typeName for the given country implementation. |
POST /api/v1/information/client/{clientId}/ storeErrorDocumentsToDisk |
R | If set to true any error document will be stored in the fiscal client directory. |
GET /api/v1/information/client/{clientId}/ storeErrorDocumentsToDisk |
R | Returns if the option RetailForce.Fiscalisation.TrustedFiscalModule. StoreErrorDocumentsToDisk is enabled. |
GET /api/v1/information/performance/ {clientId} |
O | Returns all performance counter id's for the given client |
DELETE /api/v1/information/performance/ {clientId} |
O | Resets all average data for the given client. |
GET /api/v1/information/performance {clientId}/{performanceCounterId} |
O | Returns the average data of the requested performance counter id. |
DELETE /api/v1/information/performance/ {clientId}/{performanceCounterId} |
O | Resets average data for the given client and the given performance counter. |
PUT /api/v1/information/performance/ {clientId}/file |
O | Enables or disabled performance file tracing. Performance file tracing is disabled by default. |
GET /api/v1/information/progress/ {clientId} |
O | Returns all progress information labels for the given client. |
GET /api/v1/information/progress/{clientId}/ {label} |
O | Returns the progress information for the given client and label. |
Management
Short Description: Management functions, commissioning, and decommissioning
Endpoint | Type | Description |
PUT /api/v1/management/clients | O/M |
Creates a new client in the configuration store. Configuration object must be prepared by POS-System. Configuration of a client is required for operation. Use either this endpoint, or:
|
POST /api/v1/management/clients | O |
Updates a client configuration created by the cash register system in the configuration store. |
GET /api/v1/management/clients | O |
Returns all clients listed in the configuration store. Can also be used when using cloud configuration. |
PUT /api/v1/management/clients/ byCloud |
O/M |
Creates a new client with a configuration prepared in the cloud / or loads an existing client. Configuration of a client is required for operation. Use either:
|
PUT /api/v1/management/clients/ byCloud/id |
O |
Creates a client loading the configuration data from the cloud. Alternative: alternative endpoint to PUT /api/v1/management/clients and PUT /api/v1/management/clients/byCloud. |
PUT /api/v1/management/clients/ byCloud/{clientId} |
R |
Updates the client configuration by getting the client configuration from cloud. Is used, when the configuration prepared in the cloud has been updated an should be downloaded anew by the fiscal client (update). |
POST /api/v1/management/clients/ withCloud |
O/M |
Creates a new client at the fiscal module management and adds this client to the cloud configuration. Client is created in the local configuration store and configuration object is then uploaded to cloud system. Note: The distributor must be set in the client data and the distributor must be allowed to create new clients. |
POST /api/v1/management/cloud/ connect |
M* |
Established cloud connection of the specific client and loads the trusted fiscal module into cache. Required for systems using cloud functions. Necessary after each restart of the POS-system. |
POST /api/v1/management/cloud/ updateLicense |
O |
Updates the current license key in fiscal client configuration (also on disk). Required, if licenses in cloud configuration have been changed. |
HEAD /api/v1/management/cloud/queue | R |
Method to start or stop cloud queue processing (for all clients). Stop command stops processing after finishing the actual upload. Start starts queue processing immediately. If cloud queue processing is stopped, you have to restart it unless the service is restarted (than cloud processing is activated again). |
GET /api/v1/management/clients/ {clientId} |
O |
Returns the client configuration of a specific client. |
DELETE /api/v1/management/clients/ {clientId} |
O |
Deletes a specific client Attention: use with caution! |
GET /api/v1/management/clients/id | O |
Returns the unique client id for the requested parameters. Different parameters can be used to request the uniqueClientId. |
GET /api/v1/management/clients/ licenseConsumerId |
O |
Returns the license consumer id for the given company identification. Only licenseConsumerId's which are already stored in the config store are returned. |
GET /api/v1/management/clients/ validate |
O |
Validates the given client information to fulfill necessary country-specific configuration. Is used to validate a configuration created by the cash register system before using /api/v1/management/clients. Validation of cloud configuration is provided in the cloud system. |
POST /api/v1/management/clients/ initialize |
M |
Initializes fiscalisation unit (and possible hardware, and possible declaration to financial authorities). Initialization is done via start receipt (initial receipt) which can be either queried using endpoint GET /api/v1/transactions/document/ |
POST /api/v1/management/clients/ migrate/{clientId} |
O |
Migrates a client from different fiscalization provider. Is used when switching form a different fiscal middleware provider to RetailForce Please note supported systems. |
POST /api/v1/management/clients/ migrate/{clientId}/file |
O |
Migrates a client from different fiscalization provider and performs a file import. Please note supported systems! |
POST /api/v1/management/clients/ decommission |
R |
Decommission of fiscal client (and possible hardware, and possible declaration to financial authorities). |
PUT /api/v1/management/clients/ {clientId}/supportPackage |
R |
Uploads a support package (log-files) to the cloud for the given client. This endpoint is necessary in order to use “Upload support package” function in cloud system. |
GET /api/v1/management/clients/ recovery/{clientId}/backup |
R |
Backups a client to the given filename (zip-file backup). If cloud upload is in use, cloud queue processing will be stopped and started (and cloud queue will be reinitialized). Attention: Please note if the client is not removed that cloud queue process will resume after backup. If any files have not been before backup, they are part of the backup too and will be possibly uploaded twice in case the client is restored. |
POST /api/v1/management/clients/ recovery/restore |
R |
Restores a client (with all data) from the given backup zip-file. |
POST /api/v1/management/clients/ recovery/restoreByCloud |
R |
Creates a new client with configuration from the cloud / or loads an existing client. |
POST /api/v1/management/clients/ recovery/restoreByCloud/id |
O |
Creates a new client with configuration from the cloud / or loads an existing client. |
POST /api/v1/management/clients/ {clientId}/globalShortId | O |
Generates a new, or returns an existing, globally unique ID for the respective client. In addition, the issuing of the retailForceReceiptId is activated for the respective client. |
POST /api/v1/management/clients/ {clientId}/certificate |
O/M |
Stores an external certificate to the fiscal module certificate store. Required for systems NOT using RetailForce Cloud functions in fiscal countries where software certificates are used in the context of fiscalisation (Slovenia, Croatia, Spain,…) |
GET /api/v1/management/clients/ {clientId}/licenses/accessLicense |
O |
Returns whether the requested client has the requested access license. |
GET /api/v1/management/clients/ {clientId}/licenses/license |
O |
Returns whether the requested client has the requested license. |
ManagementController_Austria
Short Description: Management functions for Austrian fiscalization.
Endpoint | Type | Description |
POST /api/v1/management/austria/ {clientId}/aes |
O |
Creates an AES user key for this client and returns it. AES key will also be stored to client configuration. Note: AES user key will be created automatically by fiscal client. Endpoint only necessary if AES key should be created manually. |
GET /api/v1/management/austria/ {clientId}/aes |
O |
Returns the aes key for the given client. |
GET /api/v1/management/austria/ {clientId}/dep |
O/M |
Exports all receipt lines of local Data Collection Log (DEP §7 RKSV) store data. Required for offline systems (systems NOT using cloud archiving of fiscal data). |
GET /api/v1/management/austria/ {clientId}/dep131 |
O |
Exports all data requested for DEP131 (DEP §131 BAO) protocol out of local stored data. |
GET /api/v1/management/austria/ {clientId}/dep/startReceipt |
R |
Returns the start receipt for this client. Cash register system needs to be able to provide initial receipt (start receipt) on request during a fiscal audit, if POS system did not store initial receipt, it can be requested using this endpoint. |
GET /api/v1/management/austria/ {clientId}/dep/monthReceipts |
R |
Returns all month receipts in the requested date frame. Cash register system needs to be able to provide monthly receipts on request during a fiscal audit, if POS system did not store these documents, they can be requested using this endpoint. |
GET /api/v1/management/austria/ {clientId}/fon/certificate |
O |
Returns all signature devices and if they are activated at FinanzOnline (FON) or not. |
POST /api/v1/management/austria/ {clientId}/fon/certificate |
O |
Registers the configured signature device at FON (if one is configured) or the signature device identified with certificateSerial. Note: If RetailForce Cloud Services are use, certificates are automatically registered in FinanzOnline portal (FON) (à credentials for cash register webservice user necessary!); endpoint only necessary if registration should be done manually. |
DELETE /api/v1/management/austria/ {clientId}/fon/certificate |
O |
Unregister the configured signature device at fon (if one is configured) or the signature device identified with certificateSerial. Attention: use with caution! |
GET /api/v1/management/austria/ {clientId}/fon/document |
R |
Validates the last signed document in dep at FinanzOnline (FON). |
GET /api/v1/management/austria/ {clientId}/fon/document/{depDocument} |
R |
Validates the given dep document (qr code) at FON. |
GET /api/v1/management/austria/ {clientId}/fon/cashregister |
O |
Returns whether the cash register of the actual client is activated at FON. Required for offline systems. |
POST /api/v1/management/austria/ {clientId}/fon/cashregister |
O |
Register of cash register system at FON for the actual client. Required for offline systems. |
DELETE /api/v1/management/austria/ {clientId}/fon/cashregister |
O |
Unregister cash register at fon for the actual client. Required for offline systems. Attention: use with caution! |
ManagementController_Bulgaria
Short Description: Management functions for Bulgarian fiscalization.
Endpoint | Type | Description |
POST /api/v1/management/bulgaria/ {clientId}/commands/closing |
M |
Sends closing command (Z) to the fiscal printer. |
POST /api/v1/management/bulgaria/ {clientId}/commands/synchronizeTime |
M |
Sends time synchronize command (L) to the fiscal printer. |
GET /api/v1/management/bulgaria/ {clientId}/reports/klen | R |
This function can be used to generate a so-called KLEN report. (from v1.8.3) |
GET /api/v1/management/bulgaria/ {clientId}/reports/zreport | R |
This function is used to print
(from v1.8.3) |
GET /api/v1/management/bulgaria/ {clientId}/reports/block | R |
This function is used to print out a so-called BLOCK report. (from v1.8.3) |
ManagementController_Denmark
Kurzbeschreibung: Managementfunktionen für die Dänische Fiskalisierung.
Endpoint | Type | Description |
GET /api/v1/management/denmark/ {clientId}/saft |
M |
Exports denmark SAF-T format to the given stream. |
ManagementController_France
Short Description: Management functions for French fiscalization.
Endpoint | Type | Description |
GET /api/v1/management/france/ eventlog/{clientId} |
M |
Returns all audit log entries requested by date. |
GET /api/v1/management/france/ archive/{clientId} |
M |
Returns the local stored archives for closing. |
POST /api/v1/management/france/ archive/{clientId}/verify |
M |
Method to verify the french archive. |
ManagementController_Germany
Short Description: Management functions for German fiscalization.
Endpoint | Type | Description |
GET /api/v1/management/germany/tse | R |
Returns an array of attached local tse devices and their status. |
POST /api/v1/management/germany/ tse/{tseSerial}/selftest |
R |
Runs a synchronous self test for the given cash register on the tse (cash register is optional). |
PUT /api/v1/management/germany/ {clientId}/tse/connectTest |
R |
Does a test connection to the given TSE. |
GET /api/v1/management/germany/ {clientId}/tse/listClients |
O |
Returns all clients listed on the tse of the given client. |
GET /api/v1/management/germany/ {clientId}/tse/status |
R |
Returns the status of the tse. If no fiscal module is found à status RetailForce.Fiscalisation.Implementation. |
PUT /api/v1/management/germany/ {clientId}/tse/updateTime |
M |
Updates the time on the tse to the actual computer time. |
GET /api/v1/management/germany/ {clientId}/tse/tar |
O |
Exports the tar files from the primary tse. Required for offline systems. |
GET /api/v1/management/germany/ {clientId}/taxonomy |
O |
Exports taxonomy (DSFinV-K export) and returns it as a download file (zip file format). Required for offline systems. |
GET /api/v1/management/germany/ {clientId}/tse/listTransactions |
R |
Returns all active (started) transactions on the tse. Recommended to track open transactions (all started transactions need to be stored or cancelled). |
DELETE /api/v1/management/germany/ {clientId}/tse/listTransactions | O |
Cancels active (started) transactions on the tse. |
GET /api/v1/management/germany/ {clientId}/tse/openOfflineSignatures/count |
O |
Returns the number of offline transactions (= transactions which have not been sent to TSE due to and offline TSE – broken unavailable). |
GET /api/v1/management/germany/ {clientId}/tse/openOfflineSignatures |
O |
Returns all open offline signatures stored for the actual TSE. |
PUT /api/v1/management/germany/ {clientId}/tse/openOfflineSignatures |
O |
Process open offline signatures. |
PUT /api/v1/management/germany/ {clientId}/tse/replace |
R |
Replaces a current TSE for the given client with a new one (for instance if old TSE is damaged or certificate has expired). |
POST /api/v1/management/germany/ {clientId}/tse/selftest |
R |
Runs a synchronous self test for the given cash register on the TSE (cash register is optional). |
POST /api/v1/management/germany/ {clientId}/tse/updateFirmware |
R |
Updates the firmware at the swissbit hardware TSE device. |
ManagementController_Spain
Short Description: Management functions for Spanish fiscalization.
Endpoint | Type | Description |
GET /api/v1/management/spain/ {clientId}/ticketBai |
R |
Returns the stored ticketBai files (sent files, answer files, error files) as zip file. |
GET /api/v1/management/spain/ {clientId}/ticketBai/{documentNumber} |
R |
Returns the stored ticketBai files for requested document number (sent files, answer files, error files) as zip file. |
Receipts
Short Description: used to send digital receipts to the RetailForce cloud via the Middleware.
Endpoints in this section are used to send digital receipt documents to the cloud system (Digital Receipt licenses required in order to use this service!).
Endpoint | Type | Description |
POST /api/v1/receipts/{clientId} | O/M |
Uploads a digital receipt file to the cloud system. Alternative: Use either this or the alternative endpoint within this section to send digital receipts data. |
POST /api/v1/receipts/ {clientId}/{documentGuid} |
O/M |
Uploads a digital file to the cloud system. Using metadata of fiscalisation. Alternative: Use either this or the alternative endpoint within this section to send digital receipts data. |
Transactions
Short Description: used to send documents to the middleware in the context of fiscalisation.
Endpoint | Type | Description |
PUT /api/v1/transactions/createDocument | M |
Creates a document at fiscalisation unit. This method does not create a document itself it just starts the process for instance on the TSE. |
POST /api/v1/transactions/storeDocument | M |
Stores a document to the fiscalisation unit. |
POST /api/v1/transactions/cancelDocument | M |
Cancels a document on the fiscalisation unit. |
PUT /api/v1/transactions/reprintDocument/ {clientId}/{documentGuid} |
M* |
Method to store reprint count of a document using the stored document (reference: documentGuid). Alternative: alternatively use PUT /api/v1/transactions/reprintDocument |
PUT /api/v1/transactions/ reprintDocument |
M* |
Method to store the reprint count of a document sending the document again. The user of the transferred document must be the reprinting user (not the user of the original document). Alternative: alternatively use PUT /api/v1/transactions/reprintDocument/ |
POST /api/v1/transactions/ revertDocument |
R |
Reverts a document (turns all values negative). |
POST /api/v1/transactions/ validateDocument |
O |
Validates the document and returns all validation errors (and empty list if there's no validation error). |
POST /api/v1/transactions/ validateDocumentString |
O |
Send document json to service for document validation. |
GET /api/v1/transactions/document/ {clientId}/start |
R |
Returns a start document for the given client. Start document is used to initialize the client as well as the fiscal unit (/api/v1/management/clients/initialize). |
POST /api/v1/transactions/display/{clientId} | M* |
Display text on fiscal customer display. Only supported in countries which uses fiscal customer display. In other countries this call does not do anything (but can be called). |
PUT /api/v1/transactions/printer/ {clientId}/openDrawer |
M* |
Opens a drawer if drawer is attached to fiscal printer. |
GET /api/v1/transactions/getQrCodeBase64 | O |
Returns qr code data as base 64 encoded string from data. |
POST /api/v1/transactions/auditlog | M* |
Adds an audit log to the fiscal client. |
GET /api/v1/transactions/auditlog/{clientId} | M* |
Returns all audit records queried by fromDate/tillDate. |
GET /api/v1/transactions/document/ {clientId}/{documentGuid} |
R |
Returns the requested document if stored in the internal storage. |
HEAD /api/v1/transactions/document/ {clientId}/{documentGuid} |
O |
Returns whether the requested document exists in the internal document store. |
GET /api/v1/transactions/document/ {clientId}/id/{documentId} |
O |
Returns the requested document if stored in the internal storage. |
GET /api/v1/transactions/document/ {clientId}/id/{documentId} |
O |
Returns whether the requested document exists in the internal document store. |
GET /api/v1/transactions/document/ {clientId}/last |
O |
Returns the last stored document from document store. |
GET /api/v1/transactions/document/ {clientId}/fid/{fiscalDocumentNr} |
O |
Returns the requested document if stored in the internal storage. |
GET /api/v1/transactions/document/ {clientId}/{documentGuid}/response |
R |
Returns the requested document response if stored in the internal storage. |
GET /api/v1/transactions/document/ {clientId}/id/{documentId}/response |
O |
Returns the requested document response if stored in the internal storage. |
GET /api/v1/transactions/document/ {clientId}/fid/{fiscalDocumentNr}/response |
O |
Returns the requested document if stored in the internal storage. |
Comments
0 comments
Please sign in to leave a comment.