Overview
The MovimientoCapital API manages financial transactions for advertising campaigns, tracking deposits, withdrawals, and accumulated balances for clients participating in campaigns.
The MovimientoCapital Object
Unique identifier for the capital movement transaction
Foreign key reference to the advertising campaign (CampanaPublicitaria)
Transaction type identifier:
1 - Deposit/Credit
2 - Withdrawal/Debit
3 - Refund
4 - Adjustment
Brief description of the transaction (max 10 characters)
Foreign key reference to the client making the transaction
Date when the transaction occurred (YYYY-MM-DD format)
Transaction amount in USD
Cumulative balance after this transaction
Foreign key reference to the city where the transaction was processed
Foreign key reference to the country where the transaction was processed
Transaction status:
0 - Cancelled
1 - Active/Completed
2 - Pending
3 - Failed
Create Capital Movement
curl -X POST https://api.restapi.com/movimiento-capital \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"id_campana": 15,
"tipo_transaccion": 1,
"descripcion": "Deposit",
"id_cliente": 42,
"fecha_transaccion": "2026-03-09",
"monto_transaccion": 1500.00,
"saldo_acumulado": 1500.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
}'
{
"id_saldo": 123,
"id_campana": 15,
"tipo_transaccion": 1,
"descripcion": "Deposit",
"id_cliente": 42,
"fecha_transaccion": "2026-03-09",
"monto_transaccion": 1500.00,
"saldo_acumulado": 1500.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
}
Campaign ID for which the transaction is being recorded
Type of transaction (1: Deposit, 2: Withdrawal, 3: Refund, 4: Adjustment)
Short description of the transaction (max 10 characters)
Client ID associated with this transaction
Transaction date in YYYY-MM-DD format
Transaction amount (positive for deposits, negative for withdrawals)
Running balance after applying this transaction
City ID where the transaction occurred
Country ID where the transaction occurred
Transaction status (0: Cancelled, 1: Active, 2: Pending, 3: Failed)
Get Capital Movement
curl -X GET https://api.restapi.com/movimiento-capital/123 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id_saldo": 123,
"id_campana": 15,
"tipo_transaccion": 1,
"descripcion": "Deposit",
"id_cliente": 42,
"fecha_transaccion": "2026-03-09",
"monto_transaccion": 1500.00,
"saldo_acumulado": 1500.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
}
List Capital Movements
curl -X GET https://api.restapi.com/movimiento-capital?id_campana=15&limit=50 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id_saldo": 123,
"id_campana": 15,
"tipo_transaccion": 1,
"descripcion": "Deposit",
"id_cliente": 42,
"fecha_transaccion": "2026-03-09",
"monto_transaccion": 1500.00,
"saldo_acumulado": 1500.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
},
{
"id_saldo": 124,
"id_campana": 15,
"tipo_transaccion": 2,
"descripcion": "Withdrawal",
"id_cliente": 42,
"fecha_transaccion": "2026-03-10",
"monto_transaccion": -500.00,
"saldo_acumulado": 1000.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
}
],
"total": 2,
"page": 1,
"limit": 50
}
Filter transactions by campaign ID
Filter transactions by client ID
Filter by transaction type
Filter transactions from this date onwards (YYYY-MM-DD)
Filter transactions up to this date (YYYY-MM-DD)
Number of records to return per page
Page number for pagination
Update Capital Movement
curl -X PUT https://api.restapi.com/movimiento-capital/123 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"descripcion": "Updated",
"estado": 1
}'
{
"id_saldo": 123,
"id_campana": 15,
"tipo_transaccion": 1,
"descripcion": "Updated",
"id_cliente": 42,
"fecha_transaccion": "2026-03-09",
"monto_transaccion": 1500.00,
"saldo_acumulado": 1500.00,
"id_ciudad": 1,
"id_pais": 1,
"estado": 1
}
Delete Capital Movement
curl -X DELETE https://api.restapi.com/movimiento-capital/123 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"message": "Capital movement deleted successfully",
"id_saldo": 123
}
Get Campaign Balance
Retrieve the current accumulated balance for a specific campaign.
curl -X GET https://api.restapi.com/movimiento-capital/campana/15/balance \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id_campana": 15,
"saldo_actual": 3750.50,
"total_depositos": 5000.00,
"total_retiros": 1249.50,
"total_transacciones": 8,
"ultima_transaccion": "2026-03-09"
}