TF Fiscal

SPED Filing

POST/api/sped/efd

Generate SPED EFD

Generates the SPED EFD ICMS/IPI (Digital Tax Bookkeeping) file for the given period, from the company's self-issued invoices (NF-e model 55) in the production environment — outbound and inbound (e.g., returns, tpNF=0), including canceled ones (record C100 with COD_SIT=02, per the Guia Prático). Using the status and tipo parameters select what goes into the file: issued/canceled/all and inbound/outbound/all. It builds blocks 0/B/C/D/E/G/H/K/1/9, the ICMS assessment (E110/E116 — debits from outbound transactions × credits from inbound transactions), the participants and the accountant (record 0100, filled automatically from the company's accountant registration, when present). The file is generated in ISO-8859-1, uploaded to storage, and the response returns the download link in arquivo_url.

Required headers

tokenstringstringCompany token
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body — parameters

start_date*stringstringStart of the period, in dd/MM/yyyy or dd/MM/yyyy HH:mm:ss format.
end_date*stringstringEnd of the period (same format).
statusstringstringOptional.
tipostringstringOptional.
limitnumbernumberOptional.
cod_verstringstringOptional.
perfilstringstringOptional.
ativstringstringOptional.

 * Required field.

Examples

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/sped/efd" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json