Accounting Entry Generation API
Functions
accounting_entry_prediction(request)
HTTP Entrypoint for accounting entry generation based on extracted invoice information.
curl -X POST "https://acc-entry-prediction-41698605870.europe-west1.run.app" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_TOKEN_HERE>" \
-d '{"token": "TEST-TEST", "invoice_details": {"invoice_id": "BA84737078", "invoice_date": "19.09.2024", "due_date": "19.09.2024", "currency": "EUR", "line_items": [{"description": "IPHONE 16 PRO BLACK 1TB-ZDD", "quantity": 1.0, "unit_price": 1535.17, "unit": "piece", "total_amount": 1535.17, "net_amount": 1535.17, "tax_rate": 20.0, "tax_amount": 307.03, "ref": "MYNR3ZD/A"}], "total_net_amount": 1549.17, "total_amount": 1859.0, "total_tax_amount": 309.83, "receiver_name": "Laurent Taupin", "receiver_address": "3, rue des Girondins, Code 2512A - Batiment B, Leadovation SAS, 92210 SAINT-CLOUD, FRANCE", "receiver_tax_id": "FR60539777565", "receiver_siren": "539777565", "issuer_name": "Apple Retail France E.U.R.L.", "issuer_address": "3-5 rue Saint-Georges, 75009 Paris, FRANCE", "issuer_tax_id": "FR21483209383", "issuer_siren": "483209383"}}'
EXAMPLE OUTPUT
Expand output
{
"reasoning": <Reasoning that led to the accounting entries>,
"response": {
'accounting_entries': [
{
"description": "Achat d'un iPhone 16 Pro Black 1TB-ZDD",
"account": 605,
"amount": 1549.17,
"direction": "debit"
},
{
"description": "TVA sur achat d'un iPhone 16 Pro Black 1TB-ZDD",
"account": 44566,
"amount": 309.83,
"direction": "debit"
},
{
"description": "Paiement pour l'achat d'un iPhone 16 Pro Black 1TB
"account": 401,
"amount": 1859,
"direction": "credit"
}
]
}
parse_input(kie_details)
Function to parse input kie_details
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kie_details
|
dict
|
Extracted information from invoice |
required |
Returns:
| Name | Type | Description |
|---|---|---|
_type_ |
Tuple[str, str, str]
|
description |