Custom fields in API

Avatar
  • updated
  • Completed
We have added a custom field for topics. We would like to be able to see the value of the custom field in the API. For example, I would expect this URL to return the topic, including all custom fields and their values:

https://userecho.com/api/feedback/414583.json?access_token=xyzxyzxyzxyz

How would you rate the customer service you received?

Satisfaction mark by Mathew Weaver 11 years ago

I am quite pleased with your quick response and that you have added this functionality as requested.

Add a comment about quality of support you received (optional):

Pinned replies
Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed
Hi Mathew,
We will check custom fields in API and add if it doesn't exists.
Avatar
Mathew Weaver
It would also be very helpful if the topic POST method supported custom fields as well ... if we could set/update custom field values using:

http://userecho.com/dev/api/topics/create
Avatar
Vladimir Mullagaliyev co-founder
  • Under review
Hi Mathew,
We will check custom fields in API and add if it doesn't exists.
Avatar
Vladimir Mullagaliyev co-founder
"READ" method has been completed.
It looks like:
        "custom_fields": [
            {
                "id": 115,
		"code_name": "cf_115",
                "value": "v6.x",
                "name": "EQuIS Version"
            },
            {
                "id": 122,
		"code_name": "cf_112",
                "value": "98772",
                "name": "Case"
            }
        ],
Avatar
Vladimir Mullagaliyev co-founder
Quote from Mathew Weaver
It would also be very helpful if the topic POST method supported custom fields as well ... if we could set/update custom field values using:

http://userecho.com/dev/api/topics/create
"WRITE" method works if you POST new comment via API.
Just add POST parameters with name as custom field's "code_name".
Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed
Hi Mathew,
We will check custom fields in API and add if it doesn't exists.
Avatar
Mathew Weaver
Quote from Vladimir Mullagaliyev
"WRITE" method works if you POST new comment via API.
Just add POST parameters with name as custom field's "code_name".
Would the code_name and value be posted as a form variable (i.e. the body of the post)? Or would it be a query string parameter?

Also, you said "POST new comment via API". The API reference does not mention anything about posting a comment, just posting a topic. Is there a way to post custom field values to an existing topic without adding a comment to that topic?
Avatar
Mathew Weaver
Quote from Vladimir Mullagaliyev
"READ" method has been completed.
It looks like:
        "custom_fields": [
            {
                "id": 115,
		"code_name": "cf_115",
                "value": "v6.x",
                "name": "EQuIS Version"
            },
            {
                "id": 122,
		"code_name": "cf_112",
                "value": "98772",
                "name": "Case"
            }
        ],
This is excellent. Thank you.
Avatar
Vladimir Mullagaliyev co-founder
Quote from Mathew Weaver
Would the code_name and value be posted as a form variable (i.e. the body of the post)? Or would it be a query string parameter?

Also, you said "POST new comment via API". The API reference does not mention anything about posting a comment, just posting a topic. Is there a way to post custom field values to an existing topic without adding a comment to that topic?
Sorry, I mean a topic (not a comment).
You should POST "code_name" with "value" as a form variable. Like you do with a header, description, etc.
Avatar
Mathew Weaver
I just noticed that the topic API does not seem to include the category of the topic, nor the tags of the topic. Would it be possible to include the category and tags of the top in the API JSON/XML response for a topic (GET feedback/[feedback_id])? Ultimately, we would want that same information (category and tags) in the web hook post as well (http://feedback.userecho.com/topic/1781-customize-the-email-sent-to-users/#comment_427062).
Avatar
Vladimir Mullagaliyev co-founder
Quote from Mathew Weaver
I just noticed that the topic API does not seem to include the category of the topic, nor the tags of the topic. Would it be possible to include the category and tags of the top in the API JSON/XML response for a topic (GET feedback/[feedback_id])? Ultimately, we would want that same information (category and tags) in the web hook post as well (http://feedback.userecho.com/topic/1781-customize-the-email-sent-to-users/#comment_427062).
Will do it in 24 hours.