Custom fields

Donations, recurring payments, fundraising pages, donation receipts and persons may include custom fields. By these custom fields you can extend the default data model by your own fields.

The custom field values are part of the JSON structure:

{
    ...
    "fb_custom_fields":[
        {
            "id":7,
            "name":"A special date",
            "value":"2010-04-12"
        },
        {
            "id":10,
            "name":"Favorite color",
            "value":"red"
        }
    ]
}

When editing an object (e.g. a person) you are able to commit custom fields as well. Please use the custom field id to specify a field.

For example if you want to change the favorite color of a person just call PUT /persons/:id.json

{
    "fb_custom_fields":[
         {
            "id":10,
            "value":"red"
        }
    ]
}

To delete resp. clear a custom field value please use an empty value

{
    "fb_custom_fields":[
         {
            "id":10,
            "value":""
        }
    ]
}

Format for custom field values

Please note that all custom field values are given as strings. So even numbers like 123 are represented as "123".

TypeExampleNote
text"a sample text"
textarea"a sample\r\ntext"Line breaks are given as \r\n
date"2022-05-22"YYYY-MM-DD
number"123.45"
integer"123"
country"DE"ISO 3166 ALPHA-2
email"[email protected]"
select"a selected value"
radio"a selected value"
checkbox"1""1" = true
"" = false