> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://virtuous.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://virtuous.ferndocs.com/_mcp/server.

# Query donors based on specified criteria.

POST https://prod-api.raisedonors.com/api/Project/query
Content-Type: application/json

Reference: https://virtuous.ferndocs.com/reference/raise/project/queryprojects

## Authentication

- `Authorization` header (required) — JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer \{token}"

## Request

### Body (application/json)

This endpoint expects a Project_queryprojects_Request.

- `Project_queryprojects_Request`
  - QueryRequestModel: QueryRequestModel
  - ParsedQueryResponseModel: ParsedQueryResponseModel

## Response

### 200

OK

- `items` (list of ProjectModel, optional)
- `total` (integer, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `Project_QueryProjectsRequestBadRequestError`
  - ProblemDetails: ProblemDetails
  - HttpValidationProblemDetails: HttpValidationProblemDetails

## Types

### QueryRequestModel

Request body for advanced query endpoints such as donor and campaign queries.

- `filter` (string, optional, nullable)
- `skip` (integer, optional)
- `take` (integer, optional)
- `sortBy` (enum, optional, nullable) — Field to sort by (case-insensitive). Valid options: createdate, createddatetime, email, firstname, gifts, giftsum, id, lastname, modifieddatetimeutc, name, phone
  - Allowed values: `createdate`, `createddatetime`, `email`, `firstname`, `gifts`, `giftsum`, `id`, `lastname`, `modifieddatetimeutc`, `name`, `phone`
- `descending` (boolean, optional)
- `includeDetails` (boolean, optional)
- `queryType` (enum, optional) — The logical type of query being executed.
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`
- `groups` (list of QueryGroupModel, optional, nullable) — The groups of conditions that make up the query.
- `selectedColumns` (list of string, optional, nullable) — The list of result columns to return for each item.
- `empty` (boolean, optional) — Indicates whether the query has any conditions defined.

### ParsedQueryResponseModel

Represents a parsedquery response model.

- `descending` (boolean, optional)
- `empty` (boolean, optional) — Indicates whether the query has any conditions defined.
- `filter` (string, optional, nullable)
- `groups` (list of QueryGroupModel, optional, nullable) — The groups of conditions that make up the query.
- `includeDetails` (boolean, optional)
- `queryType` (enum, optional) — The logical type of query being executed.
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`
- `selectedColumns` (list of string, optional, nullable) — The list of result columns to return for each item.
- `skip` (integer, optional)
- `sortBy` (enum, optional, nullable) — Field to sort by (case-insensitive). Valid options: createdate, createddatetime, email, firstname, gifts, giftsum, id, lastname, modifieddatetimeutc, name, phone
  - Allowed values: `createdate`, `createddatetime`, `email`, `firstname`, `gifts`, `giftsum`, `id`, `lastname`, `modifieddatetimeutc`, `name`, `phone`
- `take` (integer, optional)

### ProjectModel

Represents a project model.

- `id` (long, optional) — Gets or sets the identifier.
- `code` (string, optional, nullable) — Gets or sets the code.
- `isActive` (boolean, optional) — Gets or sets a value indicating whether active.
- `isAvailableOnline` (boolean, optional) — Gets or sets a value indicating whether available online.
- `isPublic` (boolean, optional) — Gets or sets a value indicating whether public.
- `isDeleted` (boolean, optional) — Gets or sets a value indicating whether deleted.
- `name` (string, optional, nullable) — Gets or sets the name.
- `description` (string, optional, nullable) — Gets or sets the description.
- `sortOrder` (integer, optional) — Gets or sets the sort order.
- `emailAddresses` (string, optional, nullable) — Gets or sets the email addresses.
- `metadataFields` (list of FieldMetadata, optional, nullable) — Gets or sets the metadata fields.
- `image` (string, optional, nullable) — Gets or sets the image.
- `isPinned` (boolean, optional) — Gets or sets a value indicating whether pinned.
- `donorAmount` (integer, optional) — Gets or sets the donor amount.
- `giftAmount` (integer, optional) — Gets or sets the gift amount.
- `createdDateTime` (string, optional, nullable) — Gets or sets the created date time.
- `modifiedDateTime` (string, optional, nullable) — Gets or sets the modified date time.
- `raisedAmount` (string, optional, nullable) — Gets or sets the raised amount.
- `averageGiftAmount` (string, optional, nullable) — Gets or sets the average gift amount.
- `firstGiftDate` (string, optional, nullable) — Gets or sets the first gift date.
- `lastGiftDate` (string, optional, nullable) — Gets or sets the last gift date.
- `isSystem` (boolean, optional) — Gets or sets a value indicating whether system.
- `percentageRecurringGift` (double, optional) — Gets or sets the percentage recurring gift.
- `externalIdentifier` (string, optional, nullable) — Gets or sets the external identifier.
- `impactData` (string, optional, nullable) — Gets or sets the impact data.

### ProblemDetails

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)

### HttpValidationProblemDetails

- `detail` (string, optional, nullable)
- `errors` (map from string to list of string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

### QueryGroupModel

- `conditions` (list of QueryConditionModel, optional, nullable) — Gets or sets the conditions.
- `conjunct` (enum, optional) — Gets or sets the operator.
  - Allowed values: `0`, `1`

### FieldMetadata

- `name` (string, optional, nullable)
- `value` (string, optional, nullable)

### QueryConditionModel

- `parameter` (string, optional, nullable) — Gets or sets the parameter.
- `operator` (enum, optional) — Gets or sets the operator.
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, `18`, `19`, `20`, `21`, `22`, `23`, `24`, `25`, `26`, `27`, `28`, `29`
- `value` (string, optional, nullable) — Gets or sets the value.
- `secondaryValue` (string, optional, nullable) — Gets or sets the secondary value.
- `values` (list of string, optional, nullable) — Gets or sets the values.
- `conjunct` (enum, optional) — Gets or sets the operator.
  - Allowed values: `0`, `1`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "items": [
    {
      "id": 1024,
      "code": "PRJ-2024-001",
      "isActive": true,
      "isAvailableOnline": false,
      "isPublic": true,
      "isDeleted": false,
      "name": "Clean Water Initiative",
      "description": "A project aimed at providing clean drinking water to rural communities.",
      "sortOrder": 10,
      "emailAddresses": "contact@cleanwater.org",
      "metadataFields": [
        {
          "name": "Region",
          "value": "Sub-Saharan Africa"
        }
      ],
      "image": "https://cdn.raisedonors.com/images/projects/clean-water.jpg",
      "isPinned": false,
      "donorAmount": 350,
      "giftAmount": 1200,
      "createdDateTime": "2023-01-15T09:30:00Z",
      "modifiedDateTime": "2024-05-10T16:45:00Z",
      "raisedAmount": "125000.00",
      "averageGiftAmount": "357.14",
      "firstGiftDate": "2023-01-20T12:00:00Z",
      "lastGiftDate": "2024-05-05T14:30:00Z",
      "isSystem": false,
      "percentageRecurringGift": 42.5,
      "externalIdentifier": "EXT-PRJ-0001",
      "impactData": "Provided clean water to over 10,000 people in 2023."
    }
  ],
  "total": 1
}
```

**SDK Code**

```python
import requests

url = "https://prod-api.raisedonors.com/api/Project/query"

payload = {}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://prod-api.raisedonors.com/api/Project/query';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://prod-api.raisedonors.com/api/Project/query"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://prod-api.raisedonors.com/api/Project/query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://prod-api.raisedonors.com/api/Project/query")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://prod-api.raisedonors.com/api/Project/query', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://prod-api.raisedonors.com/api/Project/query");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://prod-api.raisedonors.com/api/Project/query")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```