When working with the CloudRadial Catalog API, the question type field uses an enum called CatalogQuestionType. The REST endpoint (/v2/catalog) returns numeric integer values, while the OData endpoint (/v2/odata/catalogquestion) returns the string enum names. This article provides the complete reference for both representations.
CatalogQuestionType Enum Reference
| String Name (OData) | Numeric Value (REST) | Description |
|---|---|---|
TextField |
0 | Short text input |
MemoField |
10 | Long text / memo input |
CheckBoxField |
20 | Checkbox (boolean) |
NumberField |
30 | Number input |
DateField |
40 | Date picker |
EmailField |
50 | Email address input |
PhoneField |
60 | Phone number (USA format) |
FileUploadField |
70 | File upload |
MultiChoiceField |
80 | Multiple choice (radio buttons) |
MultiSelectField |
90 | Multiple select (checkboxes) |
IPAddress |
100 | IP address input |
MACAddress |
110 | MAC address input |
Comment |
120 | Comment / note |
MultiChoiceDropdown |
130 | Multiple choice (dropdown) |
Category |
140 | Page separator / section header |
PageBreak |
150 | Display only (text or HTML) |
PSAPriorityField |
160 | PSA Priority field |
PSAStatusField |
170 | PSA Status field |
PSATypeField |
180 | PSA Type field |
PSASubtypeField |
190 | PSA Subtype field |
PSAItemField |
200 | PSA Item field |
PSABoardField |
210 | PSA Board/Queue field |
PSACategoryField |
220 | PSA Category field |
Automation |
230 | Automation field |
Template |
999 | Template |
Endpoint Behavior
The type field behaves differently depending on which API endpoint you use:
-
REST endpoint (
GET /v2/catalog/{id}): Returns the numeric value (e.g.,"type": 0for TextField). When creating or updating catalog items via POST/PATCH, use the numeric value. -
OData endpoint (
GET /v2/odata/catalogquestion): Returns the string enum name (e.g.,"type": "TextField").
Where to Find This in the API
The enum definition can be found in the OData metadata at /v2/odata/$metadata under the type CloudRadial.DataTypes.CatalogQuestionType. You can also view the Swagger schema at /swagger/v2/swagger.json under components/schemas/CatalogQuestionType.
Example: Creating a Catalog Item with Questions
When POSTing to /v2/catalog, use the numeric type value in your question objects:
{
"questions": [
{
"label": "User Name",
"type": 0,
"isRequired": true,
"order": 10,
"isIncludeInTicket": true
},
{
"label": "Department",
"type": 130,
"options": "Sales|Marketing|Engineering|Support",
"isRequired": false,
"order": 20,
"isIncludeInTicket": true
}
]
}
Comments
0 comments
Article is closed for comments.