curl --request POST \
--url https://api.openfiskal.com/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>' \
--data '
{
"type": "dsfinvk",
"from": "2026-03-01T00:00:00.000Z",
"to": "2026-03-31T23:59:59.000Z",
"register_id": "reg_01HABC"
}
'import requests
url = "https://api.openfiskal.com/v1/exports"
payload = {
"type": "dsfinvk",
"from": "2026-03-01T00:00:00.000Z",
"to": "2026-03-31T23:59:59.000Z",
"register_id": "reg_01HABC"
}
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'dsfinvk',
from: '2026-03-01T00:00:00.000Z',
to: '2026-03-31T23:59:59.000Z',
register_id: 'reg_01HABC'
})
};
fetch('https://api.openfiskal.com/v1/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openfiskal.com/v1/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'dsfinvk',
'from' => '2026-03-01T00:00:00.000Z',
'to' => '2026-03-31T23:59:59.000Z',
'register_id' => 'reg_01HABC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/exports"
payload := strings.NewReader("{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openfiskal.com/v1/exports")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "dsfinvk",
"status": "pending",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"register_id": "<string>",
"download_url": "<string>",
"error": {
"message": "<string>",
"details": {}
},
"completed_at": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "The request body is malformed.",
"retryable": false
}{
"code": "unauthorized",
"message": "Authentication failed.",
"retryable": false
}{
"code": "forbidden",
"message": "The authenticated caller cannot access this resource.",
"retryable": false
}{
"code": "not_found",
"message": "The requested resource does not exist.",
"retryable": false
}{
"code": "regime_validation_failed",
"message": "The payload violates regime-specific validation rules.",
"retryable": false
}Trigger an export
Enqueues an asynchronous export job and returns immediately with 202 Accepted and status: pending. Poll GET /exports/{exportId} until status is completed (then download_url is set) or failed.
curl --request POST \
--url https://api.openfiskal.com/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>' \
--data '
{
"type": "dsfinvk",
"from": "2026-03-01T00:00:00.000Z",
"to": "2026-03-31T23:59:59.000Z",
"register_id": "reg_01HABC"
}
'import requests
url = "https://api.openfiskal.com/v1/exports"
payload = {
"type": "dsfinvk",
"from": "2026-03-01T00:00:00.000Z",
"to": "2026-03-31T23:59:59.000Z",
"register_id": "reg_01HABC"
}
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'dsfinvk',
from: '2026-03-01T00:00:00.000Z',
to: '2026-03-31T23:59:59.000Z',
register_id: 'reg_01HABC'
})
};
fetch('https://api.openfiskal.com/v1/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openfiskal.com/v1/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'dsfinvk',
'from' => '2026-03-01T00:00:00.000Z',
'to' => '2026-03-31T23:59:59.000Z',
'register_id' => 'reg_01HABC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/exports"
payload := strings.NewReader("{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openfiskal.com/v1/exports")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"dsfinvk\",\n \"from\": \"2026-03-01T00:00:00.000Z\",\n \"to\": \"2026-03-31T23:59:59.000Z\",\n \"register_id\": \"reg_01HABC\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "dsfinvk",
"status": "pending",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"register_id": "<string>",
"download_url": "<string>",
"error": {
"message": "<string>",
"details": {}
},
"completed_at": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "The request body is malformed.",
"retryable": false
}{
"code": "unauthorized",
"message": "Authentication failed.",
"retryable": false
}{
"code": "forbidden",
"message": "The authenticated caller cannot access this resource.",
"retryable": false
}{
"code": "not_found",
"message": "The requested resource does not exist.",
"retryable": false
}{
"code": "regime_validation_failed",
"message": "The payload violates regime-specific validation rules.",
"retryable": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Merchant identifier returned by the merchants resource.
Body
Country-specific fiscal export type.
dsfinvk "dsfinvk"
"2026-03-01T00:00:00.000Z"
"2026-03-31T23:59:59.000Z"
Optional register to scope the export to. When omitted, the export covers all eligible registers for the merchant under the matching fiscal regime.
"reg_01HABC"
Response
Export job enqueued
Country-specific fiscal export type.
dsfinvk pending, completed, failed Signed URL to download the export artifact. Present only when status is completed.
Failure information. Present only when status is failed.
Show child attributes
Show child attributes
Was this page helpful?