Case
Access cases in the Amili system. Cases represent collection matters with associated invoices, customer information, and status tracking.
Case Management endpoints
GET /cases- List all cases (paginated)GET /cases/{caseId}- Get a specific case
See Case Registration and Invoice Registration for case creation.
Example Request
Below is an example of retrieving a specific case. Other operations follow similar request/response patterns with the same data structure.
URL: GET /cases/6867da7788b9226bb78d716c
Headers:
x-api-key: {your_access_token}
Content-Type: application/jsonRequest Body: None (GET request)
Response Code: 200 OK
Response Body:
json
{
"_id": "6867da7788b9226bb78d716c",
"debt": {
"invoice_number": "103118",
"debt_reference": "1031186",
"payout_reference": "1031186",
"invoice_date": "Tue, 25 Jun 2025 00:00:00 GMT",
"invoice_due_days_after_invoice_date": 30,
"interest_days_after_invoice_date": 30,
"initial_capital": 300.0,
"capital_to_claim": 300.0,
"debt_description": "Services"
},
"creditor": "671a133fc9e282cfad3ffeb6",
"_created": "Mon, 30 Aug 2025 07:06:05 GMT",
"_etag": "e291a3c19b834a11960187af",
"_updated": "Mon, 30 Aug 2025 07:06:05 GMT",
"agreement_version": "60e7fdefc90dc3e2ddd6c7ac",
"case_registration": "60e7fdefc90dc3e2ddd6c7ad",
"case_settings": {
"interest_rate": {
"reference_rate": true
}
},
"creditor_name": "Integration team AB",
"currency": "SEK",
"customer": "60e7fdefc90dc3e2ddd6c7ae",
"customer_id_number": "7766554433",
"customer_name": "Integration team",
"customer_number": "12345",
"customer_status": "initialized",
"latest_state_date": "Mon, 30 Aug 2025 07:06:05 GMT",
"local_added_capital_amount": 300.0,
"local_added_costs_amount": 0,
"local_added_interest_amount": 0.0,
"local_added_transaction_amount": 300.0,
"local_remaining_capital_amount": 300.0,
"local_remaining_costs_amount": 0,
"local_remaining_interest_amount": 0.0,
"local_remaining_transaction_amount": 300.0,
"state": "initializing",
"state_history": [
{
"state": "initializing",
"status_date": "Mon, 30 Aug 2025 07:06:05 GMT"
}
],
"status": "initialized",
"status_history": [
{
"status": "initializing",
"status_date": "Mon, 30 Aug 2025 07:06:05 GMT"
},
{
"status": "initialized",
"status_date": "Mon, 30 Aug 2025 07:07:07 GMT"
}
],
"total_added_capital_amount": 300.0,
"total_added_costs_amount": 0,
"total_added_interest_amount": 0.0,
"total_added_transaction_amount": 300.0,
"total_remaining_capital_amount": 300.0,
"total_remaining_costs_amount": 0,
"total_remaining_interest_amount": 0.0,
"total_remaining_transaction_amount": 300.0,
"transactions": [
{
"bank_transaction_date": "Tue, 25 Jun 2025 00:00:00 GMT",
"registration_date": "Mon, 30 Aug 2025 07:06:05 GMT",
"origin": "creditor_system",
"type": "capital",
"description_locale_tag": "api.transaction.case_registration",
"amount": 300.0
}
],
"reference_number": "123456",
"original_invoice": {
"id": "8be4d5fc86d77d226b0f83f8593de423",
"filename": "original_invoice.pdf",
"content_type": "application/pdf",
"size": 358131
}
}Parameters
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | The unique identifier of the case |
Response Properties
| Property | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | Unique identifier for the case |
_created | string | Yes | Creation timestamp |
_updated | string | Yes | Last update timestamp |
_etag | string | Yes | Entity tag for concurrency control |
creditor | string | Yes | Creditor ID |
creditor_name | string | Yes | Name of the creditor |
customer | string | Yes | Customer ID |
customer_name | string | Yes | Name of the customer |
customer_id_number | string | Yes | Customer's personal ID or organization number |
customer_number | string | No | Customer's reference number |
customer_status | string | Yes | Current customer status (e.g. "initialized")* |
reference_number | string | No | Reference number from creditor |
currency | string | Yes | Currency code (e.g. "SEK") |
state | string | Yes | Current state (e.g. "initializing")* |
state_history | array | Yes | History of state changes |
status | string | Yes | Current status (e.g. "initialized")* |
status_history | array | Yes | History of status changes |
latest_state_date | string | Yes | Timestamp of latest state change |
agreement_version | string | Yes | Agreement version ID |
case_registration | string | Yes | Case registration ID |
case_settings | object | Yes | Case specific settings |
debt | object | Yes | Debt information |
transactions | array | Yes | List of transactions |
total_added_capital_amount | number | Yes | Total capital amount added |
total_added_costs_amount | number | Yes | Total costs amount added |
total_added_interest_amount | number | Yes | Total interest amount added |
total_added_transaction_amount | number | Yes | Total transaction amount added |
total_remaining_capital_amount | number | Yes | Remaining capital amount |
total_remaining_costs_amount | number | Yes | Remaining costs amount |
total_remaining_interest_amount | number | Yes | Remaining interest amount |
total_remaining_transaction_amount | number | Yes | Remaining transaction amount |
local_added_capital_amount | number | Yes | Capital amount added in local currency |
local_added_costs_amount | number | Yes | Costs amount added in local currency |
local_added_interest_amount | number | Yes | Interest amount added in local currency |
local_added_transaction_amount | number | Yes | Transaction amount added in local currency |
local_remaining_capital_amount | number | Yes | Remaining capital amount in local currency |
local_remaining_costs_amount | number | Yes | Remaining costs amount in local currency |
local_remaining_interest_amount | number | Yes | Remaining interest amount in local currency |
local_remaining_transaction_amount | number | Yes | Remaining transaction amount in local currency |
original_invoice | object | No | Original invoice document information |
Debt Properties
| Property | Type | Required | Description |
|---|---|---|---|
invoice_number | string | Yes | Invoice number from creditor |
debt_reference | string | No | Reference number for the debt |
payout_reference | string | No | Reference for payout tracking |
invoice_date | string | Yes | Date invoice was issued |
invoice_due_days_after_invoice_date | number | Yes | Days until due date after invoice date |
interest_days_after_invoice_date | number | Yes | Days until interest starts after invoice date |
initial_capital | number | Yes | Initial capital amount |
capital_to_claim | number | Yes | Capital amount to collect |
debt_description | string | Yes | Description of the debt |
Transaction Properties
| Property | Type | Required | Description |
|---|---|---|---|
bank_transaction_date | string | Yes | Date of bank transaction |
registration_date | string | Yes | Date transaction was registered |
origin | string | Yes | Origin of transaction (e.g. "creditor_system")* |
type | string | Yes | Type of transaction (e.g. "capital")* |
description_locale_tag | string | Yes | Localization tag for description |
amount | number | Yes | Transaction amount |
*) For complete list of values and details, please see Case
