Update contribution

Replace a contribution with the supplied values. This is a full update: omitted fields are cleared, with two exceptions. Soft credits are replaced only when a non-empty list is sent, so they cannot be removed through this endpoint, and files only links additional documents to the contribution, never unlinks existing ones. Gateway-processed contributions allow only a limited set of edits (e.g. notes and confirmation number), and the amount and designations of a refund or of a contribution posted to accounting cannot be changed. First retrieve the current contribution from /api/contributions/{id}, apply your changes, then send back the full object. Editing a contribution in another user's batch requires the Full Write Contributions or Unrestricted Batches permission. Changing the amount of a payment recorded against a form entry moves the entry's amount paid by the same difference. While multi-campus is on, a caller with a campus limit or campus overrides needs Limited Write Contributions where the contribution is placed both before and after the change: at one of the campuses of its designations, or, when it is placed organization-wide, in its organization (403 otherwise), so a new designation cannot move it outside their campuses. A designation the update adds must pass on its own, so a line they hold does not carry one they do not, while a line already on the contribution stays editable. A limit to a whole organization includes its inactive campuses. The contributor may be changed to anyone you can credit, as described on person and business (404 otherwise), except that a caller who holds neither Limited Read nor Limited Write Contributions at any of the current contributor's campuses may not change who a contribution carrying bank numbers, a check image or an address is from (400). When such a caller keeps the contributor, the bank numbers and address the contribution's page withholds from them are kept when sent back blank.

Required permission: Limited Write Contributions

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

The id of the contribution

Body Params

The new version of the contribution

allocations
array of objects | null
required

The line-item allocations of the gift across designations.

allocations*
type
object | null
required

The contributor type: 1 = anonymous, 2 = person, 3 = business/external.

date | null

The day the transaction is recorded on, as a calendar date (yyyy-MM-dd) in the church's time zone. Required when creating or editing a transaction; ignored when the transaction came through a payment gateway or sits in a closed batch, except SmartPay transactions, whose day can always be corrected. Changing the day clears timestamp.

method
object | null

The payment method (e.g. card, cash, check).

business
object | null

The contributing business, when the gift came from one: its listed profile, with the email, phone, birthday and custom fields it carries (id 0 and only the name when the business name was captured without a linked profile). An individual held in this slot on an older gift shows a caller who does not read them in full only what their privacy settings share. When creating a gift or changing its business, a business you can credit: one at a campus where you hold Limited Write Contributions or Full Write Pledges, or one you can find in a people search (404 otherwise, and for an id that is not a business).

person
object | null

The contributor, with the identity, contact and personal details their profile carries. While multi-campus is on, when the gift is not your own, you hold neither Limited Read nor Limited Write Contributions at any of the donor's campuses, and you do not read the donor's profile, its contact and personal details show only what the donor shares with the organization and its image is a placeholder unless the donor is listed in the directory, whatever opened the gift. When creating a gift or changing its contributor, an individual you can credit: yourself, someone at a campus where you hold Limited Write Contributions or Full Write Pledges, someone you can find in a people search, or, while multi-campus is on, an individual sent with their stored first and last name (404 otherwise, and for an id that is not an individual); a business goes in business.

string | null

Free-text notes on the transaction.

string | null

The check number, when paid by check.

string | null

The bank routing number. Saved only when paid by check; for online payments it is set by the gateway and masked to the last 4 digits. Null when you read the gift only through a line item's designation or through the batch it sits in (the donor is outside the campuses where you hold Limited Read or Limited Write Contributions). An edit by such a caller that sends it blank keeps the stored value.

string | null

The bank account number. Saved only when paid by check; for online payments it is set by the gateway and masked to the last 4 digits. Null when you read the gift only through a line item's designation or through the batch it sits in (the donor is outside the campuses where you hold Limited Read or Limited Write Contributions). An edit by such a caller that sends it blank keeps the stored value.

string | null

The last 4 digits of the card number, when paid by card.

string | null

The gateway/processor confirmation number.

files
array of objects | null

Files attached to the transaction. Left out, as the check image and bank numbers are, when the user reads the gift but not its donor through their giving access. To attach one, upload it first with type transaction_file and no linkedTo, then send the returned file id here. Attaching is additive: files that are already attached stay attached when they are left out, and are removed only by deleting the file.

files
boolean | null

Whether the notes are shown on the contributor's statement.

string | null

The contributor's display name.

string | null

The contributor's email address as captured on the gift. While multi-campus is on, when the gift is not your own, you hold neither Limited Read nor Limited Write Contributions at any of the donor's campuses, and you do not read the donor's profile, whatever opened the gift: null unless the donor is a business (never the email typed on the gift); the donor's own email shows on person only when the donor shares it with the organization.

string | null

The contributor's phone number as captured on the gift. While multi-campus is on, when the gift is not your own, you hold neither Limited Read nor Limited Write Contributions at any of the donor's campuses, and you do not read the donor's profile, whatever opened the gift: null unless the donor is a business (never the phone typed on the gift); the donor's own phone shows on person only when the donor shares it with the organization.

address
object | null

The address captured on the gift. While multi-campus is on, when the gift is not your own, you hold neither Limited Read nor Limited Write Contributions at any of the donor's campuses, and you do not read the donor's profile, whatever opened the gift: null unless the donor is a business (never the address typed on the gift); the donor's own address shows on person only when the donor shares it with the organization. An edit that keeps the contributor and sends it null keeps the stored address when you hold neither Limited Read nor Limited Write Contributions at any of the donor's campuses.

double | null

The processing fees charged, expressed as a negative amount.

softCredits
array of objects | null

The soft credits attributed to this transaction. While multi-campus is on, each recipient whose profile you do not read shows only what they share with the organization, whatever opened the gift.

softCredits
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