Методы для управления финансовыми транзакциями (операциями) организации.
Возвращает список транзакций с пагинацией и фильтрацией.
{
"status": true,
"message": "Transactions retrieved successfully",
"data": {
"transactions": [
{
"id": "a00e8400-e29b-41d4-a716-446655440100",
"base_amount": 10000,
"currency": "RUB",
"direction": "income",
"status": "completed",
"comment": "Оплата по счёту #123",
"reverse_to": null,
"created_at": "2026-06-14T12:00:00Z",
"metadata": null,
"employee_id": "a00e8400-e29b-41d4-a716-446655440150",
"employee_first_name": "Иван",
"employee_last_name": "Петров",
"category_id": "b00e8400-e29b-41d4-a716-446655440050",
"category_name": "Продажи"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"pages": 1
}
},
"meta": {
"timestamp": "2026-06-14T12:00:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/fm/transactions",
"method": "GET"
}
}Создаёт новую финансовую транзакцию.
{
"status": true,
"message": "Transaction created successfully",
"data": {
"id": "a00e8400-e29b-41d4-a716-446655440101",
"base_amount": 5000,
"currency": "RUB",
"direction": "expense",
"status": "pending",
"comment": "Закупка материалов",
"reverse_to": null,
"created_at": "2026-06-14T12:05:00Z",
"metadata": null,
"employee_id": null,
"employee_first_name": null,
"employee_last_name": null,
"category_id": null,
"category_name": null
},
"meta": {
"timestamp": "2026-06-14T12:05:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/fm/transactions",
"method": "POST"
}
}Возвращает детальную информацию о транзакции.
{
"status": true,
"message": "Transaction retrieved successfully",
"data": {
"id": "a00e8400-e29b-41d4-a716-446655440100",
"base_amount": 10000,
"currency": "RUB",
"direction": "income",
"status": "completed",
"comment": "Оплата по счёту #123",
"reverse_to": null,
"created_at": "2026-06-14T12:00:00Z",
"metadata": null,
"employee_id": "a00e8400-e29b-41d4-a716-446655440150",
"employee_first_name": "Иван",
"employee_last_name": "Петров",
"category_id": "b00e8400-e29b-41d4-a716-446655440050",
"category_name": "Продажи"
},
"meta": {
"timestamp": "2026-06-14T12:00:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/fm/transactions/...",
"method": "GET"
}
}Создаёт обратную транзакцию (сторно) для отмены существующей.
{
"status": true,
"message": "Transaction reversed successfully",
"data": {
"id": "a00e8400-e29b-41d4-a716-446655440102",
"base_amount": 10000,
"currency": "RUB",
"direction": "expense",
"status": "completed",
"comment": "Сторно транзакции a00e8400-e29b-41d4-a716-446655440100",
"reverse_to": "a00e8400-e29b-41d4-a716-446655440100",
"created_at": "2026-06-14T12:10:00Z",
"metadata": null,
"employee_id": "a00e8400-e29b-41d4-a716-446655440150",
"employee_first_name": "Иван",
"employee_last_name": "Петров",
"category_id": "b00e8400-e29b-41d4-a716-446655440050",
"category_name": "Продажи"
},
"meta": {
"timestamp": "2026-06-14T12:10:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/fm/transactions/.../reverse",
"method": "POST"
}
}