Add a contractor member profile with custom fields
First, load the available custom fields in OnLocation (GET /customfield/element/sp-member).
Then, POST Request to /sp/member with a key that is called customfields, holding the id: value pair of the data.
Your return will show you the type of contractor member custom field, its ID number, and its name in OnLocation.
The example below shows a short-text custom field, titled 'Vehicle Registration', ID number 82:
{
"cf_element": [
{
"id": 82,
"cf tab id": 9,
"is visible": true,
"is mandatory": false,
"is unique": false,
"title": "Vehicle Registration"
"config": null,
"created by": 24,
"updated by": null,
"created": "2021-05-06T02:42:40+12:00",
"modified": null,
"element_type": "short-text"
}
]
}
Finally, fire the POST updating the custom field.
For example:
{
"name":"contractor member's name",
"customfields": {
"82" : "information to add to the custom field"
}
}