Skip to main content
GET
/
billing_entities
/
{code}
Retrieve a billing entity
curl --request GET \
  --url https://api.getlago.com/api/v1/billing_entities/{code} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.getlago.com/api/v1/billing_entities/{code}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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 => "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.getlago.com/api/v1/billing_entities/{code}"

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.getlago.com/api/v1/billing_entities/{code}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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",
    "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": [],
    "eu_tax_management": 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": 401,
"error": "Unauthorized"
}
{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}
{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

code
string<uuid>
required

The ID of the billing entity

Response

Billing entity details

billing_entity
object
required

Billing entity object