API Custom Fields

All Nexudus records can have any number of custom fields attached to them. These are added as a form of Name/Value collections to the CustomFields.Data array.

If the custom fields have been defined as to be displayed in the UI, Nexudus assigns an internal identifier to each field which is then used as the Name property for that field in the Data array. If you add the fields via the API, it is entirely up to you select the name of the field.

📘

Keep names simple

Although technically possible, we recommend not to use spaces or special characters in the name of the fields.

🚧

Field names must be unique

Within a record, the names of custom field must be unique. If you try to submit two or more fields with the same name, only the first field will be persisted and the rest of the fields with that same name will be ignored.

This is an example of how to add a custom field

{
   "CoworkerType":1,
   "FullName": "John Doe",
   ...
   "CustomFields":{
      "Data":[
         {
            "Name":"1016814799",
            "Value":"Google,Facebook",
            "Type":"string"
         },
         {
            "Name":"MyField",
            "Value":"My Value",
            "Type":"string"
         }
      ]
   }
}

Searching Custom Fields

Searching records based on custom fields has a special syntax. This includes the usual parameter name with the prefix of the entity name and the field to search (CustomFields, in this case) followed by the name of the field.

GET ...?Coworker_CustomFields_:fieldName=:fieldValue

For example, to search the list of coworkers by the field "MyField"

GET /api/spaces/coworkers?Coworker_customFields_MyField=My%20Value