For AI agents: markdown of this page — /docs-content-en/entities/crm-tracking/expenses-list.md documentation index — /llms.txt

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
Parameterid (path) Typenumber Requiredyes Default— DescriptionPositive integer source ID from the source list.
Parameterlimit (query) Typenumber Requiredno Default50 DescriptionPage size, an integer from 1 to 500.
Parameteroffset (query) Typenumber Requiredno Default0 DescriptionNumber 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

Terminal
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

Terminal
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
Fieldsuccess Typeboolean Descriptiontrue
Fielddata Typearray DescriptionSource expenses.
Fielddata[].id Typenumber DescriptionExpense ID from this list.
Fielddata[].sourceId Typenumber DescriptionSource ID from the source list.
Fielddata[].dateFrom Typestring DescriptionPeriod start, YYYY-MM-DD.
Fielddata[].dateTo Typestring DescriptionPeriod end, YYYY-MM-DD.
Fielddata[].amount Typenumber DescriptionExpense amount in currency units of currencyId, for example 12.5 is 12.50 dollars for USD.
Fielddata[].currencyId Typestring DescriptionExpense currency code.
Fielddata[].actions Typenumber DescriptionNumber of actions.
Fielddata[].comment Typestring | null DescriptionExpense comment.
Fielddata[].createdTime Typestring | null DescriptionCreation time, if supplied by Bitrix24.
Fieldmeta.limit Typenumber DescriptionRequested page size.
Fieldmeta.offset Typenumber DescriptionNumber 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
HTTP400 CodeINVALID_PARAMS DescriptionInvalid source ID or pagination parameters.
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionAn unsupported parameter, filter, sort, or field selection was supplied.
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the crm scope.
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no configured tokens.
HTTP422 CodeMETHOD_NOT_YET_AVAILABLE DescriptionThe flag is off or the method is not enabled in the account. error.release is crm 26.2100.0.
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 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.

Known specifics

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

See also