Skip to main content
GET
https://api.grainledger.com
/
api
/
v1
/
pledges
List pledges
curl --request GET \
  --url https://api.grainledger.com/api/v1/pledges \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Organization-Id: <x-organization-id>'
const options = {
  method: 'GET',
  headers: {'X-Organization-Id': '<x-organization-id>', Authorization: 'Bearer <token>'}
};

fetch('https://api.grainledger.com/api/v1/pledges', 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"

headers = {
    "X-Organization-Id": "<x-organization-id>",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
{
  "pledges": [
    {
      "id": "cm444ddd555eee",
      "donorId": "cm456def789ghi",
      "fundId": "cm789ghi012jkl",
      "totalAmount": 12000,
      "startDate": "2026-01-01T00:00:00.000Z",
      "endDate": "2026-12-31T00:00:00.000Z",
      "status": "ACTIVE"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 34,
    "totalPages": 2
  }
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}
{
  "message": "You do not have access to this organization."
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Organization-Id
string
required

Organization ID for multi-tenant data access

Query Parameters

page
integer
default:1

Page number (1-based)

Required range: x >= 1
limit
integer
default:20

Records per page

Required range: 1 <= x <= 1000
donorId
string
fundId
string
campaignId
string
status
enum<string>
Available options:
ACTIVE,
CANCELLED
sortBy
enum<string>

When omitted, pledges are ordered by createdAt descending. Progress sort loads computed fulfillment for filtered pledges.

Available options:
donor,
fund,
campaign,
pledged,
fulfilled,
progress,
pace,
status,
createdAt
sortDir
enum<string>

When sortBy is sent, ascending or descending order. Omit with sortBy to accept server defaults (typically desc).

Available options:
asc,
desc

Response

Paginated pledges

pledges
object[]
pagination
object
Last modified on July 8, 2026