Custom properties are extremely useful, when you want to record data in ORND that can't be entered in the fields available by default.
You can learn more on how they work and how you can set them up here.
This article is going to explore how custom properties are displayed in our publically available API.
You can add as many custom properties as you've created in the "Settings" section.
The properties section for each endpoint is basically an object with separate values for each property.
Depending on the type of custom property the notation of those values might change.
For example, if the custom property is of type "Number" then they'll look as follows (no quotes):
Note: The notation above is the same for properties of type "Boolean".
While for string the notation is as follows:
Please note that for the request body we're using the unique identifier of the property and not its name:
Once created the property's identifier cannot be changed, only its name.
In order to update a custom property to a member you can execute a PUT request to the respective endpoint.
Note: It doesn't matter whether you're going to be setting a fresh value of the property for a member or updating an existing value, you can use this method for both cases.
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
Note: When you're making a PUT request for the properties object you're updating each property separately.
For example if a member has 2 properties recorded and you try to put a third one, then the total number of properties recorded for that member will be 3, so the new one won't replace the previous ones, the object will just be expanded.
If you'd like to remove the value of a custom property for a specific object you should set it to null (no quotes, regardless of the property type).