Skip to content

Invoice Registration

Register new invoices in the Amili system. Invoice registration is used for creating invoices intended for distribution by Visma Amili, including customer information, invoice details, and line items.

Invoice Registration endpoints

See Case for accessing registered cases.

Example Request

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

URL: POST /invoice--registrations

Headers:

x-api-key: {your_access_token}
Content-Type: application/json

Request Body:

json
{
  "customer": {
    "name": "Jane Doe",
    "customer_number": "12345",
    "id_number": "556789-1234",
    "is_person": true,
    "address": {
      "address_line_1": "Business Street 456",
      "zip_code": "54321",
      "city": "Gothenburg"
    },
    "mobile_number": "+46709876543",
    "email": "jane.doe@domain.se"
  },
  "account": "674dbeaf08847b9501cc9132",
  "creditor": "674dbeb208847b9501cc9138",
  "invoice_type": "invoice",
  "invoice_number": "INV-2024-002",
  "reference_number": "REF002",
  "payout_reference": "PAY002",
  "invoice_date": "Wed, 21 Jan 2024 10:11:22 GMT",
  "invoice_delivery_date": "Wed, 21 Jan 2024 10:11:22 GMT",
  "invoice_due_date": "Wed, 31 Jan 2024 10:11:22 GMT",
  "invoice_headline": "Consulting Services",
  "invoice_body_text": "Thank you for your business",
  "currency": "SEK",
  "your_contact": "Contact Person",
  "your_reference": "YOUR-REF-001",
  "our_reference": "OUR-REF-001",
  "debt_description": "Professional consulting services",
  "matrix": [
    {
      "article_description": "Consulting hours",
      "unit_price": 500,
      "total_price_excluding_vat": 500,
      "unit_vat_percent": "0%"
    }
  ]
}

Response Code: 201 Created

Response Body:

json
{
  "_updated": "Fri, 04 Jul 2025 08:20:41 GMT",
  "_created": "Fri, 04 Jul 2025 08:20:41 GMT",
  "_etag": "62d5a25b98fa0523ac22e81c09eb1f78d3a1dab9",
  "_id": "68678ed98d8dc95ece12793f",
  "_status": "OK",
  "_invoice": "68678ed98d8dc95ece12793f",
  "_case": "68678eda88b9226bb78d7169",
  "_ocr_number": "68678eda8d8dc95ece127944",
  "ocr_number_ocr": "20251855102634171529"
}

Parameters

Request Body Properties

PropertyTypeRequiredDescription
accountstringYesAccount ID
creditorstringYesCreditor ID
customerobjectYesCustomer information
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 (RFC 1123 format)
invoice_due_datestringYesDue date for payment (RFC 1123 format)
invoice_delivery_datestringNoDate invoice was delivered (RFC 1123 format)
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
your_additional_referencestringNoAdditional reference field
order_referencestringNoOrder reference
contract_referencestringNoContract reference
debt_descriptionstringNoDescription of the debt
letter_templatestringNoLetter template (deprecated 2025-06-13, no longer required)
custom_column_headlinesarrayNoCustom column headers for matrix items
matrixarrayYesArray of invoice line items
preferred_invoice_distributionstringNoPreferred distribution method*
case_settingsobjectNoCase-specific settings
labelsarrayNoArray of label strings for categorization
file_import_reportobjectNoFile import metadata (readonly)
start_flowbooleanNoWhether to start the case flow immediately

Customer Properties

PropertyTypeRequiredDescription
namestringYesCustomer's full name
customer_numberstringNoCustomer's reference number
id_numberstringNo**Personal ID or organization number (optional at registration)
is_personbooleanNo***Whether the customer is a Swedish person (excludes is_company, is_foreign)
is_companybooleanNo***Whether the customer is a Swedish company (excludes is_person, is_foreign)
is_foreignbooleanNo***Whether the customer is foreign (excludes is_person, is_company)
addressobjectNoCustomer's address information
mobile_numberstringNoContact phone number
emailstringNoContact email address
car_registrationobjectNoCar registration details (excludes customer_number)

Car Registration Properties

PropertyTypeRequiredDescription
numberstringYesCar registration number
countrystringNoCountry of the car (defaults to "SE")
ownership_datestringNoDate for ownership check (RFC 1123 format, defaults to invoice_date)

Address Properties

PropertyTypeRequiredDescription
address_line_1stringNoPrimary address line
address_line_2stringNoSecondary address line
address_line_3stringNoTertiary address line
zip_codestringNoPostal code
citystringNoCity name
countrystringNoCountry code in ISO 3166-1 alpha-2 format (e.g. "SE")
glnstringNoGlobal Location Number

Matrix Item Properties

PropertyTypeRequiredDescription
article_numberstringNoArticle identifier
article_descriptionstringYesDescription of the item
unit_pricenumberNoPrice per unit
number_of_unitsnumberNoNumber of units
total_price_excluding_vatnumberYesTotal amount before VAT
unit_vat_percentstringNoVAT percentage (e.g. "25%", "12%", "6%", "0%"), defaults to "25%"
is_discountbooleanNoDiscount flag (not shown on invoice)
cost_centerstringNoCost center (not shown on invoice)
article_datestringNoArticle acquisition date (RFC 1123 format, not shown on invoice)
order_line_referencestringNoLinks to purchase order line
custom_column_dataarrayNoArray of custom column data strings
extra_rowsarrayNoArray of extra row strings

Response Properties

PropertyTypeRequiredDescription
_idstringYesUnique identifier for the registration
_createdstringYesCreation timestamp
_updatedstringYesLast update timestamp
_etagstringYesEntity tag for concurrency control
_statusstringYesRequest status (e.g. "OK")*
_invoicestringYesID of created invoice
_casestringYesID of associated case
_ocr_numberstringYesID of OCR number
ocr_number_ocrstringYesOCR number for payment reference

*) For complete list of values and details, please see Invoice Registration **) Optional at registration, but required for enforcement services ***) One of is_person, is_company, or is_foreign should be specified to indicate customer type