Import & Export via API
Fynex provides API endpoints for bulk importing accounts into your portfolio and exporting data for external reporting or analysis.
Importing Accounts
Send a JSON array of accounts to the import endpoint. Each account can include contact information, balances, and external identifiers.
Request
curl -X POST https://api.fynex.solutions/api/v1/import \
-H "X-API-Key: fynex_k_abc123..." \
-H "Content-Type: application/json" \
-d '{
"accounts": [
{
"contact": { "name": "María García", "phone": "+5491155551234" },
"total_amount": 45000,
"external_id": "INV-2026-0042",
"source_system": "SAP",
"due_date": "2026-01-15",
"currency": "ARS",
"notes": "60 days past due, prior arrangement lapsed"
},
{
"contact": { "name": "Carlos López", "phone": "+5491155555678", "email": "[email protected]" },
"total_amount": 12500,
"external_id": "INV-2026-0099",
"source_system": "SAP"
}
]
}'Response
{
"job_id": "imp_a1b2c3d4-...",
"status": "processing",
"total_records": 2
}The import runs asynchronously. Use the job_id to check progress.
Import Fields
| Field | Required | Description |
|---|---|---|
contact.name | Yes | Full name of the primary contact |
total_amount | Yes | Total debt amount |
external_id | No | Your system's unique identifier for this account |
source_system | No | Name of the originating system (e.g., "SAP", "Salesforce") |
contact.phone | No | Phone number in E.164 format |
contact.email | No | Email address |
due_date | No | Original due date (ISO 8601) |
currency | No | Currency code (defaults to organization currency) |
notes | No | Free-text notes attached to the account |
TIP
Provide an external_id for each account. This enables upsert behavior — if an account with the same external_id already exists, it is updated instead of duplicated.
Checking Import Status
curl -H "X-API-Key: fynex_k_abc123..." \
https://api.fynex.solutions/api/v1/import/imp_a1b2c3d4-...{
"job_id": "imp_a1b2c3d4-...",
"status": "completed",
"total_records": 2,
"imported": 2,
"updated": 0,
"errors": []
}Possible statuses: processing, completed, completed_with_errors, failed.
If the status is completed_with_errors, the errors array contains details for each failed record including the row index and reason.
Exporting Accounts
Request an export of your account data in JSON or CSV format, with optional filters.
Request
curl -X POST https://api.fynex.solutions/api/v1/export/accounts \
-H "X-API-Key: fynex_k_abc123..." \
-H "Content-Type: application/json" \
-d '{
"format": "csv",
"filters": {
"status": "active",
"min_amount": 5000,
"days_past_due_min": 30
}
}'Response
For JSON format, the response body contains the account array directly. For CSV format, the response is a downloadable file with Content-Type: text/csv.
Available Filters
| Filter | Type | Description |
|---|---|---|
status | string | Account status (active, resolved, escalated, etc.) |
min_amount | number | Minimum total amount |
max_amount | number | Maximum total amount |
days_past_due_min | number | Minimum days past due |
days_past_due_max | number | Maximum days past due |
campaign_id | string | Only accounts in this campaign |
source_system | string | Only accounts from this source system |
External ID Mapping
The external_id field is the bridge between Fynex and your source system. Use it to:
- Prevent duplicates — Importing with an existing
external_idupdates the record instead of creating a new one (upsert). - Cross-reference — Map Fynex account IDs back to your ERP, CRM, or billing system.
- Reconcile payments — When exporting data, use
external_idto match Fynex payment records with your internal ledger.
WARNING
The external_id must be unique within your organization. If two records in the same import batch share an external_id, only the last one is kept.
Required Scopes
| Operation | Required API Key Scope |
|---|---|
| Import | import |
| Check status | import |
| Export | export |
See the API Keys guide for instructions on creating keys with specific scopes.