POST
/
events
/
query
curl --request POST \
  --url https://api.cloud.flexprice.io/v1/events/query \
  --header 'Content-Type: */*' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "end_time": "2024-12-09T00:00:00Z",
  "event_id": "<string>",
  "event_name": "<string>",
  "external_customer_id": "<string>",
  "iter_first_key": "<string>",
  "iter_last_key": "<string>",
  "offset": 123,
  "page_size": 123,
  "property_filters": {},
  "source": "<string>",
  "start_time": "2024-11-09T00:00:00Z"
}'
{
  "events": [
    {
      "customer_id": "<string>",
      "environment_id": "<string>",
      "event_name": "<string>",
      "external_customer_id": "<string>",
      "id": "<string>",
      "properties": {},
      "source": "<string>",
      "timestamp": "<string>"
    }
  ],
  "has_more": true,
  "iter_first_key": "<string>",
  "iter_last_key": "<string>",
  "offset": 123,
  "total_count": 123
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

*/*
Request body
end_time
string

End time of the events to be fetched in ISO 8601 format Defaults to now if not provided

Example:

"2024-12-09T00:00:00Z"

event_id
string

Event ID is the idempotency key for the event

event_name
string

Event name / Unique identifier for the event in your system

external_customer_id
string

Customer ID in your system that was sent with the event

iter_first_key
string

First key to iterate over the events

iter_last_key
string

Last key to iterate over the events

offset
integer

Offset to fetch the events and is set to 0 by default

page_size
integer

Page size to fetch the events and is set to 50 by default

property_filters
object

Property filters to filter the events by the keys in properties field of the event

source
string

Source to filter the events by the source

start_time
string

Start time of the events to be fetched in ISO 8601 format Defaults to last 7 days from now if not provided

Example:

"2024-11-09T00:00:00Z"

Response

200
application/json
OK
events
object[]
has_more
boolean
iter_first_key
string
iter_last_key
string
offset
integer
total_count
integer