> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grainledger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update contribution



## OpenAPI

````yaml /openapi.json patch /api/v1/contributions/{id}
openapi: 3.0.3
info:
  title: Grain API
  description: >-
    Church accounting and donor management API. Authenticate via OAuth 2.1 (Sign
    in with Grain). All requests require a Bearer token and X-Organization-Id
    header.
  version: 1.0.0
servers:
  - url: https://api.grainledger.com
    description: API Server
security:
  - GrainOAuth2: []
  - BearerAuth: []
tags:
  - name: Transactions
    description: Bank transactions and reconciliation
  - name: Bills
    description: Vendor bills from creation through payment
  - name: Donors
    description: Donor records and household relationships
  - name: Contributions
    description: Giving records with fund assignment and settlement
  - name: Pledges
    description: Pledge campaigns and fulfillment tracking
  - name: Households
    description: Household groupings and primary contacts
paths:
  /api/v1/contributions/{id}:
    patch:
      tags:
        - Contributions
      summary: Update contribution
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/PathId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContribution'
      responses:
        '200':
          description: Updated contribution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contribution'
        '400':
          description: Bad request (missing header or invalid input)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized (missing or invalid Bearer token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden (no access to organization or action)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (duplicate record)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    OrganizationId:
      name: X-Organization-Id
      in: header
      required: true
      schema:
        type: string
      description: Organization ID for multi-tenant data access
      example: cm123abc456def
    PathId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Resource ID
      example: cm456def789ghi
  schemas:
    CreateContribution:
      type: object
      required:
        - amount
        - date
        - fundId
        - method
      properties:
        donorId:
          type: string
          example: cm456def789ghi
        amount:
          type: number
          example: 250
        date:
          type: string
          format: date
          example: '2026-07-06'
        fundId:
          type: string
          example: cm789ghi012jkl
        method:
          type: string
          enum:
            - CASH
            - CHECK
            - CREDIT_CARD
            - ACH
            - ONLINE
            - STOCK
            - OTHER
          example: CHECK
        checkNumber:
          type: string
          example: '1042'
        isTaxDeductible:
          type: boolean
          default: true
        notes:
          type: string
    Contribution:
      type: object
      properties:
        id:
          type: string
        donorId:
          type: string
          nullable: true
        amount:
          type: number
        date:
          type: string
          format: date-time
        fundId:
          type: string
        method:
          type: string
          enum:
            - CASH
            - CHECK
            - CREDIT_CARD
            - ACH
            - ONLINE
            - STOCK
            - OTHER
        isTaxDeductible:
          type: boolean
        externalSource:
          type: string
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: You do not have access to this organization.
  securitySchemes:
    GrainOAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.grainledger.com/oauth/authorize
          tokenUrl: https://api.grainledger.com/oauth/token
          scopes:
            openid: OpenID Connect
            email: Email address
            profile: Profile information
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth access token (JWT)

````