curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/invoice-customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/invoice-customers"
payload = {
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}
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({
name: '<string>',
id: '<string>',
business_id: '<string>',
vat_number: '<string>',
address_line1: '<string>',
postal_code: '<string>',
city: '<string>',
country_code: '<string>',
email: '<string>',
einvoice_address: '<string>',
einvoice_operator: '<string>',
default_payment_terms_days: 123,
default_vat_code: '<string>',
default_vat_rate_basis_points: 123,
default_invoice_language: '<string>'
})
};
fetch('https://api.app.lastaccountingcompany.com/portal/invoice-customers', 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.app.lastaccountingcompany.com/portal/invoice-customers",
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([
'name' => '<string>',
'id' => '<string>',
'business_id' => '<string>',
'vat_number' => '<string>',
'address_line1' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'country_code' => '<string>',
'email' => '<string>',
'einvoice_address' => '<string>',
'einvoice_operator' => '<string>',
'default_payment_terms_days' => 123,
'default_vat_code' => '<string>',
'default_vat_rate_basis_points' => 123,
'default_invoice_language' => '<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://api.app.lastaccountingcompany.com/portal/invoice-customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\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.app.lastaccountingcompany.com/portal/invoice-customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/invoice-customers")
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 \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Create or update an invoice customer
Upserts a party in the invoicing counterparty register. Include id to update an existing party. Requires a write-scoped key.
curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/invoice-customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/invoice-customers"
payload = {
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}
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({
name: '<string>',
id: '<string>',
business_id: '<string>',
vat_number: '<string>',
address_line1: '<string>',
postal_code: '<string>',
city: '<string>',
country_code: '<string>',
email: '<string>',
einvoice_address: '<string>',
einvoice_operator: '<string>',
default_payment_terms_days: 123,
default_vat_code: '<string>',
default_vat_rate_basis_points: 123,
default_invoice_language: '<string>'
})
};
fetch('https://api.app.lastaccountingcompany.com/portal/invoice-customers', 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.app.lastaccountingcompany.com/portal/invoice-customers",
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([
'name' => '<string>',
'id' => '<string>',
'business_id' => '<string>',
'vat_number' => '<string>',
'address_line1' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'country_code' => '<string>',
'email' => '<string>',
'einvoice_address' => '<string>',
'einvoice_operator' => '<string>',
'default_payment_terms_days' => 123,
'default_vat_code' => '<string>',
'default_vat_rate_basis_points' => 123,
'default_invoice_language' => '<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://api.app.lastaccountingcompany.com/portal/invoice-customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\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.app.lastaccountingcompany.com/portal/invoice-customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/invoice-customers")
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 \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"business_id\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"address_line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"einvoice_address\": \"<string>\",\n \"einvoice_operator\": \"<string>\",\n \"default_payment_terms_days\": 123,\n \"default_vat_code\": \"<string>\",\n \"default_vat_rate_basis_points\": 123,\n \"default_invoice_language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"business_id": "<string>",
"vat_number": "<string>",
"address_line1": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country_code": "<string>",
"email": "<string>",
"einvoice_address": "<string>",
"einvoice_operator": "<string>",
"default_payment_terms_days": 123,
"default_vat_code": "<string>",
"default_vat_rate_basis_points": 123,
"default_invoice_language": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Body
An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).
Party id. Include on upsert to update an existing party.
Finnish business ID (Y-tunnus), e.g. 1234567-8.
EU VAT number, e.g. FI12345678.
ISO 3166-1 alpha-2, e.g. FI.
E-invoice (verkkolasku) address, e.g. an OVT identifier.
E-invoice operator/intermediator code.
Default VAT rate in basis points (25.5% = 2550).
Response
Upserted party.
An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).
Party id. Include on upsert to update an existing party.
Finnish business ID (Y-tunnus), e.g. 1234567-8.
EU VAT number, e.g. FI12345678.
ISO 3166-1 alpha-2, e.g. FI.
E-invoice (verkkolasku) address, e.g. an OVT identifier.
E-invoice operator/intermediator code.
Default VAT rate in basis points (25.5% = 2550).