Skip to content

Creditor Crediting

Issue credits to a case in the Amili system. Used by creditors to credit entire cases, complete invoices, or partial invoice amounts.

Creditor Crediting endpoints

See Case for accessing the cases that can be credited.

Example Request

Below is an example of issuing a credit for an existing case.

URL: POST /creditor--creditings

Headers:

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

Request Body:

json
{
  "account": "674dbeaf08847b9501cc9132",
  "creditor": "674dbeb208847b9501cc9138",
  "case": "68678eda88b9226bb78d7169",
  "currency": "SEK",
  "amount": 100.0,
  "origin": "creditor_system"
}

Response Code: 201 Created

Response Body:

json
{
  "_updated": "Fri, 04 Jul 2025 14:35:29 GMT",
  "_created": "Fri, 04 Jul 2025 14:35:29 GMT",
  "_etag": "cab1b340f4ea1bacd8bc83ef46a2b6791d23f227",
  "_id": "6868242274dfc89e00608507",
  "_status": "OK",
  "_payment_status": "completed"
}

Parameters

Request Body Properties

PropertyTypeRequiredDescription
accountstringNo**Account ID (readonly, automatically set from case/creditor)
creditorstringYesCreditor ID
casestringYes*Case ID to credit (mutually exclusive with invoice_number)
invoice_numberstringYes*Invoice number to resolve case (mutually exclusive with case)
currencystringYesCurrency code (currently only "SEK" supported)
amountnumberYesAmount to credit
credit_invoicestringNoCredit invoice ID for traceability
client_registration_datestringNoWhen crediting was performed (RFC 1123 format, defaults to current timestamp)
creditor_referencestringNoReference for crediting tracking
file_import_reportstringNo**File import report ID (readonly, set by system during file imports)
originstringYesOrigin of request (must be "creditor_system")***

Response Properties

PropertyTypeRequiredDescription
_idstringYesUnique identifier for the credit
_createdstringYesCreation timestamp (RFC 1123 format)
_updatedstringYesLast update timestamp (RFC 1123 format)
_etagstringYesEntity tag for concurrency control
_statusstringYesRequest status (e.g. "OK")***
_payment_statusstringYesCredit process status (e.g. "completed")***
settled_amountnumberNoThe amount that was actually settled
statusstringNoProcessing status: "completed", "warning", or "error"
status_reason_localestringNoLocale key for status reason message
case_invoice_numberstringNoInvoice number from the case (projection, not same as input field)
case_reference_numberstringNoCase reference number

*) Either case OR invoice_number must be provided, but not both

**) Readonly fields automatically set by the system

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