Retrieving events
https://app.iteras.dk/api/events/
The /api/events/ endpoint enables you to retrieve raw data and associated new state for the changes that happen in Iteras.
Changes in Iteras produce events - a customer is created, an
address is updated, a subscription changes status. Events exist
for customers, subscriptions, vacations and future changes,
product assignments, invoices, payments and campaigns and more. Each event has a
type, a timestamp and an increasing event_id. Keeping another
system up to date is essentially a matter of
processing the events in order. See the synchronization guide for how to do this.
It is also possible to receive the raw event data as the events happen, by setting up event webhooks. Using a webhook reduces the latency, as Iteras pushes the event data immediately to your server - but that of course requires you to have a server set up to receive the data, whereas you can call this endpoint at your leisure.
Using events
In some cases, you want to learn about what's happening. The attributes on the events describe that. Much of that is internal to Iteras, though.
In many cases, what you really want to know is the new state of the changed object, e.g. the customer or a subscription. Instead of having to go through the customer data API to retrieve that information immediately afterwards, you can pass a prefetch parameter. Then Iteras will the attach the information about the concerned objects directly.
The prefetched data comes in the same format as when you retrieve customer data to make it trivial to use the same code to update a system whether the data comes from events or from the customer data API.
There are many events in Iteras, so use filtering to get only those you're interested in.
Calling the endpoint
Parameters
All parameters are optional.
-
event_id stringID of a specific event, e.g.
?event_id=462416. -
customer stringEvents for a specific customer with the provided customer ID, e.g.
?customer=9224437. -
types stringEvents with the requested event types, repeating the parameter for each type, e.g.
?types=customer:created&types=customer:deleted. The available types are listed under available event types. -
created_before dateE.g.
?created_before=2026-10-09(the date inclusive). -
created_after dateE.g.
?created_after=2026-09-09(the date inclusive). -
created_before_id stringEvents created before the event with the given ID, e.g.
?created_before_id=63524(the event with ID not included). -
created_after_id stringEvents created after the event with the given ID, e.g.
?created_after_id=63524(the event with ID not included). -
max_results integer Defaults to
10000How many events to retrieve at most, e.g.max_results=1000. If there are more results available, anext_urlis returned which you can use to grab the next page. -
prefetch string
A list of prefetch settings for each event type to return in the JSON. Each prefetch setting in the list should consist of three parts separated by colon: the event object type, the type of setting and the value of the setting, e.g.
?prefetch=customer:fields:data,subscriptions. The default is that no prefetching is done.For the events available through this API except the campaign events, the fields available for prefetch are related to the customer of the event. The available fields are the same as the ones you can fetch for customers via
/api/customers/. E.g. when fetching payment events, the prefetch options are based on the customer data, so that to prefetch customers, their subscriptions and payments the prefetch settings could bepayment:fields:data,subscriptions,payments. To prefetch only the subscription, payment or invoice related to the event, you can add the settingsubscription:single_subscription:true,payment:single_payment:trueorinvoice:single_invoice:trueto the list of settings.-
customer:fields:subscriptionsPrefetch a list of subscriptions for the prefetched customers.
-
subscription:fields:dataFetch related customer data for each subscription event.
-
subscription:fields:subscriptions.beginFetch related customer subscription data for each subscription event.
-
campaign:fields:dataFetch related campaign data for each campaign event.
-
payment:fields:data,subscriptions,paymentsFetch all subscriptions and payment data for the related customer for each payment event.
-
invoice:fields:data,invoicesFetch related customer invoices for each invoice event.
-
subscription:single_subscription:trueFetch only subscription data for the event subscription for the related customer prefetch data.
-
payment:single_payment:trueFetch only payment data for the event payments for the related customer prefetch data.
-
invoice:single_invoice:trueFetch only invoice data for the event invoice for the related customer prefetch data.
-
A customer or event_id that does not exist returns a plain text
HTTP 404 error. A non-numeric created_after_id/created_before_id,
an unavailable types value or a malformed prefetch returns a plain
text HTTP 400 error.
Return value
The data returned is an object with an array of event information (possibly empty array). The events will be sorted with the oldest event first.
Note that the content depends on the type of the event. Common for all event types are the fields event_id, timestamp and event.
GET /api/events/?created_after_id=6789&types=customer:created&types=payment:created&prefetch=customer:fields:data&prefetch=payment:fields:data&prefetch=payment:single_payment:true{
"events": [
{
"event_id": "6791",
"timestamp": "2026-10-08T01:38:08",
"event": "customer:created",
"via": "administration",
"customer_id": "4560",
"data": {
"name": "Arnold Smith",
"email": "a@smith.com",
"company": "Big Business Corp."
},
"prefetch": {
"customers": [
{
"id": "4560",
"name": "Arnold Smith",
"company": "Big Business Corp.",
"email": "a@smith.com"
}
]
},
},
{
"event_id": "6790",
"timestamp": "2026-10-07T01:38:08",
"event": "payment:created",
"amount": 5.0,
"method": "manual",
"payment_id": "1186",
"currency": "DKK",
"invoice_type": "invoice",
"invoice": 1004,
"customer_id": "3256",
"prefetch": {
"customers": [
{
"id": "3256",
"name": "Maggie Johnson",
"company": "",
"email": "maggie@example.com",
"payments": [
{
"id": "1186",
"amount": 5.0,
"currency": "DKK",
"business_entity": "TinyCorp"
}
]
}
]
}
}
]
}Available event types
Customers
customer:created
customer:updated - Customer data changed
customer:deleted - Deleted, merged, or removed due to inactivity
customer:password-reset-requested
customer:onetime-password-requested
customer:added-internal-note
Subscriptions
subscription:created
subscription:updated - Subscription data changed
subscription:changed-status - Cancelled, expired, suspended, activated, or products changed
subscription:changed-campaign - Subscription switched to new campaign on a new period
subscription:renewed - Renewed or restarted
subscription:changed-period - Period updated - marked as invoiced, uninvoiced, for reinvoicing
subscription:registered-campaign-change - Future campaign change scheduled
subscription:registered-stop - Future stop scheduled
subscription:cancelled-stop - Previously registered stop undone
Overrides
customeroverride:created - Vacation, future change, pause, or similar
customeroverride:updated
customeroverride:ended - Pause or suspension ended
Product assignments
customer-product-assignment:created
customer-product-assignment:updated
customer-product-assignment:cancelled
Campaigns
campaign:created
campaign:updated
Invoices
invoice:invoiced - An amount is invoiced or a reminder issued
invoice:updated - Details changed, or delivery cancelled, postponed, resent, or sent now
invoice:delivery-failed
Payments
payment:created - Payment or refund registered
payment:allocated - Applied to invoices, refunds, or charged as income
Errors
error:webhook
error:dao
error:universaldistribution
error:dimaps
error:podio
error:pingen
error:mailchimp
error:activecampaign
error:magento
error:bank
error:bank-unmatched-payments
error:peppol
error:maventa
error:external-email-server
error:invalid-address:bs
error:invalid-address:pingen
error:invalid-email
error:email-delivery
error:backup