How to: Create a Participant Template
A Participant Template is created based on a participant category-sub-category pair. The attributes created in the participant template override the attributes created for the participant.
The process to create a template:
- Define a Participant by creating the Participant Attributes.
- The Participant Instance is created using the Participant Template.
The following examples show a request body for creating a Participant Template:
{
"name": "templates",
"subCategory": "truck",
"attributes": [
{
"name": "color",
"description": "color of truck",
"tags": [
"vehicles"
],
"dataType": "string",
"indexed": false,
"defaultValue": "black",
"validation": {
"valueOneOf": [
"red","blue","black"
],
"required": false
}
},
{
"name": "capacity",
"description": "capacity of truck",
"tags": [
"vehicles"
],
"dataType": "number",
"indexed": false,
"defaultValue": 20,
"validation": {
"valueOneOf": [
20,30
],
"required": false
}
}
],
"callback": {
"url":"https://examplecallbackurl.com",
"meta": {
"API req": "TemplatePostAPI"
}
}
}
Updated about 1 month ago