The Donation API allows you to retreive, add, update donations and send donation receipts (cerfa) by email.
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | Number | myCerfa unique donation id | ||||||||||||
entity_id | Number | your account unique donation id | ||||||||||||
creation_date | Date | creation date (ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ) | ||||||||||||
settlement_date | Date | donation settlement date (format:YYYY-MM-DD) | ||||||||||||
is_cumul | String | yearly cumulated receipt. Value: 1 , 0 |
||||||||||||
signature_date | Date | donation signature date (format:YYYY-MM-DD) | ||||||||||||
amount | Decimal | donation amount in euros | ||||||||||||
amounts | Array |
|
||||||||||||
payment_type | String | payment type label. Can be any of /paymenttypes |
||||||||||||
payment_reference | String | reference number of the payment | ||||||||||||
payment_bank | String | bank linked to reference number (if relevant) | ||||||||||||
form | String | form of the donation. Values: Acte authentique , Acte sous seing privé , Déclaration de don manuel or Autres |
||||||||||||
nature | String | nature of the donation. Values: Numéraire , Titres de société cotés , Autres |
||||||||||||
reference | String | donation reference | ||||||||||||
comment | String | donation comment | ||||||||||||
active | Number | 1: active / 0: inactive | ||||||||||||
cancelation_reason | String | reason of the cancelation | ||||||||||||
count_download | Number | number of times the donation receipt (cerfa) has been downloaded | ||||||||||||
count_email | Number | number of times the donation receipt (cerfa) has been sent by email | ||||||||||||
count_posting | Number | number of times the donation receipt (cerfa) has been sent by mail (though myCerfa) | ||||||||||||
origin | Number | from where the donation has been created. Values 1 : myCerfa web interface / 2 : donor web interface (myCerfa online donation) / 3 : api (partner or else) |
||||||||||||
donor_id | Number | myCerfa unique donor id | ||||||||||||
first | String | first name | ||||||||||||
name | String | last name | ||||||||||||
reference | String | internal reference (helpful to store external donor reference in order to link myCerfa to your own system donor). Can be used as a Query Parameter using /donors?reference=:reference |
||||||||||||
address_id | Number | the myCerfa unique address id | ||||||||||||
address | String | mail address | ||||||||||||
adress_comp | String | mail address next | ||||||||||||
zip | String | zip code | ||||||||||||
town | String | town | ||||||||||||
country | String | country. Can be any of /countries |
Name | Type |
---|---|
donorid | Number (required) |
donationid | Number (required) |
Name | Type | Description |
---|---|---|
reference | String | get donation by its reference field (helpful to store external donation reference in order to link myCerfa to your own system). In this case only, donationrid is not required |
https://mycerfa.com/api/v1/donors/123/donations/345
https://mycerfa.com/api/v1/donors/123/donations?reference=:your_donation_reference
[ { "id": "196", "entity_id": "2013000016", "creation_date": "2013-09-04T02:00:00Z", "settlement_date": "2013-09-03", "signature_date": "2013-09-03", "amount": "300.00", "amounts": [ { "amount": "80.00", "campaign_id": "", "campaign_label": "-" }, { "amount": "200.00", "campaign_id": "6", "campaign_label": "-" } ], "payment_type": "Virement", "payment_reference": "", "payment_bank": "", "reference": "", "comment": "", "form": "Déclaration de don manuel", "nature": "Numéraire", "active": "1", "cancelation_reason": "", "count_download": "160", "count_email": "3", "count_posting": "3", "origin": "1", "donor_id": "6", "donor_first": "", "donor_name": "D & LOGISTICS", "donor_reference": "", "address_id": "7", "donor_address": "12 rue Pascal", "donor_address_comp": "Allée A - Bat B", "donor_address_zip": "92160", "donor_address_town": "ANTONY", "donor_address_country": "FRANCE" } ]
https://mycerfa.com/api/v1/donors/:donorid/donations
Name | Type | Description | |
---|---|---|---|
donor_address_id | Number | (optional) | myCerfa unique donor address id. Default: donor default address |
amount | Decimal | (required) | donation amount (currency symbol not allowed) |
payment_type | String | (optional) | payment type label. Default: default payment type defined in general settings (your account). Can be any of /paymenttypes |
payment_reference | String | (optional) | reference number of the payment |
payment_bank | String | (optional) | bank linked to reference number (if relevant) |
settlement_date | Date | (optional) | donation settlement date (format:YYYY-MM-DD). Default: current date |
is_cumul | String | (optional) | yearly cumulated receipt. Value: 1 , 0 |
signature_date | Date | (optional) | donation signature date (format:YYYY-MM-DD). Default: current date |
article | String | (optional) | article of the donation. Multiple values accepted separated by a comma ",": 200 : 200 du CGI, 238 : 238 bis du CGI, 885 : 885-0 V bis du CGINote : if left empty, values will automatically be taken from those defined in the general settings. |
form | String | (optional) | form of the donation. Values: (Can be any of) Acte authentique , Acte sous seing privé , Déclaration de don manuel or Autres . Default: as defined in general settings (your account). |
nature | String | (optional) | nature of the donation. Values: (Can be any of) Numéraire , Titres de société cotés or Autres . Default: as defined in general settings (your account). |
reference | String | (optional) | donation reference |
comment | String | (optional) | donation comment |
campaign | String | (optional) | label of the campaign to assign the donation on |
https://mycerfa.com/api/v1/donors/:donorid/donations
{ "data": 1234567, "error": false, "status": 200 }
Note: data
represents the Donation mycerfa unique id
https://mycerfa.com/api/v1/donors/123/donations/1234567
{ "data": 1234567, "error": false, "status": 200 }
Name | Type |
---|---|
donorid | Number (required) |
donationid | Number (required) |
Parameters [:actionname] |
Name | Type | Value | Description |
---|---|---|---|---|
sendByEmail | ||||
email_to | String (optional) | [email_address] | recipient's email (if left blank, default email address is used) | |
email_cc | String (optional) | [email_address] | multiple recipients emails (use , to separate emails) | |
receipt | String (optional) | Values: original or duplicate |
attach either the original or duplicate donation receipt (if left blanck, no cerfa receipt is sent) | |
subject | String (optional) | message subject | ||
body | String (optional) | message body | ||
letter_name | String (optional) | [letter_name] | attach a letter. Can be any of /letters |
https://mycerfa.com/api/v1/donors/123/donations/345?action=sendByEmail&email_to=Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.&receipt=original&letter_name=thanks_letter
{ "data": 1234567879, "error": false, "status": 200 }
Note: data
represents the sent email mycerfa unique id
Name | Type |
---|---|
donorid | Number (required) |
donationid | Number (required) |
Parameters [:actionname] |
Type | Value | Description |
---|---|---|---|
action | String | Value: download |
action |
receipt | String | Values: original or duplicate |
witch version to dowload original or duplicate |
https://mycerfa.com/api/v1/donors/123/donations/345?action=download&receipt=original
The Payment Types API allows you to retrieve, add and update the payment types.
Name | Type | Description |
---|---|---|
id | Number | myCerfa unique payment type id |
label | String | payment type label |
deletable | Number | 0: no / 1: yes |
Name | Type |
---|---|
paymenttypeid | Number (required) |
https://mycerfa.com/api/v1/paymenttypes/278
[ { "id": "278", "label": "Chèque" } ]
https://mycerfa.com/api/v1/paymenttypes
Name | Type | Description | |
---|---|---|---|
label | String | (required) | Payment Type label |
https://mycerfa.com/api/v1/paymenttypes
{ "data": 278, "error": false, "status": 200 }
Note: data
represents mycerfa payment type unique id
https://mycerfa.com/api/v1/paymenttypes/278
{ "data": 278, "error": false, "status": 200 }
The Campaigns API allows you to retrieve, add and update the donation campaigns.
Name | Type | Description |
---|---|---|
id | Number | myCerfa unique Campaign id |
label | String | Campaign label |
active | Number | 0: activated / 1: disabled |
deletable | Number | 0: no / 1: yes |
Name | Type |
---|---|
campaignid | Number (required) |
https://mycerfa.com/api/v1/campaigns/1234
[ { "id": "1234", "label": "Collecte annuelle", "active": "1", "deletable": "1" } ]
https://mycerfa.com/api/v1/campaigns
Name | Type | Description | |
---|---|---|---|
label | String | (required) | Campaign label |
https://mycerfa.com/api/v1/campaigns
{ "data": 1234, "error": false, "status": 200 }
Note: data
represents mycerfa Campaign unique id
https://mycerfa.com/api/v1/campaigns/1234
{ "data": 1234, "error": false, "status": 200 }