You can use the following curl command to get the required ticket fields: 
curl -v -u user@yourcompany.com:test -X GET 'https://domain.freshservice.com/api/v2/ticket_fields'

If you do not want to use your email address and password in the curl command, you can also use your API key instead of the email address and X as the password, as shown below.

curl -v -u API key:X -X GET 'https://domain.freshservice.com/api/v2/ticket_fields

For more information, please visit https://api.freshservice.com/v2/#get_all_ticket_fields