Skip to content

Invoice

Access registered invoices in the Amili system.

Invoice endpoints

See Invoice Registration for creating new invoices.

Example Request

Below is an example of retrieving a specific invoice. Other operations follow similar request/response patterns with the same data structure.

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"
}

Parameters

Response Properties

PropertyTypeRequiredDescription
_idstringYesUnique identifier for the invoice
_createdstringYesCreation timestamp
_updatedstringYesLast update timestamp
_etagstringYesEntity tag for concurrency control
accountstringYesAccount ID
creditorstringYesCreditor ID
creditor_namestringYesName of the creditor
customerstringYesCustomer ID
customer_namestringYesName of the customer
customer_id_numberstringYesCustomer's personal ID or organization number
customer_numberstringNoCustomer's reference number
customer_statusstringYesCurrent customer status (e.g. "initialized")*
invoice_typestringYesType of invoice (e.g. "invoice")*
invoice_numberstringYesInvoice number from creditor
reference_numberstringNoReference number from creditor
payout_referencestringNoReference for payout tracking
invoice_datestringYesDate invoice was issued
invoice_due_datestringYesDue date for payment
invoice_delivery_datestringNoDate invoice was delivered
invoice_headlinestringNoInvoice headline text
invoice_body_textstringNoInvoice body text
currencystringYesCurrency code (currently only "SEK" supported)
your_contactstringNoContact person at creditor
your_referencestringNoReference from creditor
our_referencestringNoReference from Amili
debt_descriptionstringNoDescription of the debt
matrixarrayYesArray of invoice line items
ocr_numberstringYesOCR number for payment reference
casestringYesAssociated case ID
case_statusstringYesCurrent case status (e.g. "invoice")*
case_statestringYesCurrent case state (e.g. "invoice")*
agreement_versionstringYesAgreement version ID
invoice_registrationstringYesInvoice registration ID
printstringNoPrint document ID
print_documentobjectNoPrint document information
total_amount_including_vatnumberYesTotal invoice amount including VAT
total_amount_excluding_vatnumberYesTotal invoice amount excluding VAT
total_vat_25_percentnumberYesTotal VAT amount at 25%
total_vat_12_percentnumberYesTotal VAT amount at 12%
total_vat_6_percentnumberYesTotal VAT amount at 6%
total_vatnumberYesTotal VAT amount
amount_roundingnumberYesRounding adjustment

Customer Properties

PropertyTypeRequiredDescription
namestringYesCustomer's full name
customer_numberstringNoCustomer's reference number
id_numberstringYesPersonal ID or organization number
is_personbooleanYesWhether the customer is an individual
addressobjectYesCustomer's address information
mobile_numberstringNoContact phone number
emailstringNoContact email address

Address Properties

PropertyTypeRequiredDescription
address_line_1stringYesPrimary address line
zip_codestringYesPostal code
citystringYesCity name

Matrix Item Properties

PropertyTypeRequiredDescription
article_numberstringNoArticle identifier
article_descriptionstringYesDescription of the item
unit_pricenumberYesPrice per unit
number_of_unitsnumberNoQuantity of items
total_price_excluding_vatnumberYesTotal amount before VAT
unit_vat_percentstringNoVAT percentage (e.g. "25%")*
PropertyTypeRequiredDescription
idstringYesDocument ID
filenamestringYesName of the file
content_typestringYesMIME type of the file
sizenumberYesFile size in bytes

*) For complete list of values and details, please see Invoice