> ## Documentation Index
> Fetch the complete documentation index at: https://abacuslabs.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> Explore ideas and examples of what you can build with the Abacus API

# Examples

Practical examples for common MCA workflows using the Abacus API.

## Create a Deal with a Merchant

```bash theme={null}
# 1. Create the merchant
curl -X POST https://api.abacuslabs.co/v1/merchants \
  -H "Authorization: Bearer mid_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "FastFreight LLC",
    "email": "owner@fastfreight.com",
    "phone": "555-0142"
  }'

# 2. Create a deal linked to the merchant
curl -X POST https://api.abacuslabs.co/v1/deals \
  -H "Authorization: Bearer mid_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "MERCHANT_ID",
    "funded_amount": 50000,
    "payback_amount": 65000,
    "factor_rate": 1.30,
    "funding_method": "ach",
    "payment_frequency": "daily"
  }'
```

## List Funded Deals

```bash theme={null}
curl "https://api.abacuslabs.co/v1/deals?statuses=funded&sort=funded_date:desc" \
  -H "Authorization: Bearer mid_your_api_key"
```

## Get Portfolio Health Reports

```bash theme={null}
# Revenue for this quarter
curl "https://api.abacuslabs.co/v1/reports/revenue?from=2026-01-01&to=2026-03-31&currency=USD" \
  -H "Authorization: Bearer mid_your_api_key"

# Runway estimate
curl "https://api.abacuslabs.co/v1/reports/runway?from=2026-01-01&to=2026-03-31&currency=USD" \
  -H "Authorization: Bearer mid_your_api_key"
```

## Search Across Everything

```bash theme={null}
curl "https://api.abacuslabs.co/v1/search?q=FastFreight&limit=20" \
  -H "Authorization: Bearer mid_your_api_key"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.