transactions

finance

Financial transaction record representing a money movement (deposit, withdrawal, transfer, payment). Tracks transaction amount, type, status, currency, and timestamp for accounting and financial tracking.

Request Builder

https://api.mockly.codes/transactions?page=1&limit=10&count=10

Configure your request and click Send Request to see the response here.

Endpoints

GET/transactions

Get a collection of transactions

Alternative: /finance/transactions
GET/transactions/:id

Get a single transaction by ID

Alternative: /finance/transactions/:id
GET/transactions/meta

Get resource metadata and schema

Alternative: /finance/transactions/meta

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/transactions?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/transactions?q=laptop&search_fields=name,description

Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

curl "https://api.mockly.codes/transactions?page=1&limit=10&count=10"

Examples reflect your current request builder settings.

Schema Properties

idinteger

Unique identifier for the transaction

Gen:random_int
user_idinteger

Foreign key reference to the user who initiated or is associated with this transaction

Gen:random_int
amountnumber

Transaction amount (positive for credits, negative for debits)

Gen:price
currencystring

ISO currency code for the transaction amount (e.g., USD, EUR, GBP)

Gen:currency
typestring

Transaction type (e.g., deposit, withdrawal, transfer, payment, refund, fee)

Gen:word
statusstring

Transaction status (e.g., pending, completed, failed, cancelled, refunded)

Gen:status
timestampstring

Timestamp when the transaction occurred or was initiated

Gen:past_datedate-time

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request