Polling for Events

Event types, acknowledgment semantics, and how to poll the Adapter Gateway reliably.

The Adapter Gateway makes work available to your adapter as events. Your adapter polls GET /external/events and processes each returned event.

Event types

eventTypeWhen it firesWhat to do
SUBMIT_EVENTA PDX user (or auto-submit) submitted products to your channelFetch the submission data, deliver it, report status — see Fetching Submission Data
AUTHENTICATION_EVENTA PDX user connected or re-validated an account on your channelValidate the credentials against the target system and report the result via POST /external/authentication
CLIENT_CHANNEL_DELETED_EVENTA PDX client's connection to your channel was deletedClean up any per-client state your adapter or the target system holds

Each event carries eventId, created, clientId, channelId, eventType, acknowledged, and a type-specific data payload (for SUBMIT_EVENT, this includes the submissionId you need for all follow-up calls).

The events endpoint

GET /external/events?limit=10
ParameterDefaultMeaning
typeall typesFilter to a single event type
channelIdall your channelsFilter to one channel
clientIdall clientsFilter to one PDX client
limit10Max events per response; maximum allowed is 100
startingAfterAn eventId; returns only events created after that event
autoAcktrueAcknowledge all returned events as part of the read
returnAckfalseAlso include already-acknowledged events in the response

Events are returned oldest first. Events are retained for 30 days after creation, acknowledged or not; do not treat the event stream as a permanent audit log.

Acknowledgment

With the default autoAck=true, events are acknowledged as part of the poll: each poll returns the batch of new events, and the next poll returns only what arrived since. This is the standard pattern — it is also how the Adapter SDK consumes events — and the recommended starting point. Because an event returned to you will not be returned again, make sure your adapter processes every event of a fetched batch, and design processing so a batch can be safely reprocessed if your adapter restarts mid-way.

Manual acknowledgment

For finer-grained control, poll with autoAck=false and acknowledge each event individually after processing it:

PUT /external/events/{eventId}

Unacknowledged events are returned again on every poll (with the default returnAck=false) until they are acknowledged, so events are never dropped if the adapter fails mid-batch. The flip side is that processing must be idempotent — you may see the same event more than once, so make delivery to the target system safe to repeat (for example, key it on submissionId).

Polling cadence

There is no server-side push, long-polling, or webhook mechanism; the polling interval is yours to choose. As a starting point:

  • Poll every 30–60 seconds for production adapters. Submissions are not latency-sensitive at sub-second granularity, and PDX users see submission progress through the status you report, not through polling speed.
  • Use limit=100 and loop until you receive an empty (or short) page when draining a backlog.
  • Add jitter and back off on errors — on 5xx responses, wait before retrying rather than tight-looping.

Pagination

startingAfter is a cursor based on the event's creation time: pass the last eventId of the previous page to get the next page. For normal operation you rarely need it — polling with a limit naturally pages through the backlog as events are acknowledged. Use startingAfter together with returnAck=true when you need to re-read history, for example when backfilling after a bug.


Did this page help you?