---
schema_version: "1"
id: d8efdf295e8154610f768d04196d02f7cdab19a69feeef0f20c4790a589f12e4
title: Recurring Donations Schedules API
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sfdo/264-0-0/npsp_rd_schedules_api.md
canonical_url: https://help.salesforce.com/s/articleView?id=sfdo.npsp_rd_schedules_api.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6a3161b691da87cd7669037390ed3873ffe1fa6fee60faed7f831af46f0c2cc7
description: Write Apex to access information about the Recurring Donation Schedule object using the Schedules API.
products:
  - Nonprofit
release: "264"
---
# Recurring Donations Schedules API

Write Apex to access information about the Recurring Donation Schedule object using the Schedules API.

The Recurring Donations Schedules API is intended to meet the needs of customers and partners who require visibility into the protected Recurring Donation Schedule object. The Schedules API returns all Schedules associated with a Recurring Donation, including current, past, and paused schedules.

In addition to the Schedules API, we provide an [Installments API](https://help.salesforce.com/s/articleView?id=sfdo.npsp_rd_installments_api.htm&release=264.0.0&type=5 "Write Apex to query information about Recurring Donation Installments using the Installments API.") which returns the projected installments generated from the schedules associated with the Recurring Donation.

## Call Format

- Global Class implementing the API: npsp.Callable\_API
- Global Method: npsp.call()
- Parameters: Map<String, Object>

   
| Name | Datatype | Required | Description |
| --- | --- | --- | --- |
| RecordIds | string | Yes | Recurring Donation Id. |

## JSON Response Format

The JSON response format shows Schedule information listed by Recurring Donation Id.

   
| Name | Datatype | Required | Description |
| --- | --- | --- | --- |
| statusReason | string | No | Additional details for the Schedule. For example, a paused reason for a paused schedule. |
| startDate | Date | Yes | The Schedule start date. |
| scheduleId | string | Yes | The Id of this Schedule record. |
| recurringDonationId | string | Yes | The Recurring Donation record this Schedule relates to. |
| paymentMethod | string | No | Payment method for this Schedule. For example, Check, Credit Card, ACH, etc. |
| lastModifiedDate | date | Yes | The date this Schedule was last modified. |
| isPause | boolean | Yes | Identifies a paused Schedule. Pauses are implemented with a Schedule which runs in parallel with other Schedules. Installments which fall between startDate and endDate inclusive of a paused Schedule are skipped. |
| isCurrent | boolean | Yes | Identifies a Schedule as currently running where startDate <= today and endDate is null or >= today. |
| isActive | boolean | Yes | Identifies a Schedule as currently running or is a future Schedule where: endDate is null or >= today. All Schedules where isActive == true are considered in the creation of upcoming installments. |
| installmentPeriod | string | Yes | Defines the installment schedule along with Installment Frequency. For example, if Installment Period is Monthly and Installment Frequency is 3, the schedule would be defined as "every 3 months". |
| installmentFrequency | integer | Yes | Defines the installment schedule along with Installment Period. For example, if Installment Period is Monthly and Installment Frequency is 3, the schedule would be defined as "every 3 months". |
| installmentAmount | integer | Yes | The amount for each installment Opportunity. |
| endDate | date | No | The Schedule end date. |
| dayOfMonth | string | No | Sets the specific day of the month for future installment Opportunities when the Installment Period is Monthly. |
| currencyCode | string | Yes | The currency ISO code for this Schedule. For example, USD. |
| createdDate | date | Yes | The date this Schedule record was created. |
| campaignId | string | No | The Campaign record this Schedule relates to. |

## Code Sample and JSON Response

In this example, we want to know Schedule information for two specific Recurring Donations.

**Code Sample**

```java
Map <String, Object> callMap = new Map<String, Object>();

callMap.put('RecordIds', new Set<Id>{'a092D000003Vp8pQAC','a092D000003V4ngQAC'});

npsp.Callable_API apiTest = new npsp.Callable_API();
String jsonResponse = String.valueOf(apiTest.call('rd2.queryschedules', callMap));
```

**JSON Reponse**

```json
{
  "a092D000003Vp8pQAC": [
  {
    "statusReason": null,
    "startDate": "2020-11-04",
    "scheduleId": "a0n2D000001B1mFQAS",
    "recurringDonationId": "a092D000003Vp8pQAC",
    "paymentMethod": "Check",
    "lastModifiedDate": "2020-11-04T21:06:00.000Z",
    "isPause": false,
    "isCurrent": true,
    "isActive": true,
    "installmentPeriod": "Monthly",
    "installmentFrequency": 1,
    "installmentAmount": 100,
    "endDate": null,
    "dayOfMonth": "4",
    "currencyCode": "USD",
    "createdDate": "2020-11-04T21:06:00.000Z",
    "campaignId": null
  }
],
"a092D000003V4ngQAC": [
  {
    "statusReason": null,
    "startDate": "2017-11-01",
    "scheduleId": "a0n2D000001B0AnQAK",
    "recurringDonationId": "a092D000003V4ngQAC",
    "paymentMethod": "Check",
    "lastModifiedDate": "2020-11-04T17:42:56.000Z",
    "isPause": false,
    "isCurrent": true,
    "isActive": true,
    "installmentPeriod": "Monthly",
    "installmentFrequency": 1,
    "installmentAmount": 100,
    "endDate": null,
    "dayOfMonth": "1",
    "currencyCode": "USD",
    "createdDate": "2020-11-03T00:09:31.000Z",
    "campaignId": null
  }
 ]
}
```