Skip to content

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

bash
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

json
{
  "job_id": "imp_a1b2c3d4-...",
  "status": "processing",
  "total_records": 2
}

The import runs asynchronously. Use the job_id to check progress.

Import Fields

FieldRequiredDescription
contact.nameYesFull name of the primary contact
total_amountYesTotal debt amount
external_idNoYour system's unique identifier for this account
source_systemNoName of the originating system (e.g., "SAP", "Salesforce")
contact.phoneNoPhone number in E.164 format
contact.emailNoEmail address
due_dateNoOriginal due date (ISO 8601)
currencyNoCurrency code (defaults to organization currency)
notesNoFree-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

bash
curl -H "X-API-Key: fynex_k_abc123..." \
     https://api.fynex.solutions/api/v1/import/imp_a1b2c3d4-...
json
{
  "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

bash
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

FilterTypeDescription
statusstringAccount status (active, resolved, escalated, etc.)
min_amountnumberMinimum total amount
max_amountnumberMaximum total amount
days_past_due_minnumberMinimum days past due
days_past_due_maxnumberMaximum days past due
campaign_idstringOnly accounts in this campaign
source_systemstringOnly 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_id updates 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_id to 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

OperationRequired API Key Scope
Importimport
Check statusimport
Exportexport

See the API Keys guide for instructions on creating keys with specific scopes.