Update a billing entity
curl --request PUT \
--url https://api.getlago.com/api/v1/billing_entities/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billing_entity": {
"name": "Acme Corp",
"default_currency": "USD",
"document_number_prefix": "ABC-123",
"finalize_zero_amount_invoice": true,
"billing_configuration": {
"invoice_footer": "Thank you for your business",
"document_locale": "en",
"invoice_grace_period": 0,
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date"
},
"net_payment_term": 0,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"timezone": "UTC",
"tax_codes": [
"french_standard_vat"
],
"email_settings": [],
"eu_tax_management": false,
"einvoicing": false,
"logo": "data:image/png;base64,...",
"invoice_custom_section_codes": [
"custom_section_1",
"custom_section_2"
]
}
}
'import requests
url = "https://api.getlago.com/api/v1/billing_entities/{code}"
payload = { "billing_entity": {
"name": "Acme Corp",
"default_currency": "USD",
"document_number_prefix": "ABC-123",
"finalize_zero_amount_invoice": True,
"billing_configuration": {
"invoice_footer": "Thank you for your business",
"document_locale": "en",
"invoice_grace_period": 0,
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date"
},
"net_payment_term": 0,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"timezone": "UTC",
"tax_codes": ["french_standard_vat"],
"email_settings": [],
"eu_tax_management": False,
"einvoicing": False,
"logo": "data:image/png;base64,...",
"invoice_custom_section_codes": ["custom_section_1", "custom_section_2"]
} }
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({
billing_entity: {
name: 'Acme Corp',
default_currency: 'USD',
document_number_prefix: 'ABC-123',
finalize_zero_amount_invoice: true,
billing_configuration: {
invoice_footer: 'Thank you for your business',
document_locale: 'en',
invoice_grace_period: 0,
subscription_invoice_issuing_date_anchor: 'next_period_start',
subscription_invoice_issuing_date_adjustment: 'align_with_finalization_date'
},
net_payment_term: 0,
address_line1: '5230 Penfield Ave',
address_line2: 'Suite 100',
phone: '1-171-883-3711 x245',
city: 'Woodland Hills',
state: 'CA',
country: 'US',
zipcode: '91364',
email: 'billing@acme.com',
legal_name: 'Acme Corporation',
legal_number: 'US123456789',
tax_identification_number: 'EU123456789',
timezone: 'UTC',
tax_codes: ['french_standard_vat'],
email_settings: [],
eu_tax_management: false,
einvoicing: false,
logo: 'data:image/png;base64,...',
invoice_custom_section_codes: ['custom_section_1', 'custom_section_2']
}
})
};
fetch('https://api.getlago.com/api/v1/billing_entities/{code}', 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.getlago.com/api/v1/billing_entities/{code}",
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([
'billing_entity' => [
'name' => 'Acme Corp',
'default_currency' => 'USD',
'document_number_prefix' => 'ABC-123',
'finalize_zero_amount_invoice' => true,
'billing_configuration' => [
'invoice_footer' => 'Thank you for your business',
'document_locale' => 'en',
'invoice_grace_period' => 0,
'subscription_invoice_issuing_date_anchor' => 'next_period_start',
'subscription_invoice_issuing_date_adjustment' => 'align_with_finalization_date'
],
'net_payment_term' => 0,
'address_line1' => '5230 Penfield Ave',
'address_line2' => 'Suite 100',
'phone' => '1-171-883-3711 x245',
'city' => 'Woodland Hills',
'state' => 'CA',
'country' => 'US',
'zipcode' => '91364',
'email' => 'billing@acme.com',
'legal_name' => 'Acme Corporation',
'legal_number' => 'US123456789',
'tax_identification_number' => 'EU123456789',
'timezone' => 'UTC',
'tax_codes' => [
'french_standard_vat'
],
'email_settings' => [
],
'eu_tax_management' => false,
'einvoicing' => false,
'logo' => 'data:image/png;base64,...',
'invoice_custom_section_codes' => [
'custom_section_1',
'custom_section_2'
]
]
]),
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.getlago.com/api/v1/billing_entities/{code}"
payload := strings.NewReader("{\n \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\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://api.getlago.com/api/v1/billing_entities/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/billing_entities/{code}")
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 \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"billing_entity": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "acme_corp",
"name": "Acme Corp",
"default_currency": "USD",
"document_locale": "en",
"document_numbering": "per_customer",
"finalize_zero_amount_invoice": true,
"invoice_grace_period": 0,
"net_payment_term": 0,
"timezone": "UTC",
"created_at": "2022-04-29T08:59:51Z",
"updated_at": "2022-04-29T08:59:51Z",
"document_number_prefix": "ABC-123",
"invoice_footer": "Thank you for your business",
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date",
"is_default": false,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"email_settings": [
"invoice.finalized"
],
"eu_tax_management": false,
"einvoicing": false,
"logo_url": "https://getlago.com/logo.png",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
],
"selected_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "EU Bank Details",
"code": "eu_bank_details",
"description": "This section contains the bank details for EU customers.",
"details": "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143",
"display_name": "Bank Details:",
"applied_to_organization": true,
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Billing entities
Update a billing entity
This endpoint is used to update an existing billing entity
PUT
/
billing_entities
/
{code}
Update a billing entity
curl --request PUT \
--url https://api.getlago.com/api/v1/billing_entities/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billing_entity": {
"name": "Acme Corp",
"default_currency": "USD",
"document_number_prefix": "ABC-123",
"finalize_zero_amount_invoice": true,
"billing_configuration": {
"invoice_footer": "Thank you for your business",
"document_locale": "en",
"invoice_grace_period": 0,
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date"
},
"net_payment_term": 0,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"timezone": "UTC",
"tax_codes": [
"french_standard_vat"
],
"email_settings": [],
"eu_tax_management": false,
"einvoicing": false,
"logo": "data:image/png;base64,...",
"invoice_custom_section_codes": [
"custom_section_1",
"custom_section_2"
]
}
}
'import requests
url = "https://api.getlago.com/api/v1/billing_entities/{code}"
payload = { "billing_entity": {
"name": "Acme Corp",
"default_currency": "USD",
"document_number_prefix": "ABC-123",
"finalize_zero_amount_invoice": True,
"billing_configuration": {
"invoice_footer": "Thank you for your business",
"document_locale": "en",
"invoice_grace_period": 0,
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date"
},
"net_payment_term": 0,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"timezone": "UTC",
"tax_codes": ["french_standard_vat"],
"email_settings": [],
"eu_tax_management": False,
"einvoicing": False,
"logo": "data:image/png;base64,...",
"invoice_custom_section_codes": ["custom_section_1", "custom_section_2"]
} }
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({
billing_entity: {
name: 'Acme Corp',
default_currency: 'USD',
document_number_prefix: 'ABC-123',
finalize_zero_amount_invoice: true,
billing_configuration: {
invoice_footer: 'Thank you for your business',
document_locale: 'en',
invoice_grace_period: 0,
subscription_invoice_issuing_date_anchor: 'next_period_start',
subscription_invoice_issuing_date_adjustment: 'align_with_finalization_date'
},
net_payment_term: 0,
address_line1: '5230 Penfield Ave',
address_line2: 'Suite 100',
phone: '1-171-883-3711 x245',
city: 'Woodland Hills',
state: 'CA',
country: 'US',
zipcode: '91364',
email: 'billing@acme.com',
legal_name: 'Acme Corporation',
legal_number: 'US123456789',
tax_identification_number: 'EU123456789',
timezone: 'UTC',
tax_codes: ['french_standard_vat'],
email_settings: [],
eu_tax_management: false,
einvoicing: false,
logo: 'data:image/png;base64,...',
invoice_custom_section_codes: ['custom_section_1', 'custom_section_2']
}
})
};
fetch('https://api.getlago.com/api/v1/billing_entities/{code}', 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.getlago.com/api/v1/billing_entities/{code}",
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([
'billing_entity' => [
'name' => 'Acme Corp',
'default_currency' => 'USD',
'document_number_prefix' => 'ABC-123',
'finalize_zero_amount_invoice' => true,
'billing_configuration' => [
'invoice_footer' => 'Thank you for your business',
'document_locale' => 'en',
'invoice_grace_period' => 0,
'subscription_invoice_issuing_date_anchor' => 'next_period_start',
'subscription_invoice_issuing_date_adjustment' => 'align_with_finalization_date'
],
'net_payment_term' => 0,
'address_line1' => '5230 Penfield Ave',
'address_line2' => 'Suite 100',
'phone' => '1-171-883-3711 x245',
'city' => 'Woodland Hills',
'state' => 'CA',
'country' => 'US',
'zipcode' => '91364',
'email' => 'billing@acme.com',
'legal_name' => 'Acme Corporation',
'legal_number' => 'US123456789',
'tax_identification_number' => 'EU123456789',
'timezone' => 'UTC',
'tax_codes' => [
'french_standard_vat'
],
'email_settings' => [
],
'eu_tax_management' => false,
'einvoicing' => false,
'logo' => 'data:image/png;base64,...',
'invoice_custom_section_codes' => [
'custom_section_1',
'custom_section_2'
]
]
]),
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.getlago.com/api/v1/billing_entities/{code}"
payload := strings.NewReader("{\n \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\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://api.getlago.com/api/v1/billing_entities/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/billing_entities/{code}")
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 \"billing_entity\": {\n \"name\": \"Acme Corp\",\n \"default_currency\": \"USD\",\n \"document_number_prefix\": \"ABC-123\",\n \"finalize_zero_amount_invoice\": true,\n \"billing_configuration\": {\n \"invoice_footer\": \"Thank you for your business\",\n \"document_locale\": \"en\",\n \"invoice_grace_period\": 0,\n \"subscription_invoice_issuing_date_anchor\": \"next_period_start\",\n \"subscription_invoice_issuing_date_adjustment\": \"align_with_finalization_date\"\n },\n \"net_payment_term\": 0,\n \"address_line1\": \"5230 Penfield Ave\",\n \"address_line2\": \"Suite 100\",\n \"phone\": \"1-171-883-3711 x245\",\n \"city\": \"Woodland Hills\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zipcode\": \"91364\",\n \"email\": \"billing@acme.com\",\n \"legal_name\": \"Acme Corporation\",\n \"legal_number\": \"US123456789\",\n \"tax_identification_number\": \"EU123456789\",\n \"timezone\": \"UTC\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"email_settings\": [],\n \"eu_tax_management\": false,\n \"einvoicing\": false,\n \"logo\": \"data:image/png;base64,...\",\n \"invoice_custom_section_codes\": [\n \"custom_section_1\",\n \"custom_section_2\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"billing_entity": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "acme_corp",
"name": "Acme Corp",
"default_currency": "USD",
"document_locale": "en",
"document_numbering": "per_customer",
"finalize_zero_amount_invoice": true,
"invoice_grace_period": 0,
"net_payment_term": 0,
"timezone": "UTC",
"created_at": "2022-04-29T08:59:51Z",
"updated_at": "2022-04-29T08:59:51Z",
"document_number_prefix": "ABC-123",
"invoice_footer": "Thank you for your business",
"subscription_invoice_issuing_date_anchor": "next_period_start",
"subscription_invoice_issuing_date_adjustment": "align_with_finalization_date",
"is_default": false,
"address_line1": "5230 Penfield Ave",
"address_line2": "Suite 100",
"phone": "1-171-883-3711 x245",
"city": "Woodland Hills",
"state": "CA",
"country": "US",
"zipcode": "91364",
"email": "billing@acme.com",
"legal_name": "Acme Corporation",
"legal_number": "US123456789",
"tax_identification_number": "EU123456789",
"email_settings": [
"invoice.finalized"
],
"eu_tax_management": false,
"einvoicing": false,
"logo_url": "https://getlago.com/logo.png",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
],
"selected_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "EU Bank Details",
"code": "eu_bank_details",
"description": "This section contains the bank details for EU customers.",
"details": "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143",
"display_name": "Bank Details:",
"applied_to_organization": true,
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique code of the billing entity
Example:
"acme_corp"
Body
application/json
The billing entity update payload
Billing entity update input
Show child attributes
Show child attributes
Response
Billing entity updated
Billing entity object
Show child attributes
Show child attributes
Was this page helpful?