Developer CenterGuidesYour First Submission

    Your First Submission

    This guide uses the endpoints that are currently implemented: direct record ingest, batch status polling, and the file-based upload/process flow.

    1. Create or Retrieve an API Key

    API keys are managed from the dashboard through /api/v1/api-keys with authenticated admin session auth. Keys can be created as live or test.

    2. Submit Records

    curl -X POST https://metro2.switchlabs.dev/api/v1/submit-metro2-data \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "records": [
          {
            "consumer_account_number": "ACCT-001",
            "portfolio_type": "I",
            "account_type": "00",
            "date_opened": "2024-01-15",
            "highest_credit_or_original_loan_amount": 25000,
            "terms_duration": "060",
            "terms_frequency": "M",
            "account_status": "11",
            "current_balance": 18500,
            "date_of_account_info": "2025-03-01",
            "surname": "Smith",
            "first_name": "Jane",
            "ecoa_code": "1",
            "address_1": "123 Main St",
            "city": "Austin",
            "state": "TX",
            "postal_code": "78701",
            "address_indicator": "C",
            "country_code": "US"
          }
        ]
      }'

    Expect 202 when all records are accepted and 207 when part of the batch fails.

    3. Poll Batch Status

    curl https://metro2.switchlabs.dev/api/v1/batch-status/BATCH_ID \
      -H "Authorization: Bearer YOUR_API_KEY"

    4. File-Based Ingest

    1. Call POST /api/v1/files/upload-url to create the file record and signed upload URL.
    2. Upload the bytes directly to the returned storage URL with PUT.
    3. Call POST /api/v1/files/{id}/process to run parsing, validation, and upsert.
    4. Poll GET /api/v1/files/{id}/status until processing completes.

    Useful Follow-Ups