Update giving campaign

Update an existing giving campaign. This is a full update: every field is taken from the body, so optional fields that are omitted are cleared. First retrieve the current campaign from /api/pledges/campaigns/{id}, apply your changes, then send back the full object.

Required permission: Full Write Pledges

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the campaign

Body Params

The details for the new version

string | null
required

The campaign's name.

date | null
required

The calendar day the campaign starts (yyyy-MM-dd), in the church's calendar; no time component.

date | null
required

The calendar day the campaign ends (yyyy-MM-dd), inclusive: gifts on this day still count.

funds
array of objects | null
required

The designations giving to the campaign is applied to; at least one is required. On read each includes its per-designation giving totals; on write, provide only each designation's id. Every designation must belong to the campaign's organization, except internal designations, which serve every organization (else 400 pledge_campaign_designation_other_org_desc). Populated only when the caller holds the Full Read Pledges permission for this campaign: inside their campus or organization access when they are limited.

funds*
string | null

The campaign's description.

boolean | null

Whether only giving toward pledges counts for the campaign; otherwise all giving to its designations counts. Populated only when the caller holds the Full Read Pledges permission for this campaign: inside their campus or organization access when they are limited.

boolean | null

Whether the campaign allows giving before its start date.

date | null

The earliest calendar day (yyyy-MM-dd) a gift counts toward the campaign when early giving is allowed; must not be after start. Null means any earlier gift counts.

double | null

The campaign's goal amount; null when no goal is set. Must be greater than 0 when provided.

campuses
array of objects | null

The campuses the campaign belongs to, ordered by name; empty when it is available to every campus. On writes,
send the ids to set the campus set (an empty list means every campus); omit the property to leave the set
unchanged. A campus-limited caller can only add or remove campuses within their access and cannot change
whether the record is available to every campus.
Ignored while multi-campus is off.

campuses
organization
object | null

The one organization this record belongs to (its books): set on every record, the default organization
until a second one exists; null only for a record saved while this release was being installed, before every record was assigned its organization. On a
save, send it with campuses empty to scope the record to the whole organization; when campuses are
sent the organization is taken from them. Required while multi-org is on; All is not offered for financial
records.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses
200

OK

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json