A Designation conveys how much of a Donation goes to a particular Fund.
Designation details are required when creating a Donation. If all of a Donation is going to a single Fund, it will only have one Designation. Similarly, to split a Donation between multiple Funds, you can use multiple Designations.
| Property | Value |
|---|---|
| Product | Giving (pco.giving, API version 2019-10-18) |
| Resource type | Designation |
| TypeScript | Giving.Designation, attributes Giving.DesignationAttributes, schema Giving.DesignationSchema |
| Planning Center path | /giving/v2/donations/{donation_id}/designations |
| Planning Center docs | Designation |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
designationRefundRef.designation (from a DesignationRefund reference) |
Collection | No | |
pco.giving.donations.id(donationId).designations |
Collection | No |
From a collection, .id(designationId) addresses one Designation: pco.giving.donations.id(donationId).designations.id(designationId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Giving.DesignationAttributes. Every resource also has id and type ('Designation') next to its attributes.
| Name | Type | Description |
|---|---|---|
amount_cents |
number | null |
Required. The number of cents being donated to a designation’s associated fund. |
amount_currency |
string | null |
The currency of amount_cents. Set to the currency of the associated organization. |
fee_cents |
number | null |
The fee amount distributed to a donation’s designation in proportion to the amount of the designation. This should either be 0 or a negative integer. |
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 | Yes |
Querying
No documented where fields.
No documented order fields.
Edges
Follow these from one Designation, ref = pco.giving.donations.id(donationId).designations.id(designationId):
| Edge | Leads to | Returns | Filters | Create |
|---|---|---|---|---|
ref.fund |
Fund | Collection | No |
Writing
| Property | Value |
|---|---|
| Create | No |
| Update | No |
| Delete | No |
Example
import type { Giving } from '@mackenly/planningcenterkit';
const donationId = '1'; // Donation id
const page = await pco.giving.donations.id(donationId).designations.perPage(25).list();
const items: Giving.Designation[] = page.data;