Skip to content

Commit dfe2b7f

Browse files
committed
docs: updates for changes to donation details, fundraiser state, and webhooks
1 parent 59bf7d3 commit dfe2b7f

6 files changed

Lines changed: 60 additions & 8 deletions

File tree

schema/schemata/donation-detail.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ definitions:
129129
example: Christmas Donation
130130
type:
131131
- string
132+
form_type:
133+
example: online_form
134+
type:
135+
- string
136+
enum:
137+
- online_form
138+
- door_to_door_form
132139
custom_form_values:
133140
"$ref": "/schemata/common#/definitions/custom_form_values"
134141
payment:
@@ -257,6 +264,8 @@ properties:
257264
"$ref": "/schemata/project#/definitions/erp_product_number"
258265
donor_reference:
259266
"$ref": "/schemata/donation-detail#/definitions/donor_reference"
267+
form_type:
268+
"$ref": "/schemata/donation-detail#/definitions/form_type"
260269
type:
261270
- object
262271
id: schemata/donation-detail

schema/schemata/fundraiser.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,17 @@ definitions:
5353
description: The monetary goal for this fundraiser
5454
"$ref": "/schemata/common#/definitions/amount"
5555
state:
56-
description: The state of this fundraiser
57-
"$ref": "/schemata/common#/definitions/state"
56+
description: The state of this fundraiser. Fundraisers in the draft and trashed states are not available via the API.
57+
example: published
58+
type:
59+
- string
60+
enum:
61+
- draft
62+
- finished
63+
- finished_hidden
64+
- hidden
65+
- published
66+
- trashed
5867
headline:
5968
description: The headline for this fundraising page
6069
example: "Firstname Lastname's Fundraiser for HelpNow"

source/includes/resources.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ HTTP/1.1 200 OK
243243
## <a name="resource-donation-detail">Donation Details</a>
244244

245245

246-
The private details about a donation. Includes Personally Identifieable Information. A secret key is required to access this information.
246+
The private details about a donation. Includes Personal data. A secret key is required to access this information.
247247

248248
### Attributes
249249

@@ -299,6 +299,7 @@ The private details about a donation. Includes Personally Identifieable Informat
299299
| **[event:name](#resource-common)** | *string* | the name of the Event | `"Copenhagen Marathon 2013"` |
300300
| **[event:url](#resource-common)** | *uri* | | `"https://api.betternow.org/events/1234567"` |
301301
| **first_name** | *string* | The first name on the donation | `"Firstname"` |
302+
| **form_type** | *string* | <br/> **one of:**`"online_form"` or `"door_to_door_form"` | `"online_form"` |
302303
| **[fundraiser:html_url](#resource-common)** | *uri* | The current url to view the organisation page on BetterNow. This can, and does, change. Requests to old urls will be redirect to the current url. | `"https://dk.betternow.org/charities/helpnow"` |
303304
| **[fundraiser:id](#resource-common)** | *string* | Unique identifier of organisation | `1234567` |
304305
| **[fundraiser:name](#resource-common)** | *string* | The name of the Organisation | `"HelpNow"` |
@@ -468,7 +469,8 @@ HTTP/1.1 200 OK
468469
"utm_campaign": "example"
469470
},
470471
"erp_product_number": "4000",
471-
"donor_reference": "Christmas Donation"
472+
"donor_reference": "Christmas Donation",
473+
"form_type": "online_form"
472474
}
473475
```
474476

@@ -994,7 +996,7 @@ Detailed information about a single Fundraising Page on BetterNow.org
994996
| **[recipient:name](#resource-common)** | *string* | The name of the Organisation | `"HelpNow"` |
995997
| **[recipient:url](#resource-common)** | *uri* | | `"https://api.betternow.org/organisations/1234567"` |
996998
| **[slug](#resource-common)** | *string* | The current url path component to identify the fundraiser. This can, and does, change.<br/> **pattern:** `^([a-z0-9-]{2,})$` | `"firstname-lastnames-fundraiser-for-helpnow"` |
997-
| **[state](#resource-common)** | *string* | The state of this fundraiser | `"published"` |
999+
| **state** | *string* | The state of this fundraiser. Fundraisers in the draft and trashed states are not available via the API.<br/> **one of:**`"draft"` or `"finished"` or `"finished_hidden"` or `"hidden"` or `"published"` or `"trashed"` | `"published"` |
9981000
| **[team:html_url](#resource-common)** | *uri* | The url to the Team page on BetterNow | `"https://dk.betternow.org/teams/team-novo"` |
9991001
| **[team:id](#resource-common)** | *string* | unique identifier of team | `1234567` |
10001002
| **[team:name](#resource-common)** | *string* | the name of the Team | `"Team NOVO"` |

source/includes/webhooks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ between first publication date and end-date |
4545
| fundraiser_fifty_percent_goal_reached | The fundraiser has reached 50% of its goal |
4646
| fundraiser_one_hundred_percent_goal_reached | The fundraiser has reached 100% of its goal |
4747
| fundraiser_company_profile_updated | The company profile attached to the fundraiser has been updated |
48+
| fundraiser_trashed | The fundraiser has been deleted/trashed |
4849

4950
<aside class="warning">
5051
The <code>end_date</code> and <code>goal</code> can be
@@ -61,6 +62,7 @@ times if the end date is changed.
6162
| team_created_by_system | A team page is created via an integration with a third-party system |
6263
| team_created_by_user | A team page is created on the web site |
6364
| team_edited | A team page is edited |
65+
| team_trashed | The team page has been deleted/trashed |
6466

6567
### Donation activities
6668
| Activity Type | Description |

source/index.html.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ any questions.
4141

4242
## Changelog
4343

44+
2026-01-21:
45+
46+
- added `form_type` to /donation-details
47+
- added `fundraiser_trashed` and `team_trashed` webhook notifications
48+
- added missing documenation of the possible values for fundraiser `state`
49+
4450
2025-10-23:
4551

4652
- updated webhook notification retry policy: the system will now retry delivery

source/schema.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,16 @@
554554
"string"
555555
]
556556
},
557+
"form_type": {
558+
"example": "online_form",
559+
"type": [
560+
"string"
561+
],
562+
"enum": [
563+
"online_form",
564+
"door_to_door_form"
565+
]
566+
},
557567
"custom_form_values": {
558568
"$ref": "#/definitions/common/definitions/custom_form_values"
559569
},
@@ -640,7 +650,7 @@
640650
}
641651
}
642652
},
643-
"description": "The private details about a donation. Includes Personally Identifieable Information. A secret key is required to access this information.",
653+
"description": "The private details about a donation. Includes Personal data. A secret key is required to access this information.",
644654
"links": [
645655
{
646656
"description": "Info for existing donation.",
@@ -746,6 +756,9 @@
746756
},
747757
"donor_reference": {
748758
"$ref": "#/definitions/donation-detail/definitions/donor_reference"
759+
},
760+
"form_type": {
761+
"$ref": "#/definitions/donation-detail/definitions/form_type"
749762
}
750763
},
751764
"type": [
@@ -1311,8 +1324,19 @@
13111324
"$ref": "#/definitions/common/definitions/amount"
13121325
},
13131326
"state": {
1314-
"description": "The state of this fundraiser",
1315-
"$ref": "#/definitions/common/definitions/state"
1327+
"description": "The state of this fundraiser. Fundraisers in the draft and trashed states are not available via the API.",
1328+
"example": "published",
1329+
"type": [
1330+
"string"
1331+
],
1332+
"enum": [
1333+
"draft",
1334+
"finished",
1335+
"finished_hidden",
1336+
"hidden",
1337+
"published",
1338+
"trashed"
1339+
]
13161340
},
13171341
"headline": {
13181342
"description": "The headline for this fundraising page",

0 commit comments

Comments
 (0)