---
title: "queryEvents"
method: POST
path: "/v1/integrations/{integrationId}/events"
tags: ["integrations"]
---

# queryEvents

`POST /v1/integrations/{integrationId}/events`

Query events for a specific integration

## Path parameters

- `integrationId` string, uuid, required

## Request body

- QueryEventsRequest
  - `event_id` string — Filter by event ID
  - `event_type` 'CREATE' | 'UPDATE' | 'DELETE' — Filter by event type
  - `correlation_id` string — Filter by correlation ID
  - `object_type` string — Filter by object type
  - `event_name` string — Filter by event name (alias for object_type)
  - `use_case_id` string — Filter by use case ID
  - `limit` integer — Maximum number of results to return
  - `cursor` object — Cursor for pagination. Use the next_cursor from the previous response to get the next page.
    - `event_time` string, date-time — Timestamp from the last event in the previous page
    - `event_id` string — Event ID from the last event in the previous page

## Response `200`

Events queried successfully

- object
  - `data` ErpEvent[] — List of erp events
    - `event_type` 'CREATE' | 'UPDATE' | 'DELETE', required — Type of event (create, update, delete)
    - `object_type` string, required — Type of the object being updated (business_partner, contract_account, etc.). Corresponds to "Event Name" from the integration UI.
    - `timestamp` string, date-time, required — Timestamp when the event occurred
    - `format` 'json' | 'xml', required — Format of the payload data
    - `payload` union, required — The object data payload - can be either a serialized string or a direct JSON object
      - string — The serialized object data payload (JSON, XML, etc.) as a string
      - object — Direct JSON object (will be automatically serialized)
    - `deduplication_id` string — Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.
    - `correlation_id` string — Optional per-event trace id for cross-system tracing (unique per business operation). Overrides the request-level meta.correlation_id for THIS event. When absent, the event inherits the request-level correlation_id; when both are absent, epilot mints its own event_id and the trace is epilot-only. Orthogonal to deduplication_id (idempotency).
    - `use_case_id` string, nullable — Resolved use case ID for the inbound event. Null when no use case matched or for events ingested before this field was introduced. Server-populated only — ignored if supplied on inbound requests.
  - `next_cursor` object, nullable — Cursor to fetch the next page. Null if no more results.
    - `event_time` string, date-time
    - `event_id` string
  - `has_more` boolean — Indicates if more results are available

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `404` — Resource not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/epilot/apis/integration-toolkit-api.md) · [All operations](https://skmtc.net/epilot/apis/integration-toolkit-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/integration-toolkit-api/revisions/c24837d75096/schema)
