curl --request GET \
--url https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file', 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.procuros.io/v2/transactions/{procurosTransactionId}/original-file",
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>"
],
]);
$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.procuros.io/v2/transactions/{procurosTransactionId}/original-file"
req, _ := http.NewRequest("GET", url, nil)
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.procuros.io/v2/transactions/{procurosTransactionId}/original-file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Download Original File
Download the original file of an invoice or credit note you received, as your trade partner sent it. Use it to keep the original document on your side, for example next to the invoice in your ERP.
Use the procurosTransactionId from GET /v2/transactions or from GET /v2/all-transactions.
The original file is available when the invoice or credit note reached Procuros as a PDF or as an e-invoice, for example an XRechnung XML or a ZUGFeRD PDF. If your trade partner sent an e-invoice XML together with a PDF copy, you get the XML, because the XML is the e-invoice. The Content-Type header tells you which kind of file you got, and the Content-Disposition header carries its file name.
The endpoint returns 404 when the transaction does not exist or when its original file is not an e-invoice.
curl --request GET \
--url https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file', 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.procuros.io/v2/transactions/{procurosTransactionId}/original-file",
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>"
],
]);
$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.procuros.io/v2/transactions/{procurosTransactionId}/original-file"
req, _ := http.NewRequest("GET", url, nil)
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.procuros.io/v2/transactions/{procurosTransactionId}/original-file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.procuros.io/v2/transactions/{procurosTransactionId}/original-file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Was this page helpful?