cURL
curl --request POST \
--url https://api.invopop.com/silo/v1/gobl/convert/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.invopop.com/silo/v1/gobl/convert/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.invopop.com/silo/v1/gobl/convert/import', 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/silo/v1/gobl/convert/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream"
],
]);
$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.invopop.com/silo/v1/gobl/convert/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
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.invopop.com/silo/v1/gobl/convert/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/silo/v1/gobl/convert/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"attachments": [
{
"data": "aSDinaTvuI8gbWludGxpZnk=",
"desc": "<string>",
"id": "<string>",
"mime": "application/pdf",
"name": "invoice.pdf",
"size": 12345
}
],
"data": {},
"format": "ubl+peppol+bis-v3"
}GOBL
Import a format to GOBL
Convert a document in an external format, such as UBL or CII, into a GOBL Envelope without persisting anything. Send the raw document as the request body; its format is detected automatically. Any files embedded in the document are returned as attachments. Requests up to 100MB are accepted.
POST
/
silo
/
v1
/
gobl
/
convert
/
import
cURL
curl --request POST \
--url https://api.invopop.com/silo/v1/gobl/convert/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.invopop.com/silo/v1/gobl/convert/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.invopop.com/silo/v1/gobl/convert/import', 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/silo/v1/gobl/convert/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream"
],
]);
$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.invopop.com/silo/v1/gobl/convert/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
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.invopop.com/silo/v1/gobl/convert/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/silo/v1/gobl/convert/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"attachments": [
{
"data": "aSDinaTvuI8gbWludGxpZnk=",
"desc": "<string>",
"id": "<string>",
"mime": "application/pdf",
"name": "invoice.pdf",
"size": 12345
}
],
"data": {},
"format": "ubl+peppol+bis-v3"
}Convert a document in an external format, such as a UBL or CII invoice, into a GOBL Envelope without storing anything. Send the raw document as the request body. Its format is detected automatically, and the response says which one was used.
Any files embedded in the document, such as a PDF copy of the invoice, are returned in
To limit detection to particular formats, pass their keys from the conversion formats endpoint in the
attachments with their contents base64 encoded.
curl -X POST "https://api.invopop.com/silo/v1/gobl/convert/import" \
-H "Authorization: Bearer $INVOPOP_TOKEN" \
-H "Content-Type: application/xml" \
--data-binary @invoice.xml
format query parameter.
To store the result as a new silo entry, use import an entry instead, which also keeps the original document and its attachments as files of the entry.Authorizations
Query Parameters
Body
application/octet-stream
Raw document to import.
The body is of type file.
Was this page helpful?