Update EU E-Invoicing Config
Create or update the EU e-invoicing opt-in and EN 16931 seller identity.
curl --request PUT \
--url https://billing.example.com/v1/settings/eu-einvoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
'import requests
url = "https://billing.example.com/v1/settings/eu-einvoice"
payload = {
"enabled": True,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
legal_name: '<string>',
vat_number: '<string>',
country_code: '<string>',
street: '<string>',
city: '<string>',
postal_zone: '<string>'
})
};
fetch('https://billing.example.com/v1/settings/eu-einvoice', 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://billing.example.com/v1/settings/eu-einvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'legal_name' => '<string>',
'vat_number' => '<string>',
'country_code' => '<string>',
'street' => '<string>',
'city' => '<string>',
'postal_zone' => '<string>'
]),
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://billing.example.com/v1/settings/eu-einvoice"
payload := strings.NewReader("{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://billing.example.com/v1/settings/eu-einvoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/settings/eu-einvoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"enabled": true,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}enabled to true
requires a complete seller identity — legal_name, vat_number, and a
2-letter country_code — the fields every generated EN 16931 (UBL 2.1)
document needs. Scope to a legal entity with the optional entity_id query
parameter.
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | When true, invoices generate an EN 16931 (UBL 2.1) e-invoice. Off by default. |
legal_name | string | To enable | Seller registered/legal name (BT-27). |
vat_number | string | To enable | Seller VAT identifier incl. country prefix, e.g. DE123456789 (BT-31). |
country_code | string | To enable | Seller country, ISO 3166-1 alpha-2 (BT-40). |
street | string | No | Seller street address. |
city | string | No | Seller city. |
postal_zone | string | No | Seller postal code. |
Example Request
curl -X PUT https://api.recurso.dev/v1/settings/eu-einvoice \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"legal_name": "Acme GmbH",
"vat_number": "DE123456789",
"country_code": "DE",
"street": "Musterstrasse 12",
"city": "Berlin",
"postal_zone": "10115"
}'
data envelope. For India’s
IRP e-invoicing, see IRP configuration
instead.Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Legal entity to scope the tax config to (Multi-Entity Books). Omit for the tenant's primary entity / default config.
Body
A tenant's EU e-invoicing configuration — the opt-in flag plus the EN 16931 seller party.
When true, invoices generate an EN 16931 (UBL 2.1) e-invoice. Off by default.
Seller registered/legal name (BT-27). Required to enable.
Seller VAT identifier incl. country prefix, e.g. "DE123456789" (BT-31). Required to enable.
Seller country as an ISO 3166-1 alpha-2 code (BT-40). Required to enable.
2Response
Configuration saved.
A tenant's EU e-invoicing configuration — the opt-in flag plus the EN 16931 seller party.
Show child attributes
Show child attributes
curl --request PUT \
--url https://billing.example.com/v1/settings/eu-einvoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
'import requests
url = "https://billing.example.com/v1/settings/eu-einvoice"
payload = {
"enabled": True,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
legal_name: '<string>',
vat_number: '<string>',
country_code: '<string>',
street: '<string>',
city: '<string>',
postal_zone: '<string>'
})
};
fetch('https://billing.example.com/v1/settings/eu-einvoice', 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://billing.example.com/v1/settings/eu-einvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'legal_name' => '<string>',
'vat_number' => '<string>',
'country_code' => '<string>',
'street' => '<string>',
'city' => '<string>',
'postal_zone' => '<string>'
]),
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://billing.example.com/v1/settings/eu-einvoice"
payload := strings.NewReader("{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://billing.example.com/v1/settings/eu-einvoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/settings/eu-einvoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"legal_name\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_zone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"enabled": true,
"legal_name": "<string>",
"vat_number": "<string>",
"country_code": "<string>",
"street": "<string>",
"city": "<string>",
"postal_zone": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}