Using the service catalog item APIs
A service catalog is a centralized list of services that employees can browse and request. Each entry is a service catalog item, such as a computer peripheral or a leave of absence. In Zendesk, a published service catalog item is typically associated with a ticket form so requests are captured consistently.
The service catalog items APIs let you:
- List available service catalog items
- Search items by keyword
- Show a single item by id
These endpoints return catalog metadata and can be used to build a service catalog for browsing, look up item details, or support request ticket creation by providing the item's associated form_id.
Key fields returned by the APIs
When you retrieve service catalog items, the response includes the following:
| Field | Description |
|---|---|
| id | The unique identifier for the service catalog item. Use it to get item details with the “Show item” endpoint. |
| name, description | Display fields you can use to render a list of items in a UI. |
| thumbnail_url | An optional image URL for the item. |
| form_id | The Zendesk ticket form associated with the item. This is the key link between a service catalog request and ticket creation. |
Example response
{"service_catalog_item": {"id": "01KHA34GSHA62MH4NXKMG361T5","name": "Request a laptop","description": "","thumbnail_url": null,"form_id": 38371252020375}}
The service catalog items APIs do not return the request fields or questions employees answer when submitting a request. Those fields are defined in the ticketing configuration associated with the service catalog item.
- The service catalog item provides the
form_id - The ticket form defines which ticket fields are used for that request
- The ticket fields define field types and options (for example, dropdown values)
Common ways to use form_id include:
-
Ticket creation: Use the service catalog item’s
form_idas the ticket’sticket_form_idwhen you create a ticket. This applies the correct ticket form to the request so the ticket includes the expected fields and follows the right workflow. For example, “Windows workstation” uses a different form than “Ergonomic keyboard”. -
Ticket routing: When creating a trigger to route tickets to an internal team for review and fulfilment, use the
form_idto identify the created ticket in order to route it to the appropriate team. For example, you can create a trigger that assigns tickets created with a specific form used for requesting workstations to the IT team. -
Validation: Use
form_idto look up the associated ticket form and confirm what field types and values Zendesk expects. For example, you can verify that a “Need-by date” value is in the correct format, or that a dropdown value matches one of the configured option values. This helps prevent tickets being created with missing or invalid field values. -
UI generation: Use
form_idto fetch the ticket form definition and build a request form dynamically. Instead of hardcoding inputs, your app can render the correct set of questions for the selected service (text fields, dropdowns, dates, and so on) and keep the UI in sync if the form changes in Admin Center. For an example, see Requesting a new laptop.
Troubleshooting
If the APIs return an empty list ("service_catalog_items": []), check the following:
- Service catalog is enabled
- At least one service catalog item is published and visible
- You’re using the correct subdomain
- Your search query matches item names or descriptions (try listing instead of searching)