API
⌘K
My Developer Account

PledgeCampaign

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

Example Request

curl https://api.planningcenteronline.com/giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign

View in API Explorer →

Example Object

{
  "type": "PledgeCampaign",
  "id": "1",
  "attributes": {
    "created_at": "2000-01-01T12:00:00Z",
    "description": "string",
    "ends_at": "2000-01-01T12:00:00Z",
    "goal_cents": 1,
    "goal_currency": "USD",
    "name": "string",
    "received_total_from_pledges_cents": 1,
    "received_total_outside_of_pledges_cents": 1,
    "show_goal_in_church_center": true,
    "starts_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  },
  "relationships": {
    "fund": {
      "data": {
        "type": "Fund",
        "id": "1"
      }
    }
  }
}

Attributes

Name Type Description
created_at date_time
description string
ends_at date_time
goal_cents integer Optional. During the donation period of this campaign, the running total of donations will be tracked against this number
goal_currency currency_abbreviation
id primary_key
name string
received_total_from_pledges_cents integer
received_total_outside_of_pledges_cents integer
show_goal_in_church_center boolean 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 date_time
updated_at date_time

Relationships

Name Type Association Type Note
fund Fund to_one

Can Include

Parameter Value Description Assignable
include fund include associated fund create and update

Order By

Parameter Value Type Description
order ends_at string prefix with a hyphen (-ends_at) to reverse the order
order starts_at string prefix with a hyphen (-starts_at) to reverse the order

Query By

Name Parameter Type Description Example
ends_at where[ends_at] date_time Query on a specific ends_at ?where[ends_at]=2000-01-01T12:00:00Z
fund_id where[fund_id] integer Query on a related fund ?where[fund_id]=1
starts_at where[starts_at] date_time Query on a specific starts_at ?where[starts_at]=2000-01-01T12:00:00Z

Pagination

Name Parameter Type Description
per_page per_page integer how many records to return per page (min=1, max=100, default=25)
offset offset integer get results from given offset

Endpoints

Listing

HTTP Method Endpoint
GET /giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign

Reading

HTTP Method Endpoint
GET /giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign/{id}

Creating

HTTP Method Endpoint Assignable Attributes
POST /giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign
  • name
  • description
  • starts_at
  • ends_at
  • goal_cents
  • show_goal_in_church_center
  • fund_id

Updating

HTTP Method Endpoint Assignable Attributes
PATCH /giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign/{id}
  • name
  • description
  • starts_at
  • ends_at
  • goal_cents
  • show_goal_in_church_center
  • fund_id

Deleting

HTTP Method Endpoint
DELETE /giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign/{id}

Associations

HTTP Method Endpoint Returns Details Filter By
GET https://api.planningcenteronline.com/giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign/{pledge_campaign_id}/fund Fund
GET https://api.planningcenteronline.com/giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign/{pledge_campaign_id}/pledges Pledge

Belongs To

HTTP Method Endpoint Association Details Filter By
GET https://api.planningcenteronline.com/giving/v2/people/{person_id}/pledges/{pledge_id}/pledge_campaign Pledge