Some Contributions endpoints share a common data model for requests; these are described below.
Contribution
Example POST data (note that this is submitted with content-type application/json
):
{
"contactId": "VN97A11GJ53",
"amount": 23.32,
"designation": { "designationId": "2"},
"method": "CHECK",
"checkDate": "1925-04-07",
"checkNumber": "123456",
"depositDate": "1925-04-11",
"depositNumber": "987654321",
"bankAccount": { "bankAccountId": 432 },
"batch": {
"batchId": "21",
"batchName": "MyBatchName"
},
"disclosureFields": [
{
"disclosureFieldId": 1,
"designationId": -1,
"value": "23"
},
{
"disclosureFieldId": 20,
"designationId": 2,
"value": "MyVAL"
}
],
"attributedContactIds": ["MERGE1ND1"],
"date": "1925-04-10",
"onlineRef": "CRZ",
"marketSource": "DSP",
"sourceCode": { sourceCodeId: 42 },
"pledge": { "pledgeId": "V46898" },
"note": "note goes here"
}
Batches require significant special handling, which differs depending on whether Financial Batch Manager is enabled. Note that it will not be enabled for most people, and when not enabled, batch is optional (and you probably won’t want to submit anything for it).
The following rules are applied to the specified batch for a tenant that has Financial Batch Manager turned off:
Batch specification | Result |
---|---|
A batch Id that references an existing batch is specified | Referenced batch is used |
A batch Id that does not reference an existing batch is specified | Error message is returned |
Only a batch name that references an existing batch is specified | Referenced batch is used |
Only a batch name that does not reference an existing batch is specified | A new batch with the specified name is created |
The following rules are applied to the specified batch for a tenant that has Financial Batch Manager turned on:
Batch specification | Result |
---|---|
A batch Id that references an existing batch is specified | Referenced batch is used |
A batch Id that does not reference an existing batch is specified | Error message is returned |
Only a batch name that references an existing batch is specified | Referenced batch is used |
Only a batch name that does not reference an existing batch is specified | Error message is returned |
No batch is specified | Error message is returned |
Required Properties:
Key | Value |
---|---|
| String; The contact ID of the contributor. |
| String; The amount of the contribution. Value that has more than 2 digits after decimal point will not be accepted. |
|
|
Optional Properties:
Key | Value |
---|---|
|
Note: |
|
|
| The method used for this contribution: |
| String; A date string between |
| String; the check number associated with this contribution, if any. |
| String; A date string between |
| String; the deposit number associated with this contribution, if any. |
|
|
| String; A date string between |
| String; A Direct Marketing Code to associate with this contribution. |
| String; A Market Source to associate with this contribution. |
|
|
| An array of contact IDs to attribute to the contribution. |
|
|
| A note detailing the contribution. |
Contribution Response
Successful contribution creation returns the ID of the newly created contribution. Example:
{
"contributionId": "VN8429H8VZ2"
}
The status code of the response indicates whether a new contact was created (201
) or if an existing one was updated (200
).