Skip to content

Pledge (Giving)

A Pledge made by a Person toward a particular PledgeCampaign.

A Pledge made by a Person toward a particular PledgeCampaign.

Property Value
Product Giving (pco.giving, API version 2019-10-18)
Resource type Pledge
TypeScript Giving.Pledge, attributes Giving.PledgeAttributes, schema Giving.PledgeSchema
Planning Center path /giving/v2/people/{person_id}/pledges
Planning Center docs Pledge

How to reach it

Client path Returns Filters Create
pco.giving.people.id(personId).pledges Collection Yes
pco.giving.pledge_campaigns.id(pledgeCampaignId).pledges Collection No

From a collection, .id(pledgeId) addresses one Pledge: pco.giving.people.id(personId).pledges.id(pledgeId). Collections support where, include, order, and pagination; single resources have get().

Attributes

On Giving.PledgeAttributes. Every resource also has id and type ('Pledge') next to its attributes.

Name Type Description
amount_cents number | null The amount pledged
amount_currency string | null
created_at string | null
donated_total_cents number | null The amount donated
joint_giver_amount_cents number | null The amount pledged by the joint giver, if in a joint giving unit
joint_giver_donated_total_cents number | null The amount donated by the joint giver, if in a joint giving unit
updated_at string | null

Relationships and includes

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

Relationship Type To Includable
person To one Person No
pledge_campaign To one PledgeCampaign Yes

Querying

Where

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

Field Value type Operators
created_at string | Date gt, gte, lt, lte
updated_at string | Date gt, gte, lt, lte

Order

order(...) accepts these fields, ascending, or descending with a - prefix: created_at, updated_at.

Edges

Follow these from one Pledge, ref = pco.giving.people.id(personId).pledges.id(pledgeId):

Edge Leads to Returns Filters Create
ref.joint_giver Person Collection No
ref.pledge_campaign PledgeCampaign Collection No

Writing

Property Value
Create Yes, create() on pledges on Person
Update Yes, update() on a reference
Delete Yes, delete() on a reference

Create attributes

Typed as Giving.PledgeSchema['create'].

Attribute Type
amount_cents number | null
person_id string
pledge_campaign_id string

Update attributes

Typed as Giving.PledgeSchema['update'].

Attribute Type
amount_cents number | null

See Writing data.

Example

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

const personId = '1'; // Person id

const page = await pco.giving.people.id(personId).pledges.order('created_at').perPage(25).list();
const items: Giving.Pledge[] = page.data;

Type to search…

↑↓ navigate↵ selectEsc close