curl --request PATCH \
--url https://api.grainledger.com/api/v1/contributions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 1,
"date": "2023-12-25",
"fundId": "<string>",
"isTaxDeductible": true,
"checkNumber": "<string>",
"checkDate": "2023-12-25",
"notes": "<string>",
"memo": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 1,
"netAmount": 1,
"feeCovered": true,
"paymentLast4": "<string>",
"paymentBrand": "<string>",
"paymentMethodSub": "<string>",
"paymentMethodType": "<string>",
"paymentSource": "<string>",
"isRefunded": true,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>",
"benefitDescription": "<string>",
"benefitValue": 1,
"deductibleAmount": 1,
"stockTicker": "<string>",
"stockShares": 1,
"stockFmvPerShare": 1,
"stockTransferDate": "2023-12-25",
"inKindDescription": "<string>",
"inKindFmv": 1,
"inKindAppraisalDate": "2023-12-25",
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
donorId: '<string>',
sourceDonorId: '<string>',
amount: 1,
date: '2023-12-25',
fundId: '<string>',
isTaxDeductible: true,
checkNumber: '<string>',
checkDate: '2023-12-25',
notes: '<string>',
memo: '<string>',
givingBatchId: '<string>',
settlementId: '<string>',
givingMerchantId: '<string>',
processingFee: 1,
netAmount: 1,
feeCovered: true,
paymentLast4: '<string>',
paymentBrand: '<string>',
paymentMethodSub: '<string>',
paymentMethodType: '<string>',
paymentSource: '<string>',
isRefunded: true,
refundedAt: '2023-11-07T05:31:56Z',
completedAt: '2023-11-07T05:31:56Z',
externalId: '<string>',
externalDonorId: '<string>',
givingEventKey: '<string>',
benefitDescription: '<string>',
benefitValue: 1,
deductibleAmount: 1,
stockTicker: '<string>',
stockShares: 1,
stockFmvPerShare: 1,
stockTransferDate: '2023-12-25',
inKindDescription: '<string>',
inKindFmv: 1,
inKindAppraisalDate: '2023-12-25',
foreignCurrency: '<string>',
foreignAmount: 123,
exchangeRate: 123
})
};
fetch('https://api.grainledger.com/api/v1/contributions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.grainledger.com/api/v1/contributions/{id}"
payload = {
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 1,
"date": "2023-12-25",
"fundId": "<string>",
"isTaxDeductible": True,
"checkNumber": "<string>",
"checkDate": "2023-12-25",
"notes": "<string>",
"memo": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 1,
"netAmount": 1,
"feeCovered": True,
"paymentLast4": "<string>",
"paymentBrand": "<string>",
"paymentMethodSub": "<string>",
"paymentMethodType": "<string>",
"paymentSource": "<string>",
"isRefunded": True,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>",
"benefitDescription": "<string>",
"benefitValue": 1,
"deductibleAmount": 1,
"stockTicker": "<string>",
"stockShares": 1,
"stockFmvPerShare": 1,
"stockTransferDate": "2023-12-25",
"inKindDescription": "<string>",
"inKindFmv": 1,
"inKindAppraisalDate": "2023-12-25",
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 123,
"date": "2023-11-07T05:31:56Z",
"fundId": "<string>",
"method": "CASH",
"isTaxDeductible": true,
"externalSource": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 123,
"netAmount": 123,
"feeCovered": true,
"payment": {
"status": "PENDING",
"last4": "<string>",
"brand": "<string>",
"methodSubtype": "<string>",
"methodType": "<string>",
"source": "<string>",
"isRefunded": true,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
},
"settlementState": {
"isSettled": true,
"settlementDate": "2023-11-07T05:31:56Z",
"settlementBatch": "<string>",
"isCleared": true,
"clearedAt": "2023-11-07T05:31:56Z"
},
"sourceType": "DIRECT",
"quidProQuo": {
"benefitDescription": "<string>",
"benefitValue": 123,
"deductibleAmount": 123
},
"stock": {
"ticker": "<string>",
"shares": 123,
"fairMarketValuePerShare": 123,
"transferDate": "2023-11-07T05:31:56Z"
},
"inKind": {
"description": "<string>",
"fairMarketValue": 123,
"appraisalDate": "2023-11-07T05:31:56Z"
},
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123,
"donor": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"donorType": "<string>"
},
"sourceDonor": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"donorType": "<string>"
},
"fund": {
"id": "<string>",
"name": "<string>",
"fundType": "<string>"
},
"batch": {
"id": "<string>",
"externalReference": "<string>",
"batchDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"totalGross": 123,
"totalFees": 123,
"totalNet": 123,
"donationCount": 123
},
"settlement": {
"id": "<string>",
"provider": "<string>",
"externalReference": "<string>",
"estimatedArrivalDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"totalNet": 123
},
"journalEntry": {
"id": "<string>",
"entryNumber": "<string>",
"referenceNumber": "<string>"
},
"merchant": {
"id": "<string>",
"name": "<string>",
"campus": {
"id": "<string>",
"name": "<string>"
},
"dimensionValue": {
"id": "<string>",
"name": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"checkNumber": "<string>",
"checkDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"memo": "<string>",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>"
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}Update contribution
curl --request PATCH \
--url https://api.grainledger.com/api/v1/contributions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 1,
"date": "2023-12-25",
"fundId": "<string>",
"isTaxDeductible": true,
"checkNumber": "<string>",
"checkDate": "2023-12-25",
"notes": "<string>",
"memo": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 1,
"netAmount": 1,
"feeCovered": true,
"paymentLast4": "<string>",
"paymentBrand": "<string>",
"paymentMethodSub": "<string>",
"paymentMethodType": "<string>",
"paymentSource": "<string>",
"isRefunded": true,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>",
"benefitDescription": "<string>",
"benefitValue": 1,
"deductibleAmount": 1,
"stockTicker": "<string>",
"stockShares": 1,
"stockFmvPerShare": 1,
"stockTransferDate": "2023-12-25",
"inKindDescription": "<string>",
"inKindFmv": 1,
"inKindAppraisalDate": "2023-12-25",
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
donorId: '<string>',
sourceDonorId: '<string>',
amount: 1,
date: '2023-12-25',
fundId: '<string>',
isTaxDeductible: true,
checkNumber: '<string>',
checkDate: '2023-12-25',
notes: '<string>',
memo: '<string>',
givingBatchId: '<string>',
settlementId: '<string>',
givingMerchantId: '<string>',
processingFee: 1,
netAmount: 1,
feeCovered: true,
paymentLast4: '<string>',
paymentBrand: '<string>',
paymentMethodSub: '<string>',
paymentMethodType: '<string>',
paymentSource: '<string>',
isRefunded: true,
refundedAt: '2023-11-07T05:31:56Z',
completedAt: '2023-11-07T05:31:56Z',
externalId: '<string>',
externalDonorId: '<string>',
givingEventKey: '<string>',
benefitDescription: '<string>',
benefitValue: 1,
deductibleAmount: 1,
stockTicker: '<string>',
stockShares: 1,
stockFmvPerShare: 1,
stockTransferDate: '2023-12-25',
inKindDescription: '<string>',
inKindFmv: 1,
inKindAppraisalDate: '2023-12-25',
foreignCurrency: '<string>',
foreignAmount: 123,
exchangeRate: 123
})
};
fetch('https://api.grainledger.com/api/v1/contributions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.grainledger.com/api/v1/contributions/{id}"
payload = {
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 1,
"date": "2023-12-25",
"fundId": "<string>",
"isTaxDeductible": True,
"checkNumber": "<string>",
"checkDate": "2023-12-25",
"notes": "<string>",
"memo": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 1,
"netAmount": 1,
"feeCovered": True,
"paymentLast4": "<string>",
"paymentBrand": "<string>",
"paymentMethodSub": "<string>",
"paymentMethodType": "<string>",
"paymentSource": "<string>",
"isRefunded": True,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>",
"benefitDescription": "<string>",
"benefitValue": 1,
"deductibleAmount": 1,
"stockTicker": "<string>",
"stockShares": 1,
"stockFmvPerShare": 1,
"stockTransferDate": "2023-12-25",
"inKindDescription": "<string>",
"inKindFmv": 1,
"inKindAppraisalDate": "2023-12-25",
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"donorId": "<string>",
"sourceDonorId": "<string>",
"amount": 123,
"date": "2023-11-07T05:31:56Z",
"fundId": "<string>",
"method": "CASH",
"isTaxDeductible": true,
"externalSource": "<string>",
"givingBatchId": "<string>",
"settlementId": "<string>",
"givingMerchantId": "<string>",
"processingFee": 123,
"netAmount": 123,
"feeCovered": true,
"payment": {
"status": "PENDING",
"last4": "<string>",
"brand": "<string>",
"methodSubtype": "<string>",
"methodType": "<string>",
"source": "<string>",
"isRefunded": true,
"refundedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
},
"settlementState": {
"isSettled": true,
"settlementDate": "2023-11-07T05:31:56Z",
"settlementBatch": "<string>",
"isCleared": true,
"clearedAt": "2023-11-07T05:31:56Z"
},
"sourceType": "DIRECT",
"quidProQuo": {
"benefitDescription": "<string>",
"benefitValue": 123,
"deductibleAmount": 123
},
"stock": {
"ticker": "<string>",
"shares": 123,
"fairMarketValuePerShare": 123,
"transferDate": "2023-11-07T05:31:56Z"
},
"inKind": {
"description": "<string>",
"fairMarketValue": 123,
"appraisalDate": "2023-11-07T05:31:56Z"
},
"foreignCurrency": "<string>",
"foreignAmount": 123,
"exchangeRate": 123,
"donor": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"donorType": "<string>"
},
"sourceDonor": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"donorType": "<string>"
},
"fund": {
"id": "<string>",
"name": "<string>",
"fundType": "<string>"
},
"batch": {
"id": "<string>",
"externalReference": "<string>",
"batchDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"totalGross": 123,
"totalFees": 123,
"totalNet": 123,
"donationCount": 123
},
"settlement": {
"id": "<string>",
"provider": "<string>",
"externalReference": "<string>",
"estimatedArrivalDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"totalNet": 123
},
"journalEntry": {
"id": "<string>",
"entryNumber": "<string>",
"referenceNumber": "<string>"
},
"merchant": {
"id": "<string>",
"name": "<string>",
"campus": {
"id": "<string>",
"name": "<string>"
},
"dimensionValue": {
"id": "<string>",
"name": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"checkNumber": "<string>",
"checkDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"memo": "<string>",
"externalId": "<string>",
"externalDonorId": "<string>",
"givingEventKey": "<string>"
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}Authorizations
Organization API key created in Grain Settings → API. The key determines the organization and is limited to its assigned resource scopes. Write scopes imply the corresponding read scope.
Headers
Required with OAuth access tokens for resource requests. Omit only for GET /api/v1/organizations. Optional with organization API keys; if supplied with an API key, it must match the key's organization.
Path Parameters
Resource ID
Body
All fields are optional. Send null to clear a nullable field. Accounting-derived settlement and clearing fields are read-only.
11x > 01CASH, CHECK, CREDIT_CARD, ACH, ONLINE, STOCK, OTHER 2000111x >= 0x >= 0PENDING, SUCCEEDED, FAILED 4100100100100DIRECT, DAF, QCD_IRA, MATCHING, FOUNDATION, ESTATE PUSHPAY, PLANNING_CENTER, CCB, TITHELY, SUBSPLASH, ROCK_RMS, MANUAL, OTHER 5001 - 500x >= 0x >= 0x > 0x > 0x >= 0Response
Updated contribution
Contribution detail with one-level resource summaries. Provider metadata and processor billing identity are never returned.
Calendar day represented as a UTC-midnight ISO timestamp.
CASH, CHECK, CREDIT_CARD, ACH, ONLINE, STOCK, OTHER Hide child attributes
Hide child attributes
PENDING, SUCCEEDED, FAILED DIRECT, DAF, QCD_IRA, MATCHING, FOUNDATION, ESTATE Hide child attributes
Hide child attributes
Calendar day represented as a UTC-midnight ISO timestamp.
Provider donor identifier. Null when the caller lacks donor identity access.
1 - 500