Filtering
The/api/auth/transactions/
endpoint allows you to filter transactions based on various properties. By applying filters directly in your request URL, you can narrow down results to meet specific criteria
Example:
To retrieve all transactions from the year 2025:/auth/transactions/?created_at__range=2025-01-01,2025-12-31
Available Parameters and Modifiers
Below is the list of parameters and the modifiers you can use for filtering:created_at
created_at
Modifiers: exact, gt, gte, lt, lte, range
Example:
Example:
?created_at__range=2025-01-01,2025-12-31
status
status
Modifiers: exact
Example:
Example:
?status__exact=success
balance_type
balance_type
Modifiers: exact
Example:
Example:
?balance_type__exact=leads_by_icp
amount
amount
Modifiers: exact, gt, gte, lt, lte, range
Examples:
Examples:
?amount__lt=-5
after_balance
after_balance
Modifiers: exact, gt, gte, lt, lte, range
Examples:
Examples:
?after_balance__lte=500
exact
: Matches the exact value (==)gt
: Greater than (>)gte
: Greter than or equal to (>=)lt
: Lower than (<)lte
: Lower than or equal to (<=)range
: Filters values betweenx
andy
(number or date). Syntax:x,y
Date
-
Date: yyyy-mm-dd
Example: 2025-01-01 -
Date and Time: yyyy-mm-ddTHH:MM:SS.ssssss
Example: 2025-01-01T02:03:04.000000
Authorizations
Use 'Token <api-key>' as the value
Query Parameters
Limit of transactions in result
Example:
"100"
Offset in list of transactions
Example:
"0"
Response
200 - application/json
200
Example:
8
Example:
100
Example:
100
Example:
5
Example:
"https://api.generect.com/api/auth/transactions/?amount__lte=-5&created_at__range=2025-01-07T00%3A30%3A00%2C2025-12-31&limit=100"
Example:
[
{
"id": "51a800b8-5c0c-4f0b-9c3c-459ea2a3fad6",
"created_at": "2025-01-07T13:01:15.397996",
"updated_at": "2025-01-07T13:01:58.195959",
"status": "success",
"balance_type": "leads_by_icp",
"amount": -10,
"description": "leads info by ICP",
"after_balance": -2400
},
{
"id": "eaea3124-c337-41f2-9258-4a043a7ea877",
"created_at": "2025-01-07T11:27:54.628500",
"updated_at": "2025-01-07T11:28:40.966949",
"status": "success",
"balance_type": "leads_by_icp",
"amount": -10,
"description": "leads info by ICP",
"after_balance": -2390
},
{
"id": "9f57c8e5-43c6-4baf-9777-7754fe481362",
"created_at": "2025-01-07T00:31:06.785495",
"updated_at": "2025-01-07T00:31:40.788266",
"status": "success",
"balance_type": "leads_by_icp",
"amount": -10,
"description": "leads info by ICP",
"after_balance": -2380
}
]