curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send"
payload = { "customer_id": "<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({customer_id: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send', 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/invoices/{invoice_id}/send",
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([
'customer_id' => '<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/invoices/{invoice_id}/send"
payload := strings.NewReader("{\n \"customer_id\": \"<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/invoices/{invoice_id}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send")
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 \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"draft_saved_at": "<string>",
"delivery_channel": "<string>",
"document_type": "invoice",
"original_invoice_id": "<string>",
"original_invoice_number": "<string>",
"original_invoice_date": "2023-12-25",
"correction_reason": "<string>",
"credited_cents": 123,
"paid_cents": 123,
"open_cents": 123,
"can_cancel_before_sending": true,
"seller_name": "<string>",
"seller_legal_name": "<string>",
"seller_business_id": "<string>",
"seller_iban": "<string>",
"payment_reference_issue": "<string>",
"seller_profile_id": "<string>",
"posts_ledger": true,
"partner_copy_status": "not_required",
"partner_copy_error": "<string>",
"pdf_available": true,
"pdf_document_id": "<string>",
"pdf_sha256": "<string>",
"pdf_size_bytes": 123,
"approval_status": "none",
"approval_requested_by": "<string>",
"approval_request_id": "<string>",
"approval_decided_by": "<string>",
"approval_reason": "<string>",
"approval_created_by": "<string>",
"approval_revision": "<string>",
"approval_returned_revision": "<string>",
"review_revision": "<string>",
"payment_claimed_by_batch": true,
"review_next_action": "verify",
"review_stale_reasons": [
"payment_reference_added"
],
"review_can_decide": true,
"review_owners": [
{
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
],
"agent_review": {
"result": "valid",
"reason_code": "<string>",
"explanation": "<string>",
"source": "<string>",
"engine_version": "<string>",
"recommended_action": "<string>",
"checked_evidence": [
"<string>"
]
},
"review_history": [
{}
],
"review_evidence": [
{
"document_id": "<string>",
"document_type": "<string>",
"name": "<string>",
"content_type": "<string>"
}
],
"has_original": true,
"customer": {
"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>"
},
"lines": [
{
"description": "<string>",
"quantity": "<string>",
"unit_price_cents": 123,
"net_cents": 123,
"vat_cents": 123,
"gross_cents": 123,
"unit_price_gross_cents": 4503599627370496,
"vat_rate_basis_points": 123,
"vat_code": "<string>"
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Send an e-invoice
Issues a maventa_einvoice draft and transmits it over the e-invoice network: allocates the invoice number, stores the invoice, books the sale when LAC keeps the ledger, and queues the Finvoice send. For a partner-profile draft, the tenant’s Maventa connection is only the material-handler transport: the partner stays the Finvoice seller and payment beneficiary, receives a bookkeeping PDF copy, and the invoice has no tenant ledger effect. The e-invoice network is the only buyer-delivery channel LAC transmits on. A partner-profile send also emails its seller a bookkeeping copy. Drafts on any other channel are refused with 409; pdf_download drafts are issued through POST /invoices/{invoice_id}/finalize instead. Requires a write-scoped key.
curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send"
payload = { "customer_id": "<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({customer_id: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send', 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/invoices/{invoice_id}/send",
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([
'customer_id' => '<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/invoices/{invoice_id}/send"
payload := strings.NewReader("{\n \"customer_id\": \"<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/invoices/{invoice_id}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/invoices/{invoice_id}/send")
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 \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"draft_saved_at": "<string>",
"delivery_channel": "<string>",
"document_type": "invoice",
"original_invoice_id": "<string>",
"original_invoice_number": "<string>",
"original_invoice_date": "2023-12-25",
"correction_reason": "<string>",
"credited_cents": 123,
"paid_cents": 123,
"open_cents": 123,
"can_cancel_before_sending": true,
"seller_name": "<string>",
"seller_legal_name": "<string>",
"seller_business_id": "<string>",
"seller_iban": "<string>",
"payment_reference_issue": "<string>",
"seller_profile_id": "<string>",
"posts_ledger": true,
"partner_copy_status": "not_required",
"partner_copy_error": "<string>",
"pdf_available": true,
"pdf_document_id": "<string>",
"pdf_sha256": "<string>",
"pdf_size_bytes": 123,
"approval_status": "none",
"approval_requested_by": "<string>",
"approval_request_id": "<string>",
"approval_decided_by": "<string>",
"approval_reason": "<string>",
"approval_created_by": "<string>",
"approval_revision": "<string>",
"approval_returned_revision": "<string>",
"review_revision": "<string>",
"payment_claimed_by_batch": true,
"review_next_action": "verify",
"review_stale_reasons": [
"payment_reference_added"
],
"review_can_decide": true,
"review_owners": [
{
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
],
"agent_review": {
"result": "valid",
"reason_code": "<string>",
"explanation": "<string>",
"source": "<string>",
"engine_version": "<string>",
"recommended_action": "<string>",
"checked_evidence": [
"<string>"
]
},
"review_history": [
{}
],
"review_evidence": [
{
"document_id": "<string>",
"document_type": "<string>",
"name": "<string>",
"content_type": "<string>"
}
],
"has_original": true,
"customer": {
"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>"
},
"lines": [
{
"description": "<string>",
"quantity": "<string>",
"unit_price_cents": 123,
"net_cents": 123,
"vat_cents": 123,
"gross_cents": 123,
"unit_price_gross_cents": 4503599627370496,
"vat_rate_basis_points": 123,
"vat_code": "<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_....
Path Parameters
Body
Optional company selector for write requests.
Target company. Optional for API keys.
Response
Updated invoice.
One sales invoice, sales draft, or purchase invoice. Amounts are integer cents; interior fields beyond the stable ones vary by status.
Time the canonical draft was last saved; empty for issued invoices.
invoice, credit_note Live allocated payment amount in integer cents.
Amount still outstanding in integer cents.
True only when this issued Maventa invoice has one queued intent, no provider attempt or id, no payment or earlier correction, and an active original journal. The write route repeats these checks under the outbound and journal locks.
Customer-facing seller name captured for this invoice.
Registered legal seller name captured for this invoice.
Seller Business ID captured for this invoice.
Payment account captured for this invoice.
Unresolved creditor-reference uncertainty from the canonical purchase readiness owner; empty when no issue is recorded.
Partner seller profile id; empty for the tenant's own sale.
False for a partner sale. Such an invoice is excluded from this company's journal, VAT facts, receivables, aging, and overdue controls.
Delivery state of the partner's bookkeeping PDF copy.
not_required, no_contact_email, pending, sending, sent, failed, ambiguous Latest partner-copy delivery error.
Whether the exact issued PDF is registered as retained evidence.
Canonical evidence-document id for the issued PDF.
SHA-256 of the exact bytes returned by the PDF endpoint.
^[0-9a-f]{64}$Size of the retained PDF in bytes.
Where this draft stands with its approver, for a company whose invoice_approval_policy is required. Meaningful only while the row is a draft; an issued invoice carries an empty value because approval no longer applies to it. Changing a draft resets this to none: the approval was for the invoice as written.
none, awaiting, approved, rejected Who asked for approval.
Stable identity of the current approval request.
^[0-9a-f]{32}$Which approver approved it or sent it back.
Why an approver did not approve it.
Who created the draft; this person cannot decide it.
Material sales invoice revision that approve or return must echo.
^[0-9a-f]{64}$Material revision that was returned. A new request needs a different current revision.
^[0-9a-f]{64}$Current commercial/source review revision of a purchase invoice; accounting-only coding is excluded.
A live unsettled payment batch owns this bill, including an unreleased preparation. Resolve that attempt before inviting a competing manual transfer. This fact does not grant access to other sources in its batch.
verify, approve, returned, approved, ready_for_payment, payment_prepared, payment_in_progress, paid, source_unavailable, payment_details_missing Every cause LAC can prove for an earlier decision no longer applying to this version, from the audited einvoice payment-detail enrichment, ordered most-blocking first. Empty when no decision was superseded or no cause is provable. Never complete: an amount or due date can move with nothing to prove it, so clients must keep the general "details changed" warning beside whatever this names.
payment_reference_added, payment_reference_corrected, payment_reference_ambiguous, payment_reference_ambiguity_resolved, payee_account_added Whether this person may perform the next purchase review action. Follows the membership record exactly: an admin who stepped out of a stage in the approval flow reads false here like anyone else without the capability.
Whose move the open review step is: the active members holding its capability, minus the bill's maker and, under verify_and_approve, the person who verified it. Absent when the membership ledger could not be read; empty when nobody can decide the step.
Show child attributes
Show child attributes
A read-only recommendation about the current invoice facts. It never approves, returns, pays, or sends a reminder.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether a retained supplier-invoice source document is available; explicit receipt/supporting attachments do not qualify.
An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).
Show child attributes
Show child attributes
One invoice line. Money in integer cents; VAT rate in basis points; quantity is a decimal string.
- Option 1
- Option 2
Show child attributes
Show child attributes