Skip to main content

I’m trying to create service catalog item custom_dropdown with sections via API v2
following Service Desk API for Developers | Freshservice but it has no examples or schema for sections object.

I was able to get it from json representation of other service item with dynamic sections that was created manually:

{
"service_item": {
...
"custom_fields": s
{
...
"field_type": "custom_dropdown",
"field_options": {
"isSection": "true",
"displayed_to_requester": "true",
"placeholder": ""
},
"choices": s

"Action1",
"Action1"
],

"Action2",
"Action2"
]
],
"sections": s
{
"name": "Action1",
"fields": s
{
...
},
{
...
}
]
},
{
"name": "Action2",
"fields": s
{
...
}
]
}
]
}
]
}
}

 

When I’m doing POST request to API to create new service item with same choices and sections, it is successfull and item is created but sections are empty:
 

{
"service_item": {
...
"custom_fields": i
{
...
"field_type": "custom_dropdown",
"field_options": {
"isSection": "true",
"displayed_to_requester": "true",
"placeholder": ""
},
"choices": o

"Action1",
"Action1"
],

"Action2",
"Action2"
]
],
"sections": t]
}
]
}
}

 API documentation says that “custom_dropdown” is a supported custom_filed type but says nothing about sections

Why is it not accepting privided sections configuration? Is it possible?

Hi Martynova,

We understand that you need to create a service catalog item with sections via API, but currently, it is not possible to use a POST call to create a service catalog item with sections as intended. Please refer to the supported POST API call options for service item creation with the fields as outlined in the API documentation below.

https://api.freshservice.com/#create_service_catalog_item- 

Please note that the sections can only be created in service items manually through the UI.


Reply