# LinkQuill

> Record affiliate sales, invite affiliates and follow your LinkQuill programs' conversions, payouts and revenue.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/linkquill

## Actions

### Approve or reject sale

Approve or reject a pending sale credited to an affiliate.

**Inputs**

- Conversion ID (`conversionId`, text, required): The pending conversion's ID, from List conversions.
- Decision (`status`, text, required): Whether to approve or reject the sale. One of: `approved` (Approve), `rejected` (Reject).
- Reason (`reason`, text): Why, kept with the sale's record.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "id": "conv_xyz789",
      "status": "approved"
    }
  }
}
```

### Create invite link

Make a link that invites people to join one of your affiliate programs.

**Inputs**

- Program (`programId`, text, required): The program the link invites people to. Pick one, or use a program ID from List programs.
- Label (`label`, text): A note to tell this link apart in your dashboard. Affiliates don't see it.
- Most sign-ups (`maxUses`, number): How many people can join with the link, from 1 to 10,000. Leave empty for no limit. From 1 to 10000.
- Expires (`expiresAt`, date and time): When the link stops working. Leave empty for a link that never expires.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "2026-03-06T12:00:00Z",
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "isActive": true,
      "programId": "550e8400-e29b-41d4-a716-446655440000",
      "token": "3f2a9c1b7d4e6f8091a2b3c4d5e6f708",
      "useCount": 0
    }
  }
}
```

### Get analytics

Get your brand's revenue and conversion rate for a period, with your top affiliates.

**Inputs**

- Period (`period`, text): Which recent period to total. LinkQuill uses the last 30 days when empty, and ignores this when From and To are set. One of: `7d` (Last 7 days), `30d` (Last 30 days), `90d` (Last 90 days).
- From (`from`, date): The first day of a custom period. Set To as well.
- To (`to`, date): The last day of a custom period. Set From as well.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "summary": {
        "conversionRate": 2.75,
        "revenue": 28750.0
      },
      "topAffiliates": [
        {
          "conversions": 89,
          "revenue": 7250.0
        }
      ]
    }
  }
}
```

### Get program

Get one affiliate program's commission and payout settings.

**Inputs**

- Program (`programId`, text, required): The program. Pick one, or use a program ID from List programs.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "autoApproveAffiliates": false,
      "commissionType": "percentage",
      "commissionValue": "15",
      "cookieDurationDays": 30,
      "createdAt": "2026-01-15T10:00:00Z",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "isPublic": true,
      "minPayoutAmount": "25",
      "name": "Summer Sale Campaign",
      "payoutFrequency": "monthly",
      "slug": "summer-sale"
    }
  }
}
```

### List affiliates

List the affiliates in your programs, with each one's referral code, tracking link and revenue.

**Inputs**

- Program (`programId`, text): Only affiliates in this program. Leave empty for every program.
- Status (`status`, text): Only affiliates with this status. Leave empty for all. One of: `pending`, `approved`, `rejected`, `suspended`, `left`.
- Page (`page`, number): Which page to read, starting at 1. At least 1.
- Page size (`limit`, number): How many records a page holds, up to 100. LinkQuill uses 25 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "memberships": [
        {
          "affiliate": {
            "displayName": "Jane Creator",
            "id": "aff_def456"
          },
          "membership": {
            "affiliateId": "aff_def456",
            "createdAt": "2026-01-20T08:00:00Z",
            "id": "mem_abc123",
            "programId": "prog_abc123",
            "referralCode": "JANE2026",
            "status": "approved",
            "trackingLink": "https://linkquill.net/r/JANE2026"
          },
          "program": {
            "id": "prog_abc123",
            "name": "Summer Sale Campaign"
          },
          "revenueGenerated": 7250.0
        }
      ],
      "pagination": {
        "hasMore": false,
        "limit": 25,
        "page": 1,
        "total": 1,
        "totalPages": 1
      }
    }
  }
}
```

### List conversions

List the sales credited to your affiliates, one page at a time.

**Inputs**

- Status (`status`, text): Only conversions with this status. Leave empty for all. One of: `pending`, `approved`, `rejected`, `paid`, `refunded`, `disputed`.
- Page (`page`, number): Which page to read, starting at 1. At least 1.
- Page size (`limit`, number): How many records a page holds, up to 100. LinkQuill uses 25 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "conversions": [
        {
          "affiliate": {
            "displayName": "Jane Creator"
          },
          "conversion": {
            "attributionType": "link",
            "commissionAmount": "15.00",
            "createdAt": "2026-03-05T14:30:00Z",
            "externalOrderId": "order-1234",
            "id": "conv_xyz789",
            "membershipId": "mem_abc123",
            "orderAmount": "99.99",
            "programId": "prog_abc123",
            "status": "approved"
          },
          "program": {
            "name": "Summer Sale Campaign"
          }
        }
      ],
      "pagination": {
        "hasMore": false,
        "limit": 25,
        "page": 1,
        "total": 1,
        "totalPages": 1
      }
    }
  }
}
```

### List payouts

List the payouts made to your affiliates, one page at a time.

**Inputs**

- Status (`status`, text): Only payouts with this status. Leave empty for all. One of: `pending`, `awaiting_payment` (Awaiting payment), `processing`, `completed`, `failed`, `payment_failed` (Payment failed), `permanently_failed` (Permanently failed).
- Page (`page`, number): Which page to read, starting at 1. At least 1.
- Page size (`limit`, number): How many records a page holds, up to 100. LinkQuill uses 25 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {
        "hasMore": false,
        "limit": 25,
        "page": 1,
        "total": 1,
        "totalPages": 1
      },
      "payouts": [
        {
          "affiliate": {
            "displayName": "Jane Creator"
          },
          "payout": {
            "affiliateId": "aff_def456",
            "amount": "150.00",
            "createdAt": "2026-03-01T00:00:00Z",
            "currency": "USD",
            "id": "pay_mno345",
            "periodEnd": "2026-02-28T23:59:59Z",
            "periodStart": "2026-02-01T00:00:00Z",
            "status": "completed",
            "stripeTransferId": "tr_abc123"
          }
        }
      ]
    }
  }
}
```

### List programs

List your brand's affiliate programs, one page at a time.

**Inputs**

- Page (`page`, number): Which page to read, starting at 1. At least 1.
- Page size (`limit`, number): How many records a page holds, up to 100. LinkQuill uses 25 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {
        "hasMore": false,
        "limit": 25,
        "page": 1,
        "total": 1,
        "totalPages": 1
      },
      "programs": [
        {
          "commissionType": "percentage",
          "commissionValue": "15",
          "cookieDurationDays": 30,
          "createdAt": "2026-01-15T10:00:00Z",
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "isPublic": true,
          "name": "Summer Sale Campaign",
          "slug": "summer-sale"
        }
      ]
    }
  }
}
```

### Record sale

Credit an affiliate with a sale made outside their tracking link, such as an offline order.

**Inputs**

- Affiliate (`membershipId`, text, required): The affiliate to credit, in their program. Pick one, or use a membership ID from List affiliates.
- Order ID (`orderId`, text, required): Your order number. Each one can be recorded only once.
- Order amount (`orderAmount`, number, required): The order total in dollars. LinkQuill works out the commission.
- Currency (`currency`, text): The three-letter currency code, such as USD. LinkQuill uses USD when empty.
- Notes (`notes`, text): A note about the sale.

**Outputs**

- `data` (object): The response from LinkQuill.

**Example output**

```json
{
  "data": {
    "data": {
      "attributionType": "manual",
      "commissionAmount": "15.00",
      "createdAt": "2026-03-06T12:00:00Z",
      "externalOrderId": "order-1234",
      "id": "conv_new123",
      "membershipId": "550e8400-e29b-41d4-a716-446655440000",
      "orderAmount": "99.99",
      "status": "approved"
    }
  }
}
```
