{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","examples":{"codes":[]},"results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Custom fields","type":"basic","slug":"custom-fields","excerpt":"","body":"Donations, recurring payments, fundraising pages and persons may include custom fields. By these custom fields you can extend the default data model by your own fields.\n\nThe custom field values are part of the JSON structure:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    ...\\n    \\\"fb_custom_fields\\\":[\\n        {\\n            \\\"id\\\":7,\\n            \\\"name\\\":\\\"A special date\\\",\\n            \\\"value\\\":\\\"2010-04-12\\\"\\n        },\\n        {\\n            \\\"id\\\":10,\\n            \\\"name\\\":\\\"Favorite color\\\",\\n            \\\"value\\\":\\\"red\\\"\\n        }\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nWhen 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.\n\nFor example if you want to change the favorite color of a person just call *PUT /persons/:id.json*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"fb_custom_fields\\\":[\\n         {\\n            \\\"id\\\":10,\\n            \\\"value\\\":\\\"red\\\"\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"PUT /persons/:id.json\"\n    }\n  ]\n}\n[/block]\nTo delete resp. clear a custom field value please use an empty value\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"fb_custom_fields\\\":[\\n         {\\n            \\\"id\\\":10,\\n            \\\"value\\\":\\\"\\\"\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"PUT /persons/:id.json\"\n    }\n  ]\n}\n[/block]","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5cc053ed582b650045e6d8b9","project":"571f5e8cd8667f0e00a3c498","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["571f5e8cd8667f0e00a3c49c","571f73cfcb4baa0e00d13a80","571f7451cb4baa0e00d13a88","571f7d2720695f3400f38797","571f7fb0ac2a080e0014c661","571f884be54f2d0e003ebb0a","572200c9ecb38d0e00d80ebd","572c301e7c8eff0e00aaa174","57df91b2c6348d0e0020c452","57e104db9ff1e21900a721ab","57fd04caeaa77f19008b8202","5899c7113514ce0f0014da84","5cbeda4b862d090013abd413","5e60d6278f8b380072f0b1e3"],"_id":"571f5e8cd8667f0e00a3c49b","hasDoc":true,"releaseDate":"2016-04-26T12:26:52.312Z","__v":14,"hasReference":true,"createdAt":"2016-04-26T12:26:52.312Z","project":"571f5e8cd8667f0e00a3c498"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"JSON-REST-API (API-Package)","slug":"rest-api-json","order":9,"from_sync":false,"reference":false,"_id":"5cbeda4b862d090013abd413","project":"571f5e8cd8667f0e00a3c498","version":"571f5e8cd8667f0e00a3c49b","createdAt":"2019-04-23T09:26:35.210Z","__v":1},"user":"5720ba18c669e80e00c35051","createdAt":"2019-04-24T12:17:49.895Z","__v":0,"parentDoc":null}
Donations, recurring payments, fundraising pages 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: [block:code] { "codes": [ { "code": "{\n ...\n \"fb_custom_fields\":[\n {\n \"id\":7,\n \"name\":\"A special date\",\n \"value\":\"2010-04-12\"\n },\n {\n \"id\":10,\n \"name\":\"Favorite color\",\n \"value\":\"red\"\n }\n ]\n}", "language": "json" } ] } [/block] 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* [block:code] { "codes": [ { "code": "{\n \"fb_custom_fields\":[\n {\n \"id\":10,\n \"value\":\"red\"\n }\n ]\n}", "language": "json", "name": "PUT /persons/:id.json" } ] } [/block] To delete resp. clear a custom field value please use an empty value [block:code] { "codes": [ { "code": "{\n \"fb_custom_fields\":[\n {\n \"id\":10,\n \"value\":\"\"\n }\n ]\n}", "language": "json", "name": "PUT /persons/:id.json" } ] } [/block]