The POST /api/v1/transactions/auditlog endpoint enables the addition of an event entry for the respective fiscal client, which is important for the traceability of transactions and system-internal processes and is legally required in some countries.
Attention: Events must be sent at the correct time and in the correct order. As with documents, events (audits) must not be sent as a batch (package)!
Result
A successful call of the endpoint (200)
- adds an audit log entry into the technical event journal.
Usage
This endpoint is used to log events that the cash register system is obliged to record.
EventCode Mapping
Information regarding the mapping of RetailForce event codes to event codes in specific countries can be found in the "Technical event log / Event log" overview.
Requirements
- The fiscal client must be initialized and operational.
Transmission process
The request must be sent as a JSON object:
{ "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "uniqueClientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "logEntryType": "100", "message": "string", "documentGuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "user": { "id": "string", "caption": "string", "firstName": "string", "lastName": "string", "taxNumber": "string",
"dateOfEntry": "2022-01-01T00:00:00+01:00" }, "amount": 0, "identifier": "string", "recordDateTime": "2023-12-07T10:14:19.859+01:00", "signature": "string" }
Form fields
Information in "Type" column:
- M ... mandatory / requird
- M* ... mandatory / requird in certain countries or under certain conditions
- R ... recommended
- O... optional
Element | Type | Description | |
recordId | unique identifier of the entry. | ||
uniqueClientId | M | The uniqueClientId of the cash register (from the RetailForce system), where the audit log entry belongs. | |
logEntryType | The type of the audit log entry. | ||
message | Message of the audit entry. | ||
documentGuid | A possible connection to a document of the audit log entry | ||
user | The user (if applicable) of the audit log entry. | ||
{...} | |||
amount | Total amount of the document | ||
identifier | A possible identifier for the audit log entry. | ||
recordDateTime | M | the recordDateTime of the audit log entry. | |
signature |
Example:
// Saving the transaction { "recordId": "58b55595-2796-4d65-b90f-4b2e1549db44", "uniqueClientId": "58b55595-2796-4d65-b90f-4b2e1549db44", "LogEntryType": 100, "Message": "DocumentTypeSales", "documentGuid": "215c2395-ab4a-4132-858d-86459a9e883a", "user": { "id": "1234", "caption": "Max Thomas" }, "amount": 12.5, "identifier": "0000001", "recordDateTime": "2023-12-07T10:15:45+01:00" } // Closing the cash drawer { "recordDateTime": "2023-12-07T10:15:46+01:00", "UniqueClientId": "58b55595-2796-4d65-b90f-4b2e1549db44", "LogEntryType": 201, "Message": "DrawerClose", "DocumentGuid": null, "user": { "id": "1234", "caption": "Max Thomas" } }
Response
Possible responses:
Code | Description |
---|---|
200 | OK |
202 | Record was a duplicate |
422 | AuditLog parameter is null or signature of entry was set. |
Comments
0 comments
Please sign in to leave a comment.