Update pledge
curl --request PATCH \
--url https://api.grainledger.com/api/v1/pledges/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"donorId": "cm456def789ghi",
"fundId": "cm789ghi012jkl",
"totalAmount": 12000,
"startDate": "2026-01-01"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
donorId: 'cm456def789ghi',
fundId: 'cm789ghi012jkl',
totalAmount: 12000,
startDate: '2026-01-01'
})
};
fetch('https://api.grainledger.com/api/v1/pledges/{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/pledges/{id}"
payload = {
"donorId": "cm456def789ghi",
"fundId": "cm789ghi012jkl",
"totalAmount": 12000,
"startDate": "2026-01-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"donorId": "<string>",
"fundId": "<string>",
"campaignId": "<string>",
"totalAmount": 123,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"status": "ACTIVE"
}{
"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"
}
]
}
}Pledges
Update pledge
PATCH
https://api.grainledger.com
/
api
/
v1
/
pledges
/
{id}
Update pledge
curl --request PATCH \
--url https://api.grainledger.com/api/v1/pledges/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"donorId": "cm456def789ghi",
"fundId": "cm789ghi012jkl",
"totalAmount": 12000,
"startDate": "2026-01-01"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
donorId: 'cm456def789ghi',
fundId: 'cm789ghi012jkl',
totalAmount: 12000,
startDate: '2026-01-01'
})
};
fetch('https://api.grainledger.com/api/v1/pledges/{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/pledges/{id}"
payload = {
"donorId": "cm456def789ghi",
"fundId": "cm789ghi012jkl",
"totalAmount": 12000,
"startDate": "2026-01-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"donorId": "<string>",
"fundId": "<string>",
"campaignId": "<string>",
"totalAmount": 123,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"status": "ACTIVE"
}{
"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
ApiKeyAuthGrainOAuth2BearerAuth
Headers
Body
application/json
Last modified on October 10, 2026