The Donors API allows you to retreive, add and update donor informations, mail and email addresses.
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | Number | myCerfa unique donor id | |||||||||||||||||||||||||||
entity_id | Number | your account unique donor id | |||||||||||||||||||||||||||
type | String | donor type. Values: Particulier / Professionnel |
|||||||||||||||||||||||||||
title | String | donor title (relevant only when type is Professionnel). Can be any of /donorstitles |
|||||||||||||||||||||||||||
first | String | first name | |||||||||||||||||||||||||||
name | String | last name | |||||||||||||||||||||||||||
contact_pro | String | contact first and last (relevant only when type is Professionnel |
|||||||||||||||||||||||||||
tel_home | String | home phone number | |||||||||||||||||||||||||||
tel_office | String | office phone number | |||||||||||||||||||||||||||
mobile1 | String | mobile 1 phone number | |||||||||||||||||||||||||||
mobile2 | String | mobile 2 phone number | |||||||||||||||||||||||||||
birthday | Date | birthday date (format YYYY-MM-DD) | |||||||||||||||||||||||||||
other | String | other information | |||||||||||||||||||||||||||
sending_pref | String | sending preferences. Values: courrier or email |
|||||||||||||||||||||||||||
web_site | String | web site url | |||||||||||||||||||||||||||
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 |
|||||||||||||||||||||||||||
active | Number | 1: active / 0: inactive | |||||||||||||||||||||||||||
addresses | Array |
|
|||||||||||||||||||||||||||
emails | Array |
|
Name | Type |
---|---|
donorid | Number (required) |
Name | Type | Description |
---|---|---|
reference | String | get donor by its reference field (helpful to store external donor reference in order to link myCerfa to your own system donor). In this case only, donorid is not required |
https://mycerfa.com/api/v1/donors/123
https://mycerfa.com/api/v1/donors?reference=:yourreference
[ { "id": "1", "entity_id": "1", "type": "Particulier", "title": "Monsieur", "first": "Paul", "name": "Durand", "contact_pro": "", "tel_home": "0143556372", "tel_office": "", "mobile1": "0638293638", "mobile2": "0638292028", "birthday": "", "other": "", "sending_pref": "courrier", "web_site": "", "reference": "", "active": "1", "addresses": [ { "id": "1", "address_type": "Maison", "address": "65 rue Trébois", "address_comp": "", "zip": "92300", "town": "LEVALLOIS PERRET", "country": "FRANCE", "default": "0" }, { "id": "3", "address_type": "Bureau", "address": "12 rue du Four", "address_comp": "", "zip": "75006", "town": "PARIS", "country": "FRANCE", "default": "1" } ], "emails": [ { "id": "1", "email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.", "default": "1" }, { "id": "109", "email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.", "default": "0" } ] } ]
https://mycerfa.com/api/v1/donors
Name | Type | Description | |
---|---|---|---|
type | String | (optional) | donor type. Values: Particulier / Professionnel . Default: Particulier |
title | String | (optional) | donor title (relevant only when type is Particulier). Can be any of /donorstitles |
first | String | (optional) | first name |
name | String | (required) | last name |
contact_pro | String | (optional) | contact first and last (relevant only when type is Professionnel |
tel_home | String | (optional) | home phone number |
tel_office | String | (optional) | office phone number |
mobile1 | String | (optional) | mobile 1 phone number |
mobile2 | String | (optional) | mobile 2 phone number |
birthday | Date | (optional) | birthday date (format YYYY-MM-DD) |
other | String | (optional) | other information |
sending_pref | String | (optional) | sending preferences. Values: courrier or email . Default: email |
web_site | String | (optional) | web site url |
reference | String | (optional) | 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_type | String | (required) | mail address type. Can be any of /addressestypes |
address | String | (required) | mail address |
address_comp | String | (optional) | mail address next |
zip | String | (required) | zip code |
town | String | (required) | town |
country | String | (required) | country. Can be any of /countries |
String | (optional) | email address |
Note: email and address added though this resource, will be considered as default. To add more emails or addresses, please refer to the Email and Address endpoints.
https://mycerfa.com/api/v1/donors
{ "data": 4013504, "error": false, "status": 200 }
Note: data
represents the Donor mycerfa unique id
https://mycerfa.com/api/v1/donors/4013504
{ "data": 4013504, "error": false, "status": 200 }
The Address Types API allows you to retrieve, add and update donor address types.
Name | Type | Description |
---|---|---|
id | Number | myCerfa unique donor title id |
label | String | donor title label |
Name | Type |
---|---|
donortitleid | Number (required) |
https://mycerfa.com/api/v1/donortitles/278
[ { "id": "278", "label": "Monsieur et Madame" } ]
https://mycerfa.com/api/v1/donortitles
Name | Type | Description | |
---|---|---|---|
label | String | (required) | Donor Title label |
https://mycerfa.com/api/v1/donortitles
{ "data": 1234, "error": false, "status": 200 }
Note: data
represents mycerfa donor title unique id
https://mycerfa.com/api/v1/donortitles/1234
{ "data": 1234, "error": false, "status": 200 }
Note: data
represents mycerfa donor title unique id
The Donor addresses API allows you to add and update donor mail addresses.
Name | Type | Description | |
---|---|---|---|
address_type | String | (required) | mail address type. Can be any of /addressestypes |
address | String | (required) | mail address |
address_comp | String | (optional) | mail address next |
zip | String | (required) | zip code |
town | String | (required) | town |
country | String | (required) | country. Can be any of /countries |
default | Number | (optional) | 0 or 1 (only one record can be equal to 1) |
Note: when creating or updating an address, if default
=1, all the other addresses of the given donor (donorid
) become default
=0.
In addition, the only way to pass an address to default
=0 (or multiple addresses), is by defining default
=1 to a new or an existing address.
https://mycerfa.com/api/v1/donors/4013504/addresses
{ "data": 4032332, "error": false, "status": 200 }
Note: data
represents mycerfa donor address unique id
https://mycerfa.com/api/v1/donors/4013504/addresses/4032332
{ "data": 4032332, "error": false, "status": 200 }
Note: data
represents mycerfa donor address unique id
The Address Types API allows you to retrieve, add and update donor address types.
Name | Type | Description |
---|---|---|
id | Number | myCerfa unique address type id |
label | String | address type label |
Name | Type |
---|---|
addresstypeid | Number (required) |
https://mycerfa.com/api/v1/addresstypes/123
[ { "id": "123", "label": "Home" } ]
https://mycerfa.com/api/v1/addresstypes
Name | Type | Description | |
---|---|---|---|
label | String | (required) | Address Type label |
https://mycerfa.com/api/v1/addresstypes
{ "data": 2467280, "error": false, "status": 200 }
Note: data
represents mycerfa address type unique id
https://mycerfa.com/api/v1/addresstypes/2467280
{ "data": 2467280, "error": false, "status": 200 }
Note: data
represents mycerfa address type unique id
The Donor emails API allows you to add and update donor emails.
Name | Type | Description | |
---|---|---|---|
String | (required) | email address | |
default | Number | (required) | 0 or 1 (only one record can be equal to 1) |
Note: when creating or updating an email, if default
=1, all the other emails of the given donor (donorid
) become default
=0.
In addition, the only way to pass an email to default
=0 (or multiple emails), is by defining default
=1 to a new or an existing email.
https://mycerfa.com/api/v1/donors/4013504/emails
{ "data": 43213, "error": false, "status": 200 }
Note: data
represents mycerfa donor email unique id
https://mycerfa.com/api/v1/donors/4013504/emails/43213
{ "data": 43213, "error": false, "status": 200 }
Note: data
represents mycerfa donor email unique id