Skip to main content

Export

SAF-T Export

The Fiscal Authority requires an export in the SAF-T format. It includes base data, transactions and events. The export can be triggered in the efsta portal and on the local EFR installation on page “Kontroll”.

REST Implementation

For export use e.g.

GET /control/export?from=2022-01-01&till=2022-12-31

Optional query parameters for /control/export:

&target=...

Specify a directory path where the export .xml shall be stored. Else a .zip containing the export file will be sent in response body.

SAF-T Events

Fiscal law requires recording of special “events” that are included in the export. Some events are recorded automatically by EFR, some are recorded additionally on special transactions, others must be sent as audit-entry:

<Audit Code="DRAWER_OPEN" Dsc="Drawer open" TL="001" TT="1" Opr="1" OprN="Operator
name" />
{
"Audit": {
"Code": "DRAWER_OPEN",
"Dsc": "Drawer open",
"TL": "001",
"TT": "1",
"Opr": "1",
"OprN": "Operator name"
}
}

The correct predefined event ID is mapped by Audit.Code, e.g. DRAWER_OPEN maps to 13005.

Predefined EventIDDescriptionCodeAuto
13001POS startPOS_STARTOn EFR startup
13002POS stopPOS_STOP
13003Opr loginOn NFS=“LOGIN“
13004Opr logoutOn NFS=“LOGOUT“
13005Cash drawer openDRAWER_OPEN
13006Cash drawer closeDRAWER_CLOSE
13007Software updateUPDATE
13008X-ReportOn NFS=“X“
13009Z-ReportOn NFS=“Z“
13010Suspend receiptSUSPEND_RECEIPT
13011Resume receiptRESUME_RECEIPT
13012Receipt printedRECEIPT_PRINTED
13013Return itemsOn negative items
13014Print duplicateOn NFS=“DUP“
13015Provisional receiptOn NFS=“PROVISIONAL“ or DT=”PROVISIONAL”
13016Delivery receiptOn NFS=“DELIVERY“ or DT=”DELIVERY”
13017Training receiptOn NFS=“TRAINING“
13018ReportREPORT
13019Pay outOn NFS=“PAY
13020ExportEXPORTOn /control/export
13021Price changePRICE_CHANGE
13022Price lookupPRICE_LOOKUP
13023Training OnTRAINING_ON
13024Training OffTRAINING_OFF
13025Disk fullMEM_FULL
13026Emergency mode OnEMERGENCY_ON
13027Emergency mode OffEMERGENCY_OFF
13028Void receiptOn ESR.Void=“1“ and ESR.T <0
13029Steb receiptSTEB_RECEIPT
13030Receipt not printedRECEIPT_NOT_PRINTED
13999OtherOTHER