API reference

Exports

Exports of the company’s invoicing data, such as the SAF-T (PT) file. 1 operation.

Export SAF-T PT

GET /exports/saft-pt

Generates SAF-T PT for the entire connected company, including sales documents and customer data. Supply month=YYYY-MM for a full calendar month, or startDate and endDate for an inclusive period; do not combine the two formats. Requires saft_pt.export or an API key, and export permission. invoicing.read and invoicing.read_all do not grant this access. Download the XML from the returned URL before it expires.

Authentication: an API key (x-api-key) or an OAuth access token.

Parameters

NameInTypeDescription
monthquerystringFull calendar month (YYYY-MM), from the first through the last day, inclusive. An alternative to startDate and endDate; do not combine the two formats.
startDatequerystring (date)First day of the period, inclusive (YYYY-MM-DD). Required together with endDate when month is omitted.
endDatequerystring (date)Last day of the period, inclusive (YYYY-MM-DD). Required together with startDate when month is omitted; must be on or after startDate.
curl 'https://api.fiz.co/exports/saft-pt?month=2026-10' \
  --header "x-api-key: $FIZ_API_KEY"
import { Fiz } from '@fiz-co/sdk';

const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.exports.saftPt({
  month: '2026-10',
});
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.exports.saft_pt({
    "month": "2026-10",
})
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->exports->saftPt([
    'month' => '2026-10',
]);

Response 200

Temporary download link for the SAF-T PT file

FieldTypeDescription
urlstringTemporary URL for downloading the SAF-T PT XML. Do not share this URL.
createdAtstring (date-time) · can be nullFile creation time, when supplied by the exporter
ttlnumber · can be nullURL lifetime supplied by the exporter, in seconds

Errors

  • 400 Invalid period or company invoicing is not configured
  • 401 Missing or invalid authentication
  • 403 No permission to export SAF-T PT for the entire company
  • 429 The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
  • 502 The exporter returned no download link

Errors

Errors share one shape: statusCode, message, code and error, with the request id in the X-Request-Id header.

All resources