window.addEvent('domready', function() { new Fx.SmoothScroll(); });

Endpoints

Donors

The Donors API allows you to retreive, add and update donor informations, mail and email addresses.

Object

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
Name Type Description
id Number the myCerfa unique address id
type String mail address type. Can be any of /addressestypes
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
default Number 0 or 1 (only one record can be equal to 1)
emails Array
Name Type Description
id Number the myCerfa unique email address id
email String email address 
default Number 0 or 1 (only one record can be equal to 1)

Get a single Donor

GET
/donors/:donorid

Path Parameters

Name Type
donorid Number (required)

Query Parameters

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

Example

https://mycerfa.com/api/v1/donors/123
https://mycerfa.com/api/v1/donors?reference=:yourreference

Response

[
 {
 "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"
  }
 ]
}
]

Get Donors List

GET
/donors

Example

https://mycerfa.com/api/v1/donors

Create a Donor

POST
/donors

Post Parameters

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
email 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.

Example

https://mycerfa.com/api/v1/donors

Response

{
 "data": 4013504,
 "error": false,
 "status": 200
}

Note: data represents the Donor mycerfa unique id

Update the Donor details

POST
/donors/:donorid

Post Parameters

Please refer to Create a Donor Post Parameters section

Example

https://mycerfa.com/api/v1/donors/4013504

Response

{
 "data": 4013504,
 "error": false,
 "status": 200
}

Donor Titles

The Address Types API allows you to retrieve, add and update donor address types.

Object

Name Type Description
id Number myCerfa unique donor title id 
label String donor title label

Get a single Donor Title

GET
/donortitles/:donortitleid

Path Parameters

Name Type
donortitleid Number (required)

Example

https://mycerfa.com/api/v1/donortitles/278

Response

[
 {
  "id": "278",
  "label": "Monsieur et Madame"
 }
]

Get Donor Titles List

GET
/donortitles

Example

https://mycerfa.com/api/v1/donortitles

Create a Donor Title

POST
/donortitles

Post Parameters

Name Type Description
label String (required) Donor Title label

Example

https://mycerfa.com/api/v1/donortitles

Response

{
 "data": 1234,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor title unique id

Update a Donor Title

POST
/donortitles/:donortitleid

Post Parameters

Please refer to Create a Donor Title Post Parameters section

Example

https://mycerfa.com/api/v1/donortitles/1234

Response

{
 "data": 1234,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor title unique id


Donor Addresses

The Donor addresses API allows you to add and update donor mail addresses.

Create an Address

POST
/donors/:donorid/addresses

Post Parameters

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.

Example

https://mycerfa.com/api/v1/donors/4013504/addresses

Response

{
 "data": 4032332,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor address unique id

Update an Address

POST
/donors/:donorid/addresses/:addressid

Post Parameters

Please refer to Create an Address Post Parameters section

Example

https://mycerfa.com/api/v1/donors/4013504/addresses/4032332

Response

{
 "data": 4032332,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor address unique id


Address Types

The Address Types API allows you to retrieve, add and update donor address types.

Object

Name Type Description
id Number myCerfa unique address type id 
label String address type label

Get a single Address Type

GET
/addresstypes/:addresstypeid

Path Parameters

Name Type
addresstypeid Number (required)

Example

https://mycerfa.com/api/v1/addresstypes/123

Response

[
 {
  "id": "123",
  "label": "Home"
 }
]

Get Address Types List

GET
/addresstypes

Example

https://mycerfa.com/api/v1/addresstypes

Create an Address Type

POST
/addresstypes

Post Parameters

Name Type Description
label String (required) Address Type label

Example

https://mycerfa.com/api/v1/addresstypes

Response

{
 "data": 2467280,
 "error": false,
 "status": 200
}

Note: data represents mycerfa address type unique id

Update an Address Type

POST
/addresstypes/:addresstypeid

Post Parameters

Please refer to Create an Address Typw Post Parameters section

Example

https://mycerfa.com/api/v1/addresstypes/2467280

Response

{
 "data": 2467280,
 "error": false,
 "status": 200
}

Note: data represents mycerfa address type unique id


Donor Emails

The Donor emails API allows you to add and update donor emails.

Create an Email

POST
/donors/:donorid/emails

Post Parameters

Name Type Description
email 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.

Example

https://mycerfa.com/api/v1/donors/4013504/emails

Response

{
 "data": 43213,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor email unique id

Update an Email

POST
/donors/:donorid/emails/:emailid

Post Parameters

Please refer to Create an Email Post Parameters section

Example

https://mycerfa.com/api/v1/donors/4013504/emails/43213

Response

{
 "data": 43213,
 "error": false,
 "status": 200
}

Note: data represents mycerfa donor email unique id


Vous êtes un Donateur ? Cliquez-ici