cURL
curl --request POST \
--url https://api.invopop.com/silo/v1/gobl/correct \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"options": {},
"show_options": true
}
'import requests
url = "https://api.invopop.com/silo/v1/gobl/correct"
payload = {
"data": {},
"options": {},
"show_options": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {}, options: {}, show_options: true})
};
fetch('https://api.invopop.com/silo/v1/gobl/correct', 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/correct",
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([
'data' => [
],
'options' => [
],
'show_options' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/correct"
payload := strings.NewReader("{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.invopop.com/silo/v1/gobl/correct")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/silo/v1/gobl/correct")
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/json'
request.body = "{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}GOBL
Correct GOBL envelope
Correct or determine the correction options for a GOBL Envelope (not Object!)
POST
/
silo
/
v1
/
gobl
/
correct
cURL
curl --request POST \
--url https://api.invopop.com/silo/v1/gobl/correct \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"options": {},
"show_options": true
}
'import requests
url = "https://api.invopop.com/silo/v1/gobl/correct"
payload = {
"data": {},
"options": {},
"show_options": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {}, options: {}, show_options: true})
};
fetch('https://api.invopop.com/silo/v1/gobl/correct', 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/correct",
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([
'data' => [
],
'options' => [
],
'show_options' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/correct"
payload := strings.NewReader("{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.invopop.com/silo/v1/gobl/correct")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/silo/v1/gobl/correct")
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/json'
request.body = "{\n \"data\": {},\n \"options\": {},\n \"show_options\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Use this endpoint to help determine the options for correcting GOBL documents and then perform the correction itself.
This is useful when you need to issue credit notes or corrective versions of a previously issued invoice and need clarity on the local options.
All requests to the endpoint require a GOBL Envelope, and cannot be used with a GOBL Invoice or other GOBL object. This is because some tax regimes require specific details from the previous document’s headers, like a special identification code.
Use the
show_options flag to return a JSON Schema of the options that can be used with the provided document.
Once the options are clear, send in a new request with the options data to get an example corrected GOBL Envelope. The same options data can be used with the silo create entry endpoint and the correct property.Authorizations
Use the Bearer scheme with a valid JWT token to authenticate requests. Example: Authorization: Bearer <token>
Body
application/json
Response
200 - application/json
OK
GOBL Envelope or Object response to a build request.
Was this page helpful?