Create a Tracker Item with Custom Fields
Please create a 2 new custom fields in your tracker, one of them should be a integer custom field with 0 min and 10 max value, other one should be a choice field with option1, option2, and option3 choice options
Use the following JSON request to create a tracker item
{
"name": "My first tracker item with custom field",
"description": "I love this API",
"customFieldValues": [
{
"fieldId": 10001,
"type": "IntegerFieldValue",
"value": 5
},
{
"fieldId": 1000,
"type": "OptionChoiceFieldValue",
"values": [ 1, 3 ]
}
]
}
Field ID is depends on your tracker layout, it might be differ from the example above, please check the '/v2/tracker/{trackerId}/field' API end point to get the valid ID.Because of the 10001 field is a integer field, type is set to to IntegerFieldValue, value is set to 5. In case you want to trigger a validation message, please set the value 11 or more.
We want to set the option1 and option3 values for 1000 choice field, to do that we need to use OptionChoiceFieldValue type, and ID of option1 and option3
Was this helpful?