---
title: "PledgeCampaign (Giving)"
description: "A PledgeCampaign is a way to request and track long-terms commitments to a particular goal or project."
---

> Documentation Index
> Fetch the complete documentation index at: https://planningcenterkit.mackenly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PledgeCampaign (Giving)

A `PledgeCampaign` is a way to request and track long-terms commitments to a particular goal or project.

| Property | Value |
| --- | --- |
| Product | [Giving](/reference/giving/) (`pco.giving`, API version `2019-10-18`) |
| Resource type | `PledgeCampaign` |
| TypeScript | `Giving.PledgeCampaign`, attributes `Giving.PledgeCampaignAttributes`, schema `Giving.PledgeCampaignSchema` |
| Planning Center path | `/giving/v2/pledge_campaigns` |
| Planning Center docs | [PledgeCampaign](https://api.planningcenteronline.com/docs/apps/giving/versions/2019-10-18/vertices/pledge_campaign) |

## How to reach it

| Client path | Returns | Filters | Create |
| --- | --- | --- | --- |
| `pco.giving.pledge_campaigns` | Collection |  | Yes |
| `pco.giving.people.id(personId).pledges.id(pledgeId).pledge_campaign` | Collection |  | No |

From a collection, `.id(pledgeCampaignId)` addresses one PledgeCampaign: `pco.giving.pledge_campaigns.id(pledgeCampaignId)`. Collections support [`where`, `include`, `order`, and pagination](/guides/querying/); single resources have `get()`.

## Attributes

On `Giving.PledgeCampaignAttributes`. Every resource also has `id` and `type` (`'PledgeCampaign'`) next to its attributes.

| Name | Type | Description |
| --- | --- | --- |
| `created_at` | `string \| null` |  |
| `description` | `string \| null` |  |
| `ends_at` | `string \| null` |  |
| `goal_cents` | `number \| null` | Optional. During the donation period of this campaign, the running total of donations will be tracked against this number |
| `goal_currency` | `string \| null` |  |
| `name` | `string \| null` |  |
| `received_total_from_pledges_cents` | `number \| null` |  |
| `received_total_outside_of_pledges_cents` | `number \| null` |  |
| `show_goal_in_church_center` | `boolean \| null` | In addition to seeing their personal pledge progress within their donor profile, this option allows donors to see the the collective progress towards the campaign’s overall goal (if set). |
| `starts_at` | `string \| null` |  |
| `updated_at` | `string \| null` |  |

## Relationships and includes

Side-load with `include()` (or `get({ include })`) and read with `related(resource, name)`: `fund`.

| Relationship | Type | To | Includable |
| --- | --- | --- | --- |
| `fund` | To one | [Fund](/reference/giving/fund/) | Yes |

## Querying

### Where

`where(field, value)` for equality; `where(field, op, value)` with the operators listed.

| Field | Value type | Operators |
| --- | --- | --- |
| `ends_at` | `string \| Date` | `gt`, `gte`, `lt`, `lte` |
| `fund_id` | `string \| number` | Equality only |
| `starts_at` | `string \| Date` | `gt`, `gte`, `lt`, `lte` |

### Order

`order(...)` accepts these fields, ascending, or descending with a `-` prefix: `ends_at`, `starts_at`.

## Edges

Follow these from one PledgeCampaign, `ref = pco.giving.pledge_campaigns.id(pledgeCampaignId)`:

| Edge | Leads to | Returns | Filters | Create |
| --- | --- | --- | --- | --- |
| `ref.fund` | [Fund](/reference/giving/fund/) | Collection |  | No |
| `ref.pledges` | [Pledge](/reference/giving/pledge/) | Collection |  | No |

## Writing

| Property | Value |
| --- | --- |
| Create | Yes, `create()` on `pco.giving.pledge_campaigns` |
| Update | Yes, `update()` on a reference |
| Delete | Yes, `delete()` on a reference |

### Create attributes

Typed as `Giving.PledgeCampaignSchema['create']`.

| Attribute | Type |
| --- | --- |
| `description` | `string \| null` |
| `ends_at` | `string \| null` |
| `fund_id` | `string` |
| `goal_cents` | `number \| null` |
| `name` | `string \| null` |
| `show_goal_in_church_center` | `boolean \| null` |
| `starts_at` | `string \| null` |

### Update attributes

Typed as `Giving.PledgeCampaignSchema['update']`.

| Attribute | Type |
| --- | --- |
| `description` | `string \| null` |
| `ends_at` | `string \| null` |
| `fund_id` | `string` |
| `goal_cents` | `number \| null` |
| `name` | `string \| null` |
| `show_goal_in_church_center` | `boolean \| null` |
| `starts_at` | `string \| null` |

See [Writing data](/guides/writing-data/).

## Example

```ts
import type { Giving } from '@mackenly/planningcenterkit';

const page = await pco.giving.pledge_campaigns.order('ends_at').perPage(25).list();
const items: Giving.PledgeCampaign[] = page.data;
```

Source: https://planningcenterkit.mackenly.com/reference/giving/pledge-campaign/index.mdx
