Passer au contenu principal
POST
/
v2
/
private
/
fundraisers
/
search
Find Campaign
curl --request POST \
  --url https://api.crowdchange.dev/v2/private/fundraisers/search \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "page": 123,
  "limit": 123,
  "sort": "<string>",
  "direction": "<string>",
  "email": "<string>",
  "status": "<string>",
  "is_hidden": true,
  "created_at": {
    "<": "<string>",
    "<=": "<string>",
    "=": "<string>",
    ">=": "<string>",
    ">": "<string>"
  },
  "amount_goal": {
    "<": 123,
    "<=": 123,
    "=": 123,
    ">=": 123,
    ">": 123
  },
  "amount_raised": {
    "<": 123,
    "<=": 123,
    "=": 123,
    ">=": 123,
    ">": 123
  },
  "after_id": 123,
  "lang": "<string>",
  "filter_by_lang": 123,
  "tags": [
    "<string>"
  ]
}
'
[
  {
    "id": 1,
    "partner_id": 10,
    "name": "Campaign",
    "created_at": "2022-01-01 16:00:03",
    "amount_goal": 1000,
    "amount_raised": 550,
    "amount_raised_formatted": "$550",
    "dt_start": "2021-01-01 08:00:00",
    "dt_end": "2021-01-01 16:00:00",
    "location": "100 Main Street, Toronto, ON",
    "url": "https://demo.crowdchange.dev/2",
    "n_donors": 100,
    "n_teams": 50,
    "n_pages": 50,
    "status": "approved",
    "status_code": "approved",
    "is_hidden": false,
    "auto_open_at": "2022-03-01 00:00:00",
    "auto_close_at": "2022-03-01 00:00:00",
    "closed_at": "2022-03-01 00:00:00",
    "archived_at": "2022-03-01 00:00:00",
    "language": "en",
    "in_support_name": "Cancer Research",
    "in_support_code": "CR-123",
    "appeal_code": "GEN-123",
    "user": {
      "id": 1,
      "name": "John Snow",
      "first_name": "John",
      "last_name": "Snow",
      "title": "Mr.",
      "email": "john@crowdchange.co"
    },
    "organization": {
      "id": 1,
      "name": "Crowdchange",
      "custom_id": "CrowdchangeID"
    },
    "fundraiser_template": {
      "id": 1,
      "name": "Template"
    },
    "images": {
      "original": "https://img.crowdchange.co/files/abc.png?tr=w-[width],h-[height]"
    },
    "custom_data": [
      {
        "field_id": 1001,
        "source_id": 11,
        "name": "Phone Number",
        "content": "555-123-4567",
        "field_custom_id": "ABC-123",
        "response_custom_id": "ABC-123"
      }
    ],
    "tags_list": [
      "tag1",
      "tag2"
    ]
  }
]

Body

text
string
Search term.
page
integer
Page number. Default: 1
limit
integer
Number of results to return. Default: 100
sort
string
Key to sort by. Allowed values: id, name, amount_raised, amount_goal
direction
string
Direction of sorting. Allowed values: asc, desc
email
string
Email filter.
status
string
Campaign status. Allowed values: approved, pending
is_hidden
boolean
True if campaign is hidden, otherwise false.
created_at
object
Campaign’s creation date filter.
amount_goal
object
Campaign’s amount goal filter.
amount_raised
object
Campaign’s amount raised filter.
after_id
integer
Return teams after Team ID.
lang
string
API’s locale. Allowed values: en, fr
filter_by_lang
integer
Filter campaigns only available in locale
tags
string[]
List of fundraiser tags.

Response

Returns an array of objects with the following fields.
id
integer
Campaign ID.
partner_id
integer
Site ID.
name
string
Campaign name.
created_at
string
Campaign creation date.
amount_goal
number
Goal amount.
amount_raised
number
Amount raised by the campaign.
amount_raised_formatted
string
Formatted amount raised by the campaign, includes currency symbol.
dt_start
string
Date and time when campaign starts.
dt_end
string
Date and time when campaign ends.
location
string
Campaign location.
url
string
URL to campaign.
n_donors
integer
Number of donors.
n_teams
integer
Number of teams.
n_pages
integer
Number of pages.
status
string
Campaign’s approval status. Allowed values: approved, pending
status_code
string
Campaign’s activity status code. Allowed values: live, deleted, archived, pending_approval, opening_soon, closed
is_hidden
boolean
True if campaign is hidden, otherwise false.
auto_open_at
string
Date when campaign is scheduled to auto-open
auto_close_at
string
Date when campaign is scheduled to auto-close
closed_at
string
Date when campaign was closed
archived_at
string
Date when campaign was archived
language
string
Campaign language. Allowed values: en, fr
in_support_name
string
Value of In support of field associated with campaign.
in_support_code
string
Code provided for In support of field.
appeal_code
string
Appeal code.
user
object
organization
object
fundraiser_template
object
images
object
custom_data
object[]
List of custom questions and responses.
tags_list
any[]
Campaign tags.
Other responses
StatusDescription
400Bad Request
403Forbidden
[
  {
    "id": 1,
    "partner_id": 10,
    "name": "Campaign",
    "created_at": "2022-01-01 16:00:03",
    "amount_goal": 1000,
    "amount_raised": 550,
    "amount_raised_formatted": "$550",
    "dt_start": "2021-01-01 08:00:00",
    "dt_end": "2021-01-01 16:00:00",
    "location": "100 Main Street, Toronto, ON",
    "url": "https://demo.crowdchange.dev/2",
    "n_donors": 100,
    "n_teams": 50,
    "n_pages": 50,
    "status": "approved",
    "status_code": "approved",
    "is_hidden": false,
    "auto_open_at": "2022-03-01 00:00:00",
    "auto_close_at": "2022-03-01 00:00:00",
    "closed_at": "2022-03-01 00:00:00",
    "archived_at": "2022-03-01 00:00:00",
    "language": "en",
    "in_support_name": "Cancer Research",
    "in_support_code": "CR-123",
    "appeal_code": "GEN-123",
    "user": {
      "id": 1,
      "name": "John Snow",
      "first_name": "John",
      "last_name": "Snow",
      "title": "Mr.",
      "email": "john@crowdchange.co"
    },
    "organization": {
      "id": 1,
      "name": "Crowdchange",
      "custom_id": "CrowdchangeID"
    },
    "fundraiser_template": {
      "id": 1,
      "name": "Template"
    },
    "images": {
      "original": "https://img.crowdchange.co/files/abc.png?tr=w-[width],h-[height]"
    },
    "custom_data": [
      {
        "field_id": 1001,
        "source_id": 11,
        "name": "Phone Number",
        "content": "555-123-4567",
        "field_custom_id": "ABC-123",
        "response_custom_id": "ABC-123"
      }
    ],
    "tags_list": [
      "tag1",
      "tag2"
    ]
  }
]