Describe for tickets

As i understand tickets APIs are standard REST APIs. So, where is the ticket/describe? i dont see it documented.

I want to get ticket metadata as whats the field name, type and label.

Regards

Hey @IT_Management,

Welcome to the Freshworks developer community :slight_smile:

could you check if the ticket fields endpoint works for you?
https://developer.freshdesk.com/api/#ticket-fields

Hope this helps!

1 Like

This one is not useful as returns

    {
        "id": 66000058219,
        "name": "requester",
        "label": "Search a requester",
        "description": "Ticket requester",
        "position": 0,
        "required_for_closure": false,
        "required_for_agents": true,
        "type": "default_requester",
        "default": true,
        "customers_can_edit": true,
        "label_for_customers": "Requester",
        "required_for_customers": true,
        "displayed_to_customers": true,
        "created_at": "2020-08-04T16:43:01Z",
        "updated_at": "2020-08-04T16:43:01Z",
        "portal_cc": false,
        "portal_cc_to": "company"
      },
      {
        "id": 66000058229,
        "name": "company",
        "label": "Company",
        "description": "Ticket Company",
        "position": 1,
        "required_for_closure": false,
        "required_for_agents": true,
        "type": "default_company",
        "default": true,
        "customers_can_edit": true,
        "label_for_customers": "Company",
        "required_for_customers": true,
        "displayed_to_customers": true,
        "created_at": "2020-08-04T16:43:01Z",
        "updated_at": "2020-08-05T07:28:08Z"
      },

the fields does not have proper data type. type default_requester etc makes no sense. If you fire a view ticket API then data is

    {
      "cc_emails": [],
      "fwd_emails": [],
      "reply_cc_emails": [],
      "ticket_cc_emails": [],
      "fr_escalated": false,
      "spam": false,
      "email_config_id": null,
      "group_id": null,
      "priority": 3,
      "requester_id": 66000585005,
      "responder_id": 66000555941,
      "source": 3,
      "company_id": 66000008339,
      "status": 3,
      "subject": "Laptop does not start",
      "association_type": null,
      "support_email": null,
      "to_emails": null,
      "product_id": null,
      "id": 9,
    ...

i don’t see any mapping between what data is retuned and ticket_fields API. Any service compliance to REST needs to have a describe returning exactly mapping metada.

anyone on this please?

Hi @IT_Management,

Can you exactly describe what you are trying to achieve? If the API structure is blocking you on something, we can figure out a solution for it. However, if it’s more along the lines of feedback, we can forward the same to the Freshdesk team.

1 Like

Well we are trying provide ability for our customers to pick a few fields as per their business need using our custom UI. This requires us to pull all the fields with the data type (or what is called metadata which is the sole function of a REST describe).

With no describe REST we cant do that as the ticket_fields api does not really return fields with the exact basic data type etc.

Would it be feasible to treat the unrecognizable data types as string? As almost all Freshdesk fields in the end are strings (with a few exceptions)