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
  • Home
    • Welcome to Amili Docs
    • Responsible disclosure
    • Become a partner
  • Debt Collection
    • About the AutoCollect API
    • Getting started with the AutoCollect API
    • Webhooks
    • Example Workflow
    • Batches
      • GetBatchById
      • GetBatchesByOrganization
      • GetBatchById - Legacy (To be removed)
    • Collections
      • AcceptDebtCollectionList
      • RejectDebtCollectionList
      • PauseCase
      • WithdrawCase
      • ResumeCase
    • Correction
      • CreateCorrections
    • Invoice
      • CreateInvoices
      • GetInvoicesByOrganization
      • GetInvoiceById
    • Payment
      • CreatePayments
    • Settlement
      • GetSettlements
      • GetSettlement on Id
    • AutoCollect Legacy API
      • Attachment
        • /webapi/api/Attachment
      • Batch
        • /webapi/api/Batch
        • /webapi/api/Batch
      • Ping
        • /webapi/api/Ping
  • Accounts Receivable
    • Actions
      • POST (create) an action
      • POST (create) a reports action/generate a report
    • ArItems
      • GET a list of AR items
      • PUT (update) ar item details
      • GET one AR item
    • AutoPostings
      • POST (create) one or more auto postings
    • Batches
      • GET one batch
    • ClientConfigs
      • GET a list of client config values
      • GET values for one client config key
    • Codes
      • GET ARM system code values
    • Customers
      • POST (create) one customer
      • PUT (update) one customer
      • GET a list of customers
      • GET one customer
      • DELETE a customer
      • POST (create) a batch of customers
      • PUT (update) a batch of customers
    • DocumentBundles
      • GET a list of document bundles
      • GET one document bundle
    • Documents
      • POST (create) one document
      • GET a list of documents
      • GET one document
      • POST (create) a batch of documents
    • Files
      • GET one or more OS files
      • POST (upload) one or more OS files
      • GET one OS file
    • GlItems
      • Get one GL item
      • GET a list of GL items
    • GlMovements
      • Get movement/balance for the latest closed GL year/period
      • GET a list of GL movements/balances
    • Insights
      • GET a list of ADB intervals
    • LogItems
      • GET one log item
      • GET a list of log items
    • PaymentReservations
      • POST (create) a new payment reservation
    • Health
      • Check API health
  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
Idempotency-KeyUnique 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-20 11:49:34
Previous
Getting started with the AutoCollect API
Next
Example Workflow
Built with