# List recent events

GET https://api.oletapp.com/your-store/v1/events

Returns recent events in the same envelope a webhook delivers: `id`, `type`, `created_at`, `truncated` and `data`. Use it to see a sample payload while building an integration, or to catch up after missed deliveries. Events are kept for 30 days.

- Ordering: `order=asc` walks forward with `next_cursor`. `order=desc` returns only the newest events, first page only.
- `data` is the resource as it is now, not as it was when the event happened, and a customer who has opted out of data sharing appears as `{ "id" }` only.
- An event whose resource has since been removed is left out, so a page can hold fewer than `limit` items while `has_more` is still `true`.
- Scopes: each event needs the read scope of its resource (`sales:read`, `customers:read`, `catalog:read` or `inventory:read`). With `type`, a credential without that scope gets `403 INSUFFICIENT_SCOPE`. Without `type`, only events the credential may read are returned, and a credential with none of those scopes gets an empty list.
- `include_deleted` is not applicable and is refused if set.

**Requires scope:** `any`

Required scope: `any`

## Parameters

| Name | In | Type | Required |
|---|---|---|---|
| `limit` | query | integer | no |
| `cursor` | query | string | no |
| `order` | query | "asc" | "desc" | no |
| `include_deleted` | query | "true" | "false" | no |
| `type` | query | "sale.completed" | "sale.refunded" | "customer.created" | "customer.updated" | "customer.deleted" | "product.created" | "product.updated" | "product.deleted" | "inventory.updated" | no |

## Response (200)

```
{
  data: { ... }[]
  has_more: boolean
  next_cursor: string | null
}
```

Errors follow the standard error envelope: https://getolet.com/resources/developers/errors.md

## Example

```bash
curl -X GET "https://api.oletapp.com/your-store/v1/events" \
  -H "Authorization: Bearer olet_live_YOUR_API_KEY"
```
