# Zeffy

> Track fundraising payments, campaigns and contacts in Zeffy.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/zeffy

## Actions

### Create contact

Creates a contact for the authenticated organization. Provide an email, or a first and last name when you have no email. The email must be free: a contact already holding it is a 409, so use PUT /contacts when you want create-or-update instead. Returns the same contact shape as GET /contacts/:id.

**Inputs**

- Email (`email`, text): Required unless both names are provided
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone number (`phone_number`, text): Phone number.
- Address (`address`, object): Address.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "line1": "example",
      "postal_code": "example",
      "state": "example"
    },
    "created": 1.0,
    "currency": "cad",
    "donation_count": 1.0,
    "donor_type": "example",
    "email": "example",
    "first_donation_date": 1.0,
    "first_name": "example",
    "id": "example",
    "last_donation_date": 1.0,
    "last_name": "example",
    "locale": "example",
    "metadata": {},
    "object": "contact",
    "phone_number": "example",
    "total_contribution": 1.0,
    "updated": 1.0
  }
}
```

### Create payment

Records an offline payment (cash, cheque, in-kind, other) on a donation form or ticketing campaign, mirroring the dashboard manual-payment flow. Donation forms take an amount; ticketing campaigns take ticket lines (rate ids from GET /campaigns/:id), with amounts and taxes computed server-side. Required custom questions (`questions` in GET /campaigns/:id) are answered in `answers` (buyer) and `tickets[].attendees` (per ticket), such as a membership's member name and email. Auctions are not supported. The payment source is PublicApi.

**Inputs**

- Campaign (`campaign_id`, text, required): Campaign ID (donation form or ticketing)
- Amount (`amount`, number): Amount in cents. Required for donation form campaigns, not allowed for ticketing campaigns.
- Tickets (`tickets`, list): Ticket lines. Required for ticketing campaigns, not allowed for donation form campaigns.
- Occurrence ID (`occurrence_id`, text): Occurrence to attach the order to; required when the ticketing campaign has several occurrences
- Extra donation (`extra_donation`, number): Extra donation in cents (ticketing campaigns only)
- Answers (`answers`, list): Answers to the campaign's buyer questions (questions[].scope `buyer` in GET /campaigns/:id). Required questions must be answered.
- Payment method (`payment_method`, text): Payment method. One of: `cash`, `cheque`, `in_kind` (In kind), `other`. Default: `cash`.
- Email (`email`, text): Finds or creates the contact by email
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Generate tax receipt (`generate_tax_receipt`, true/false): Generate (and email) the tax receipt. Default: `false`.
- Send confirmation email (`send_confirmation_email`, true/false): Send the buyer the same confirmation email as the dashboard manual flow. Default: `false`.
- Payment date (`payment_date`, date): Valid ISO 8601 calendar date or datetime; backdates the payment (defaults to now)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "amount": 1.0,
    "buyer": {
      "address": {
        "city": "example",
        "country": "example",
        "line1": "example",
        "postal_code": "example",
        "state": "example"
      },
      "company_name": "example",
      "email": "example",
      "first_name": "example",
      "is_corporate": false,
      "last_name": "example"
    },
    "buyer_questions": [],
    "campaign_category": "auction",
    "campaign_id": "example",
    "campaign_type": "example",
    "contact": "example",
    "created": 1.0,
    "currency": "example",
    "description": "example",
    "discount": {
      "amount": 1.0,
      "code": "example"
    },
    "dispute": {
      "amount": 1.0,
      "created": 1.0,
      "currency": "example",
      "id": "example",
      "object": "dispute",
      "reason": "example",
      "status": "needs_response"
    },
    "eligible_amount": 1.0,
    "fund": {
      "code": "example",
      "id": "example",
      "name": {},
      "object": "fund"
    },
    "id": "example",
    "items": [],
    "metadata": {},
    "object": "payment",
    "occurrence_id": "example",
    "parent_campaign_id": "example",
    "payment_method": {
      "brand": "example",
      "last4": "example",
      "type": "example"
    },
    "receipt_url": "example",
    "recurring": {
      "current_period_end": 1.0,
      "current_period_start": 1.0,
      "interval": "example",
      "is_recurring": false,
      "status": "example",
      "subscription_id": "example"
    },
    "refund_status": "none",
    "refunds": [],
    "status": "example",
    "team_id": "example",
    "type": "online"
  }
}
```

### Delete contact

Permanently deletes a contact for the authenticated organization, with the same side effects as deleting it from the dashboard.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {}
}
```

### Delete payment

Permanently deletes a manual payment (created from the dashboard or an import) with the same side effects as deleting it from the dashboard, except no email is sent. The tax receipt is cancelled; the contact is kept. Online payments cannot be deleted. Returns the deleted payment.

**Inputs**

- Payment (`payment_id`, text, required): Payment ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "amount": 1.0,
    "buyer": {
      "address": {
        "city": "example",
        "country": "example",
        "line1": "example",
        "postal_code": "example",
        "state": "example"
      },
      "company_name": "example",
      "email": "example",
      "first_name": "example",
      "is_corporate": false,
      "last_name": "example"
    },
    "buyer_questions": [],
    "campaign_category": "auction",
    "campaign_id": "example",
    "campaign_type": "example",
    "contact": "example",
    "created": 1.0,
    "currency": "example",
    "description": "example",
    "discount": {
      "amount": 1.0,
      "code": "example"
    },
    "dispute": {
      "amount": 1.0,
      "created": 1.0,
      "currency": "example",
      "id": "example",
      "object": "dispute",
      "reason": "example",
      "status": "needs_response"
    },
    "eligible_amount": 1.0,
    "fund": {
      "code": "example",
      "id": "example",
      "name": {},
      "object": "fund"
    },
    "id": "example",
    "items": [],
    "metadata": {},
    "object": "payment",
    "occurrence_id": "example",
    "parent_campaign_id": "example",
    "payment_method": {
      "brand": "example",
      "last4": "example",
      "type": "example"
    },
    "receipt_url": "example",
    "recurring": {
      "current_period_end": 1.0,
      "current_period_start": 1.0,
      "interval": "example",
      "is_recurring": false,
      "status": "example",
      "subscription_id": "example"
    },
    "refund_status": "none",
    "refunds": [],
    "status": "example",
    "team_id": "example",
    "type": "online"
  }
}
```

### Get campaign

Returns a single campaign with title, description, and occurrences (for multi-date events).

**Inputs**

- Campaign (`campaign_id`, text, required): Campaign ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "banner_url": "example",
    "category": "example",
    "created": 1.0,
    "creator_user_id": "example",
    "currency": "example",
    "deleted_at": 1.0,
    "description": "example",
    "end_date": 1.0,
    "goal_amount": 1.0,
    "id": "example",
    "is_archived": false,
    "locale": "example",
    "logo_url": "example",
    "metadata": {},
    "object": "campaign",
    "occurrences": [],
    "questions": [],
    "rates": [],
    "start_date": 1.0,
    "status": "example",
    "target": 1.0,
    "title": "example",
    "type": "donation_form",
    "updated": 1.0,
    "url": "example",
    "volume": 1.0
  }
}
```

### Get contact

Returns a single contact with address and donor information.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "line1": "example",
      "postal_code": "example",
      "state": "example"
    },
    "created": 1.0,
    "currency": "cad",
    "donation_count": 1.0,
    "donor_type": "example",
    "email": "example",
    "first_donation_date": 1.0,
    "first_name": "example",
    "id": "example",
    "last_donation_date": 1.0,
    "last_name": "example",
    "locale": "example",
    "metadata": {},
    "object": "contact",
    "phone_number": "example",
    "total_contribution": 1.0,
    "updated": 1.0
  }
}
```

### Get payment

Returns a single payment with line items and subscription details.

**Inputs**

- Payment (`payment_id`, text, required): Payment ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "amount": 1.0,
    "buyer": {
      "address": {
        "city": "example",
        "country": "example",
        "line1": "example",
        "postal_code": "example",
        "state": "example"
      },
      "company_name": "example",
      "email": "example",
      "first_name": "example",
      "is_corporate": false,
      "last_name": "example"
    },
    "buyer_questions": [],
    "campaign_category": "auction",
    "campaign_id": "example",
    "campaign_type": "example",
    "contact": "example",
    "created": 1.0,
    "currency": "example",
    "description": "example",
    "discount": {
      "amount": 1.0,
      "code": "example"
    },
    "dispute": {
      "amount": 1.0,
      "created": 1.0,
      "currency": "example",
      "id": "example",
      "object": "dispute",
      "reason": "example",
      "status": "needs_response"
    },
    "eligible_amount": 1.0,
    "fund": {
      "code": "example",
      "id": "example",
      "name": {},
      "object": "fund"
    },
    "id": "example",
    "items": [],
    "metadata": {},
    "object": "payment",
    "occurrence_id": "example",
    "parent_campaign_id": "example",
    "payment_method": {
      "brand": "example",
      "last4": "example",
      "type": "example"
    },
    "receipt_url": "example",
    "recurring": {
      "current_period_end": 1.0,
      "current_period_start": 1.0,
      "interval": "example",
      "is_recurring": false,
      "status": "example",
      "subscription_id": "example"
    },
    "refund_status": "none",
    "refunds": [],
    "status": "example",
    "team_id": "example",
    "type": "online"
  }
}
```

### Get user

Returns a single user of the organization, including a removed one, so a campaign's `creator_user_id` always resolves.

**Inputs**

- Account user (`account_user_id`, text, required): User ID (UUID)

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": 1.0,
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "object": "user",
    "role": "owner",
    "status": "active"
  }
}
```

### List campaigns

Returns a paginated list of campaigns (donation forms + events) for the authenticated organization.

**Inputs**

- Creator (`creator_id`, text): Filter: campaigns created by this user (UUID)
- Created lte (`created_lte`, date and time): Filter: created at or before (unix timestamp)
- Created lt (`created_lt`, date and time): Filter: created before (unix timestamp)
- Created gte (`created_gte`, date and time): Filter: created at or after (unix timestamp)
- Created gt (`created_gt`, date and time): Filter: created after (unix timestamp)
- Ending before (`ending_before`, text): Cursor: campaign ID to end before
- Starting after (`starting_after`, text): Cursor: campaign ID to start after
- Limit (`limit`, number): Number of results (1-100, default 10). From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [],
    "has_more": false,
    "next_cursor": "example",
    "object": "list"
  }
}
```

### List contacts

Returns a paginated list of contacts for the authenticated organization.

**Inputs**

- Email (`email`, text): Filter: exact match on the contact's primary or secondary email address
- Updated lte (`updated_lte`, date and time): Filter: updated at or before (unix timestamp)
- Updated lt (`updated_lt`, date and time): Filter: updated before (unix timestamp)
- Updated gte (`updated_gte`, date and time): Filter: updated at or after (unix timestamp)
- Updated gt (`updated_gt`, date and time): Filter: updated after (unix timestamp)
- Created lte (`created_lte`, date and time): Filter: created at or before (unix timestamp)
- Created lt (`created_lt`, date and time): Filter: created before (unix timestamp)
- Created gte (`created_gte`, date and time): Filter: created at or after (unix timestamp)
- Created gt (`created_gt`, date and time): Filter: created after (unix timestamp)
- Ending before (`ending_before`, text): Cursor: contact ID to end before
- Starting after (`starting_after`, text): Cursor: contact ID to start after
- Limit (`limit`, number): Number of results (1-100, default 10). From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [],
    "has_more": false,
    "next_cursor": "example",
    "object": "list"
  }
}
```

### List payments

Returns a paginated list of payments for the authenticated organization.

**Inputs**

- Currency (`currency`, text): Filter by currency. One of: `cad`, `usd`.
- Contact (`contact_id`, text): Filter by contact ID (UUID)
- Campaign (`campaign_id`, text): Filter by campaign ID (UUID)
- Type (`type`, text): Filter by payment type. One of: `online`, `manual`, `imported`.
- Status (`status`, text): Filter by payment status. One of: `succeeded`, `failed`, `pending`.
- Created lte (`created_lte`, date and time): Filter: created at or before (unix timestamp)
- Created lt (`created_lt`, date and time): Filter: created before (unix timestamp)
- Created gte (`created_gte`, date and time): Filter: created at or after (unix timestamp)
- Created gt (`created_gt`, date and time): Filter: created after (unix timestamp)
- Ending before (`ending_before`, text): Cursor: payment ID to end before
- Starting after (`starting_after`, text): Cursor: payment ID to start after
- Limit (`limit`, number): Number of results (1-100, default 10). From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [],
    "has_more": false,
    "next_cursor": "example",
    "object": "list"
  }
}
```

### List users

Returns a paginated list of the organization's users: the team members who can sign in to its Zeffy dashboard.

**Inputs**

- Status (`status`, text): Filter: `active` (default) or `removed` users. One of: `active`, `removed`.
- Created lte (`created_lte`, date and time): Filter: joined the organization at or before (unix timestamp)
- Created lt (`created_lt`, date and time): Filter: joined the organization before (unix timestamp)
- Created gte (`created_gte`, date and time): Filter: joined the organization at or after (unix timestamp)
- Created gt (`created_gt`, date and time): Filter: joined the organization after (unix timestamp)
- Ending before (`ending_before`, text): Cursor: user ID to end before
- Starting after (`starting_after`, text): Cursor: user ID to start after
- Limit (`limit`, number): Number of results (1-100, default 10). From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [],
    "has_more": false,
    "next_cursor": "example",
    "object": "list"
  }
}
```

### Update contact

Updates a contact for the authenticated organization. Only the provided fields are changed, and a null value clears a field. This is the only way to change a contact's email, since PUT /contacts matches on it. Returns the updated contact.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID (UUID)
- Email (`email`, text): Null clears the email
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone number (`phone_number`, text): Phone number.
- Address (`address`, object): Only the provided address fields are changed; null clears the whole address

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "line1": "example",
      "postal_code": "example",
      "state": "example"
    },
    "created": 1.0,
    "currency": "cad",
    "donation_count": 1.0,
    "donor_type": "example",
    "email": "example",
    "first_donation_date": 1.0,
    "first_name": "example",
    "id": "example",
    "last_donation_date": 1.0,
    "last_name": "example",
    "locale": "example",
    "metadata": {},
    "object": "contact",
    "phone_number": "example",
    "total_contribution": 1.0,
    "updated": 1.0
  }
}
```

### Upsert contact

Finds the contact matching the given email (primary or secondary) and updates it, or creates it when there is none. Only the provided fields are changed; a null value clears a field. The email is the match key and is never rewritten, so use PATCH to change a contact's email. Returns 201 when a contact was created and 200 when an existing one was updated.

**Inputs**

- Email (`email`, text, required): Match key: the contact is found or created by this email
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone number (`phone_number`, text): Phone number.
- Address (`address`, object): Only the provided address fields are changed; null clears the whole address

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "line1": "example",
      "postal_code": "example",
      "state": "example"
    },
    "created": 1.0,
    "currency": "cad",
    "donation_count": 1.0,
    "donor_type": "example",
    "email": "example",
    "first_donation_date": 1.0,
    "first_name": "example",
    "id": "example",
    "last_donation_date": 1.0,
    "last_name": "example",
    "locale": "example",
    "metadata": {},
    "object": "contact",
    "phone_number": "example",
    "total_contribution": 1.0,
    "updated": 1.0
  }
}
```
