Amili Docs
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
  1. Debt.collection
  • About the AutoCollect API
  • Getting started with the AutoCollect API
  • Webhooks
  • AutoCollec API
    • Example Workflow
    • Batches
      • GetBatchById
      • GetBatchesByOrganization
    • Invoice
      • CreateInvoices
      • GetInvoicesByOrganization
      • GetInvoiceById
    • Payment
      • CreatePayments
    • Collections
      • AcceptDebtCollectionList
      • AcceptDebtCollectionList
      • RejectDebtCollectionList
      • PauseCase
      • RejectDebtCollectionList
      • WithdrawCase
      • PauseCase
      • ResumeCase
      • WithdrawCase
      • ResumeCase
    • Settlement
      • GetSettlement on Id
      • GetSettlements
      • GetSettlements
      • GetSettlement on Id
  • AutoCollect API (Legacy)
    • Attachment
      • /webapi/api/Attachment
    • Batch
      • /webapi/api/Batch
      • /webapi/api/Batch
    • Ping
      • /webapi/api/Ping
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
  1. Debt.collection

Webhooks

Webhooks allow your system to receive real-time notifications when events occur in our platform.
When an event happens, we send an HTTP POST request to your configured endpoint with a JSON payload describing the event.

Supported Events#

We currently send the following events:
Batch Completed
This event is sent once we are finished processing a batch.
{
  "id": "897e1f80-ceb5-4b58-a2aa-c895aff6ce3e",
  "type": "BATCH_COMPLETED",
  "source": "COLLECTION",
  "timeStamp": "2025-08-15T11:42:00Z", 
  "data": {
    "batchId": "db6a7ff4-3a20-4042-b271-a9485ded6333",
    "organizationId": "db6a7ff4-3a20-4042-b271-a9485ded6334",
    "status": "SUCCESS" // SUCCESS, PARTIAL, FAILED
  }
}
Settlement Created
This event is sent for every new settlement created.
{
  "id": "897e1f80-ceb5-4b58-a2aa-c895aff6ce3e",
  "type": "SETTLEMENT_CREATED",
  "source": "COLLECTION",
  "timeStamp": "2025-08-15T11:42:00Z", 
  "data": {
    "settlementId": "db6a7ff4-3a20-4042-b271-a9485ded6333",
    "organizationId": "db6a7ff4-3a20-4042-b271-a9485ded6334",
    "settlementDate": "2025-08-15",
    "invoiceId": "425284ba-ce41-48cc-9407-f851dccdb8ad",
    "invoiceNumber": "1234567",
    "caseNumber": "1234567"
  }
}
Case Created
This event is sent every time a new case is registered.
{
  "id": "897e1f80-ceb5-4b58-a2aa-c895aff6ce3e",
  "eventType": "CASE",
  "source": "COLLECTION",
  "timeStamp": "2025-08-15T11:42:00Z", 
  "data": {
    "orgId": "db6a7ff4-3a20-4042-b271-a9485ded6334",
    "caseId": "db6a7ff4-3a20-4042-b271-a9485ded6333",
    "caseNumber": "5000001"
    "type": "COLLECTION_NOTICE",
    "status": "OPEN",
    "invoices": [
      	"4a86b85e-a3c3-4299-b9e6-202d1096b990",
        "fc6615cf-2d29-49da-85ec-3af55c805bde"
    ]    
  }
}
Case Updated
This event is sent every time there is a meaningful update on a existing case.
{
  "id": "897e1f80-ceb5-4b58-a2aa-c895aff6ce3e",
  "eventType": "CASE_UPDATED",
  "source": "COLLECTION",
  "timeStamp": "2025-08-15T11:42:00Z", 
  "data": {
    "orgId": "db6a7ff4-3a20-4042-b271-a9485ded6334",
    "caseId": "db6a7ff4-3a20-4042-b271-a9485ded6333",
    "caseNumber": "5000001"
    "type": "COLLECTION_NOTICE",
    "status": "PAUSED",
    "invoices": [
        "4a86b85e-a3c3-4299-b9e6-202d1096b990",
        "fc6615cf-2d29-49da-85ec-3af55c805bde"
    ],
    "fields": ["amounts", "status", "type", "description"]
  }
}

Headers#

Each webhook request contains the following headers:
HeaderDescription
X-Amili-EventSpecifies the type of the event, useful for payload deserialization and routing
IdempotencyKeyUnique key identifying the event delivery, can be used to prevent duplicate processing
X-Amili-Request-IdUnique identifier for the webhook request
X-Webhook-SignatureSignature used to verify the authenticity of the request, see Verifying Signatures for more details

Delivery Semantics#

Webhooks are delivered with at-least-once semantics.
If your endpoint does not return a successful response, we will retry delivery.
We retry up to 10 times
Retries may occur over a period of up to 24 hours
Because retries may occur, your endpoint must handle duplicate deliveries
Use the IdempotencyKey header to ensure each event is processed only once.

Verifying Signatures#

Each webhook request includes a signature in the X-Webhook-Signature header.
This signature allows you to verify that:
the request was sent by our system
the payload has not been modified in transit
You should verify the signature before processing the webhook.
When you receive a webhook you should sign the payload using the HmacSha256 secret provided by us and compare against the signature received in the header.
C# Signature Example:

Configuring Webhooks#

To configure a webhook endpoint for your organization, contact us at: developers@amili.no
Include:
Your application id
Webhook endpoint URL
Which events you want to subscribe to
⚠️ Note: We're currently working on an API/User interface where you as a developer can configure this yourself
Modified at 2026-03-11 12:06:32
Previous
Getting started with the AutoCollect API
Next
AutoCollec API
Built with