# List sales events

`GET https://api.cademi.com.br/api/v3/sales/events`

Operation ID: `sales_events.list` · API v3

Returns the sales events received from payment gateways.

The raw gateway payload is included only for credentials with the `sales_events.read_payload` permission, and payment and identity document fields are masked.

Required permissions: `sales_events.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `sort` | query | string, one of `id`, `-id` | no |  |
| `gateway` | query | string | no |  |
| `delivery_id` | query | string | no |  |
| `transaction_id` | query | string | no |  |
| `processing` | query | string, one of `queued`, `processed`, `failed`, `ignored` | no |  |
| `status` | query | string | no |  |
| `received_after` | query | string (date-time) | no |  |
| `received_before` | query | string (date-time) | no |  |

## Responses

### 200

Returns the collection of sales events.

Body: `data`: array of SalesEvent.

Fields of SalesEvent:

| Field | Type | Required | Description |
|---|---|---|---|
| `delivery_id` | string or null | yes |  |
| `external_id` | string or null | yes | Identifier of the sale in the gateway. |
| `external_product_id` | string or null | yes | Product code in the gateway, exactly as sent by the gateway. |
| `gateway` | string | yes |  |
| `id` | string | yes | Public ID, with the sev_ prefix. |
| `object` | string, one of `sales_event` | yes |  |
| `payload` | object or null | no | Raw body sent by the gateway, with card and document fields masked. Included only when the credentials have the salesevents.readpayload permission. |
| `processing` | object | yes | Processing state of the event. Processing is asynchronous; this object reports the latest known state. |
| `received_at` | string or null (date-time) | yes |  |
| `status` | string, one of `trial`, `approved`, `canceled`, `refunded`, `past_due`, `awaiting_payment`, `awaiting_review`, `expired`, `abandoned`, `ignored`, `unknown` | yes |  |
| `subscription_external_id` | string or null | yes |  |
| `transaction_id` | string | yes | Public ID of the transaction that groups the events of the same sale or subscription. |
| `user_id` | string or null | yes |  |

### 400

The cursor is invalid or the request contains an unsupported query parameter.

Body: Error.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
