## List analytics source expenses

`GET /v1/crm-tracking/sources/:id/expenses`

Lists only manually added expense packs for an analytics source. Expenses from advertising integrations are excluded.

> **The method ships in the `crm 26.2100.0` update and is not yet available on all Bitrix24 accounts.** If the method is not enabled yet, the API returns `422 METHOD_NOT_YET_AVAILABLE`.

Requires the `crm` scope, the `crm-tracking-v3` flag, and the feature enabled in the Bitrix24 account. `READONLY` keys can read this resource.

## Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `id` (path) | number | yes | — | Positive integer source ID from the [source list](/docs/entities/crm-tracking/sources-list). |
| `limit` (query) | number | no | `50` | Page size, an integer from 1 to 500. |
| `offset` (query) | number | no | `0` | Number of records to skip, a nonnegative integer. |

Pagination: each request returns one page without fetching subsequent pages automatically. Increase `offset` by `limit` to request the next page. Expenses appear newest first. Sorting, additional filters, and field selection are not supported.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/expenses?limit=50&offset=0" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/expenses?limit=50&offset=0" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/expenses?limit=50&offset=0', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const result = await res.json()
console.log(result)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/expenses?limit=50&offset=0', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const result = await res.json()
console.log(result)
```

## Response fields

| Field | Type | Description |
|---|---|---|
| `success` | boolean | `true` |
| `data` | array | Source expenses. |
| `data[].id` | number | Expense ID from this list. |
| `data[].sourceId` | number | Source ID from the [source list](/docs/entities/crm-tracking/sources-list). |
| `data[].dateFrom` | string | Period start, `YYYY-MM-DD`. |
| `data[].dateTo` | string | Period end, `YYYY-MM-DD`. |
| `data[].amount` | number | Expense amount in currency units of `currencyId`, for example `12.5` is 12.50 dollars for `USD`. |
| `data[].currencyId` | string | Expense currency code. |
| `data[].actions` | number | Number of actions. |
| `data[].comment` | string \| null | Expense comment. |
| `data[].createdTime` | string \| null | Creation time, if supplied by Bitrix24. |
| `meta.limit` | number | Requested page size. |
| `meta.offset` | number | Number of records to skip. |

The response does not include a total record count.

## Response example

Response shape example.

```json
{
  "success": true,
  "data": [
    {
      "id": 7,
      "sourceId": 2,
      "dateFrom": "2026-10-01",
      "dateTo": "2026-10-07",
      "amount": 12.5,
      "currencyId": "USD",
      "actions": 0,
      "comment": "Campaign",
      "createdTime": null
    }
  ],
  "meta": {
    "limit": 50,
    "offset": 0
  }
}
```

## Error response example

400 — unsupported query parameter:

```json
{
  "success": false,
  "error": {
    "code": "UNKNOWN_FILTER_FIELD",
    "message": "Unknown query parameter"
  }
}
```

## Errors

| HTTP | Code | Description |
|---|---|---|
| 400 | `INVALID_PARAMS` | Invalid source ID or pagination parameters. |
| 400 | `UNKNOWN_FILTER_FIELD` | An unsupported parameter, filter, sort, or field selection was supplied. |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope. |
| 401 | `TOKEN_MISSING` | The key has no configured tokens. |
| 422 | `METHOD_NOT_YET_AVAILABLE` | The flag is off or the method is not enabled in the account. `error.release` is `crm 26.2100.0`. |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 returned an invalid list structure. |

Other Bitrix24 refusal codes, HTTP statuses, and messages are preserved, with secret values removed from text. For common API errors, see [Errors](/docs/errors).

## Known specifics

Amounts and currency pass through from Bitrix24 without conversion. Secret data is removed from text values.

## See also

- [List analytics sources](/docs/entities/crm-tracking/sources-list)
- [Source analytics](/docs/entities/crm-tracking/analytics-sources-list)
