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
GET /creditor--creditings- List all credits (paginated)GET /creditor--creditings/{id}- Get a specific creditPOST /creditor--creditings- Create a credit request
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/jsonRequest 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
| Property | Type | Required | Description |
|---|---|---|---|
account | string | Yes | Account ID |
creditor | string | Yes | Creditor ID |
case | string | Yes | Case ID to credit |
currency | string | Yes | Currency code (currently only "SEK" supported) |
amount | number | Yes | Amount to credit |
origin | string | Yes | Origin of request (must be "creditor_system")* |
Response Properties
| Property | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | Unique identifier for the credit |
_created | string | Yes | Creation timestamp |
_updated | string | Yes | Last update timestamp |
_etag | string | Yes | Entity tag for concurrency control |
_status | string | Yes | Request status (e.g. "OK")* |
_payment_status | string | Yes | Credit process status (e.g. "completed")* |
*) For complete list of values and details, please see Creditor Crediting
