Invoice
Få åtkomst till registrerade Invoices i Amili-systemet.
Invoice endpoints
GET /invoices- Lista alla invoices (pagerad)GET /invoices/{id}- Hämta en specifik invoice
Se Invoice Registration för att skapa nya invoices.
Exempel Request
Nedan är ett exempel på att hämta en specifik invoice. Andra operationer följer liknande request/response-mönster med samma datastruktur.
URL: GET /invoices/68678ed98d8dc95ece127944
Headers:
x-api-key: {your_access_token}Response Code: 200 OK
Response Body:
json
{
"_id": "68b006fd76535aeb5be09163",
"account": "671a133fc9e282cfad3ffeb6",
"creditor": "60e7fdefc90dc3e2ddd6c7ac",
"currency": "SEK",
"invoice_number": "F12345678",
"reference_number": "F12345678",
"payout_reference": "0123456789",
"letter_template": "invoices",
"matrix": [
{
"article_number": "123",
"article_description": "Description text",
"unit_vat_percent": "25%",
"unit_price": 300.0,
"number_of_units": 1,
"total_price_excluding_vat": 300.0
}
],
"invoice_date": "Sun, 30 Aug 2025 17:41:07 GMT",
"invoice_due_date": "Tue, 29 Sep 2025 17:41:07 GMT",
"invoice_type": "invoice",
"total_amount_including_vat": 375,
"total_amount_excluding_vat": 300.0,
"total_vat_25_percent": 75.0,
"total_vat_12_percent": 0,
"total_vat_6_percent": 0,
"total_vat": 75.0,
"amount_rounding": 0.0,
"increment_invoice_number": false,
"customer": "60e7fdefc90dc3e2ddd6c7ad",
"customer_name": "Jane Doe",
"customer_status": "initialized",
"agreement_version": "60e7fdefc90dc3e2ddd6c7ae",
"invoice_registration": "68b006fd76535aeb5be09164",
"creditor_name": "Integration Team AB",
"case": "68b006fd76535aeb5be09165",
"ocr_number": "68b006fd76535aeb5be09166",
"case_status": "invoice",
"case_state": "invoice",
"case_total_added_transaction_amount": 375.0,
"case_total_added_capital_amount": 375.0,
"case_total_added_interest_amount": 0,
"case_total_added_costs_amount": 0,
"case_total_remaining_transaction_amount": 375.0,
"case_total_remaining_capital_amount": 375.0,
"case_total_remaining_interest_amount": 0,
"case_total_remaining_costs_amount": 0,
"debtor": "68b006fd76535aeb5be09167",
"customer_id_number": "7755664433",
"debtor_name": "Jane Doe",
"print": "68b006fd76535aeb5be09168",
"print_document": {
"id": "8be4d5fc86d77d226b0f83f8593de423",
"filename": "8be4d5fc86d77d226b0f83f8593de423.pdf",
"content_type": "application/pdf",
"size": 27684
},
"_created": "Sun, 30 Aug 2025 17:32:55 GMT",
"_updated": "Sun, 30 Aug 2025 18:10:39 GMT",
"_etag": "e291a3c19b834a11960187af"
}Parametrar
Response Properties
| Property | Typ | Obligatorisk | Beskrivning |
|---|---|---|---|
_id | string | Ja | Unik identifierare för invoice |
_created | string | Ja | Skapandetidsstämpel |
_updated | string | Ja | Senaste uppdateringstidsstämpel |
_etag | string | Ja | Entity tag för samtidighetskontroll |
account | string | Ja | Account ID |
creditor | string | Ja | Creditor ID |
creditor_name | string | Ja | Borgenärens namn |
customer | string | Ja | Customer ID |
customer_name | string | Ja | Kundens namn |
customer_id_number | string | Ja | Kundens personnummer eller organisationsnummer |
customer_number | string | Nej | Kundens referensnummer |
customer_status | string | Ja | Nuvarande kundstatus (t.ex. "initialized")* |
invoice_type | string | Ja | Typ av invoice (t.ex. "invoice")* |
invoice_number | string | Ja | Fakturanummer från borgenär |
reference_number | string | Nej | Referensnummer från borgenär |
payout_reference | string | Nej | Referens för utbetalningsspårning |
invoice_date | string | Ja | Datum när fakturan utfärdades |
invoice_due_date | string | Ja | Förfallodatum för betalning |
invoice_delivery_date | string | Nej | Datum när fakturan levererades |
invoice_headline | string | Nej | Fakturarubriktext |
invoice_body_text | string | Nej | Fakturatext |
currency | string | Ja | Valutakod (för närvarande endast "SEK" stöds) |
your_contact | string | Nej | Kontaktperson hos borgenär |
your_reference | string | Nej | Referens från borgenär |
our_reference | string | Nej | Referens från Amili |
debt_description | string | Nej | Beskrivning av skulden |
matrix | array | Ja | Array av fakturarader |
ocr_number | string | Ja | OCR-nummer för betalningsreferens |
case | string | Ja | Associerat Case ID |
case_status | string | Ja | Nuvarande Case-status (t.ex. "invoice")* |
case_state | string | Ja | Nuvarande Case-tillstånd (t.ex. "invoice")* |
agreement_version | string | Ja | Avtalsversions-ID |
invoice_registration | string | Ja | Invoice Registration ID |
print | string | Nej | Print-dokument-ID |
print_document | object | Nej | Print-dokumentinformation |
total_amount_including_vat | number | Ja | Totalt fakturabelopp inklusive moms |
total_amount_excluding_vat | number | Ja | Totalt fakturabelopp exklusive moms |
total_vat_25_percent | number | Ja | Totalt momsbelopp vid 25% |
total_vat_12_percent | number | Ja | Totalt momsbelopp vid 12% |
total_vat_6_percent | number | Ja | Totalt momsbelopp vid 6% |
total_vat | number | Ja | Totalt momsbelopp |
amount_rounding | number | Ja | Avrundningsjustering |
Customer Properties
| Property | Typ | Obligatorisk | Beskrivning |
|---|---|---|---|
name | string | Ja | Kundens fullständiga namn |
customer_number | string | Nej | Kundens referensnummer |
id_number | string | Ja | Personnummer eller organisationsnummer |
is_person | boolean | Ja | Om kunden är en individ |
address | object | Ja | Kundens adressinformation |
mobile_number | string | Nej | Kontakttelefonnummer |
email | string | Nej | Kontakt-e-postadress |
Address Properties
| Property | Typ | Obligatorisk | Beskrivning |
|---|---|---|---|
address_line_1 | string | Ja | Primär adressrad |
zip_code | string | Ja | Postnummer |
city | string | Ja | Stadnamn |
Matrix Item Properties
| Property | Typ | Obligatorisk | Beskrivning |
|---|---|---|---|
article_number | string | Nej | Artikelidentifierare |
article_description | string | Ja | Beskrivning av artikeln |
unit_price | number | Ja | Pris per enhet |
number_of_units | number | Nej | Antal artiklar |
total_price_excluding_vat | number | Ja | Totalt belopp före moms |
unit_vat_percent | string | Nej | Momsprocent (t.ex. "25%")* |
Print Document Properties
| Property | Typ | Obligatorisk | Beskrivning |
|---|---|---|---|
id | string | Ja | Dokument-ID |
filename | string | Ja | Filens namn |
content_type | string | Ja | MIME-typ för filen |
size | number | Ja | Filstorlek i byte |
*) För komplett lista över värden och detaljer, se Invoice
