Preview the current window's Flux 10 report
curl --request GET \
--url https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview', 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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview",
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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview"
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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview")
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>{
"error": "missing siren parameter"
}{
"error": "missing enrollment"
}{
"error": "draft party is missing signer details"
}{
"error": "internal server error"
}France
Preview the current window's Flux 10 report
Build the Flux 10 Report.xml for the current reporting window without storing or sending it.
GET
/
apps
/
gov-fr
/
v1
/
reports
/
{siren}
/
preview
Preview the current window's Flux 10 report
curl --request GET \
--url https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview', 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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview",
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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview"
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.invopop.com/apps/gov-fr/v1/reports/{siren}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/gov-fr/v1/reports/{siren}/preview")
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>{
"error": "missing siren parameter"
}{
"error": "missing enrollment"
}{
"error": "draft party is missing signer details"
}{
"error": "internal server error"
}Builds the report from everything recorded in the current window so far, so you can check what will be filed before the window closes. Choose the report kind with
kind (required) and the stream with role (defaults to seller).
The report is checked against the PPF rules before it is returned. A report that would be rejected answers 422 with the issues found, and an empty window answers 404.
Nothing is stored or submitted. The preview does not create a report period, so it never appears in the periods list.
Authorizations
Authenticate using a valid Invopop enrollment token in the Bearer
scheme.
Example: Authorization: Bearer <token>
Path Parameters
SIREN of the reporting party. The party's org.Party silo entry ID
is still accepted in its place, but will be phased out.
Example:
"123456789"
Query Parameters
tx for transactions, py for payments.
Available options:
tx, py Stream to preview. Defaults to seller.
Available options:
seller, buyer Response
The Flux 10 XML body, served as application/xml.
The response is of type file.
Was this page helpful?