Retrieve a DSFinV-K export
curl --request GET \
--url https://api.openfiskal.com/v1/exports/dsfinvk/{exportId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}"
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}', 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/dsfinvk/{exportId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
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": {}
},
"coverage": {
"tse_serial_numbers": [
"<string>"
],
"log_message_count": 123,
"covers_requested_window": true,
"fresh_drain": "not_needed",
"gapless": true,
"signature_counter_first": 123,
"signature_counter_last": 123,
"covered_from": "2023-11-07T05:31:56Z",
"covered_to": "2023-11-07T05:31:56Z",
"last_drained_at": "2023-11-07T05:31:56Z"
},
"completed_at": "2023-11-07T05:31:56Z"
}Exports
Retrieve a DSFinV-K export
Returns the DSFinV-K export job. When status is completed, download_url is a signed URL to fetch the TAR archive, valid for 7 days from completed_at. When status is failed, error.message (and optional error.details) describe why.
An id that names an export of a different type returns 404: the path asserts what you believe you are reading, so a mismatch is an error rather than a differently-shaped response.
GET
/
exports
/
dsfinvk
/
{exportId}
Retrieve a DSFinV-K export
curl --request GET \
--url https://api.openfiskal.com/v1/exports/dsfinvk/{exportId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}"
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}', 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/dsfinvk/{exportId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/exports/dsfinvk/{exportId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
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": {}
},
"coverage": {
"tse_serial_numbers": [
"<string>"
],
"log_message_count": 123,
"covers_requested_window": true,
"fresh_drain": "not_needed",
"gapless": true,
"signature_counter_first": 123,
"signature_counter_last": 123,
"covered_from": "2023-11-07T05:31:56Z",
"covered_to": "2023-11-07T05:31:56Z",
"last_drained_at": "2023-11-07T05:31:56Z"
},
"completed_at": "2023-11-07T05:31:56Z"
}Authorizations
Response
Export job returned
Was this page helpful?