How to find custom field type id from the API?

New Contributor II

How to find custom field type id from the API. When I try to create a custom field by using API, the API is asking to provide a field Id, is there any way/API to get a list of types available?


ServiceTitan Certified Administrator
ServiceTitan Certified Administrator

When you EDIT the custom field in ST, the web address has a numeric code at the end. I wonder if that's the field ID they are looking for? 

Here's an example:

Jessica Woodruff Smith, LadyTitans Co-Founder & Process Manager at AirWorks Solutions

This is the id of the custom field, that we are editing. TypeId might be different.

TypeId (type of the field like string, int, or something)

I'm trying to find any API or Docs that gives field type and type id.

@4kvikram - have you taken a look at the documentation in the ServiceTitan Developer Portal?

New Contributor II

Yes, I go through the documentation but I did not find any API that can provide Custom field type details. 


This is what I have to fill in typeid:-

custom field .png

and typeid is a required field at the time of requesting various APIs.

Hey @4kvikram if you want to pull a CustomField Typeid to POST to Jobs, Projects etc. you can use GET method for the same model and you will get the typeid. For example if you need to POST to jobs you can do GET {tenant}/jobs and all CustomFields assigned to job records will populate for you with their type ids(screenshot below). We do not have an API to create standard CustomFields thus neither GET method for that, since all CustomFields have their own data properties they are assigned to upon creation in the Setting > CustomFields page.
Please let me know if this helps you.

ScreenShot 3.png

I don't think this is a viable approach.  When I issue a GET request on Jobs the custom fields with their TypeId do not appear in the response unless they already have values.  

In my use case I am creating the job via the API and wish to set the custom field values when I create the Job.

Does anyone know a reliable method to get these custom field TypeId values?