Storing custom data
When you want to record data in ORND that can't be entered in the fields available by default you can use our custom properties functionality.
Learn more about how they work and how you can set them up here.
You can add as many custom properties as you've created in the "Settings" section.
Custom properties are contained within a separate object for the specific endpoint for which they've been added.
Depending on the type of custom property the notation of those values might change:
Type | Notation in the API |
---|---|
String | With Quotes (""). Example: "CustomStringProperty": "stringValue" . |
Text | With Quotes (""). Example: "CustomTextProperty": "textValue" . |
Number | Without quotes. Example: "CustomNumberProperty": 123456 . |
File | With Quotes (""). Example: "CustomFileProperty": "download/org-id/attachments/attachment-id" >.The file URL can no longer be accessed freely without any authentication. You need to append "app.officernd.com" and authenticate with a "connect.sid" cookie generated for each admin who browses the admin UI of OfficeRnD. |
Date | With Quotes (""). Example: "CustomDateProperty": "2022-01-01T00:00:00.000Z" .The date format is always in the ISO format "YYYY-MM-DDTHH:mm:ss.sssZ", regardless of the date and time format you're using in the UI. |
Boolean | Without Quotes. Example: "CustomStringProperty": true . |
Select | With Quotes (""). Example: "CustomStringProperty": "stringValue" . |
Multi-Select | This is an array of strings. Example: ["firstValue","secondValue","thirdValue"] . |
Note
Custom properties will appear in the "properties" object, only when they're populated for a specific entity.
Empty or null values will appear, only if there was a value set at one point and was removed afterwards.
How To Set Or Update a Custom Property
In order to update a custom property to a member you can execute a PUT request to the respective endpoint.
You can also set a custom property for an entity during its creation, just add the "properties" object when POST-ing said entity.
The endpoint in the request URL depends on what the custom property applies to.
The example below is for a custom property that applies to members.
Request method: PUT
Request URL: https://app.officernd.com/i/organizations/org-slug/members/member-id
Request body:
{
"properties": {
"CustomProperty1": "test1",
"CustomProperty2": "test2",
"CustomProperty3": "test3",
"CustomProperty4": "test4"
}
}
Note
It's not necessary to always update the whole "properties" object.
A PUT request containing a single property will update only the selected property.
Example:
There are 4 custom properties that apply to members.
If you wish to update only one of them, you need only pass the property you want to update in the request body.
Updated 11 months ago