Skip to content

Get Suggestion by ID

Request

Overview

The Get Suggestion by ID API allows authenticated users to retrieve their own suggestions.

Prerequisites

  • Enable the setting "My Suggestions" for the portal specified in the URL.
  • If the user is a customer, enable the setting "Allow Customer Access" for the portal.
  • The "Suggestion for the ID" specified in the URL must belong to the user.
Security
oAuthUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
or oAuthOnBehalfOfUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
or oAuthCustomer(Required scopes:
https://api.egain.cloud/auth/kno...
)
or oAuthOnBehalfOfCustomer(Required scopes:
https://api.egain.cloud/auth/kno...
)
Path
portalIDstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$required

The ID of the portal being accessed.

A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Example:PROD-1000
suggestionIDstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$required

The ID of the Suggestion.

A Suggestion ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Example:PROD-11829
Query
suggestionAdditionalAttributesArray of strings

The attributes of a Suggestion to be returned in addition to the default list of attributes, listed below. Multiple additional attributes can be specified using a comma-separated list. Passing 'all' returns all attributes.

Default Attributes

These Suggestion attributes are always returned:

NameDescription
idThe ID of the Suggestion.
nameThe name of the Suggestion.
statusThe status of the Suggestion.
descriptionThe description of the Suggestion.
languageDetails about the language of the Suggestion.
modifiedBy.idThe ID of the user that last modified the Suggestion.
modifiedBy.firstNameThe Suggestion's last modified user's first name.
modifiedBy.middleNameThe Suggestion's last modified user's middle name.
modifiedBy.lastNameThe Suggestion's last modified user's last name.
modifiedDateThe Suggestion's last modified date and information about the user that last modified the Suggestion.
linkThe link object, used to retrieve the details of the Suggestion.
hasCommentsThe Suggestion has one or more comments
hasAttachmentsThe Suggestion has one or more attachments
hasRelatedArticlesThe Suggestion has related articles
Items Enum:"content""modifiedBy.userName""all"
Examples:
Single
An additional attribute to be returned.
suggestionAdditionalAttributes=["content"]
Multiple
Additional attributes to be returned.
suggestionAdditionalAttributes=["content","modifiedBy.userName"]
All
All additional attributes to be returned.
suggestionAdditionalAttributes=["all"]
$customAdditionalAttributesstring, [ 1 .. 4000 ] characters^([a-zA-Z0-9_-]+)(?:,[a-zA-Z0-9_-]+)*$

One or more comma-separated names for custom attributes defined by the user to be returned.

Examples:
Single
A user-defined custom attribute.
$customAdditionalAttributes=country_name
Multiple
Multiple user-defined custom attributes.
$customAdditionalAttributes=internalScore,performance-rating_dept_923
Headers
x-egain-activity-idstring, [ 4 .. 9 ] characters^[0-9]{4,9}$

A unique numeric interaction identifier from eGain.

Example:59237
x-ext-integration-idstring, <= 40 characters^[\w\W]+$

The unique numeric identifier for a tenant, used in self-service functionality as well as third-party integrations.

Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.

The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.

Examples:
uuid
3155180e-0c13-43e9-9c38-e9045bcbf176
hex
00Dbn00000IxGnx
x-ext-interaction-idstring, <= 40 characters^[\w\W]+$

A unique interaction identifier from other CRM applications.

Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.

The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.

Examples:
uuid
3155180e-0c13-43e9-9c38-e9045bcbf176
hex
00Dbn00000IxGnx
Accept-Languagestringrequired

The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).

Enum:"en-US""es-ES""fr-FR""it-IT""de-DE""nl-NL""pt-BR""pt-PT""da-DK""ru-RU"
Example:en-US
GET
/portals/{portalID}/suggestions/{suggestionID}
curl -i -X GET \
  'https://api.egain.cloud/knowledge/portalmgr/v4/portals/PROD-1000/suggestions/PROD-11829?suggestionAdditionalAttributes=content&%24customAdditionalAttributes=country_name' \
  -H 'Accept-Language: en-US' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'x-egain-activity-id: 59237' \
  -H 'x-ext-integration-id: 3155180e-0c13-43e9-9c38-e9045bcbf176' \
  -H 'x-ext-interaction-id: 3155180e-0c13-43e9-9c38-e9045bcbf176'

Responses

Success

Bodyapplication/json
idstring, [ 7 .. 20 ] characters^[a-zA-Z0-9]{2,4}-\d{4,15}$required

The ID of the Suggestion. A Suggestion ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Example:"PROD-0623"
namestring, [ 1 .. 255 ] characters^[\s\S]*\S[\s\S]*$required

The name of the Suggestion.

descriptionstring, [ 0 .. 255 ] characters^[\w\W]*$

The description of the Suggestion.

contentstring, [ 1 .. 10000 ] characters^[\s\S]*\S[\s\S]*$

The content of the Suggestion.

hasRelatedArticlesboolean

If true, the Suggestion has one or more Related Articles.

statusobject, = 1 characters(L10NString)^[1-4]$

The status of the Suggestion.

  • 1 : suggested.
  • 2 : pending
  • 3 : declined
  • 4 : approved
  • modifiedByobject(modifiedBy)
    modifiedDatestring, (date-time), [ 20 .. 25 ] characters^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$

    The last modified date and last modifying user of the Suggestion.

    hasAttachmentsboolean

    Indicates whether the Suggestion has any Attachments.

    hasCommentsboolean

    Indicates whether the Suggestion has any comments.

    languageobject(Language)

    The knowledge base language in which the Suggestion was created.

    customAttributesArray of objects, [ 0 .. 15 ] items(CustomAttribute)

    Custom Attributes of the Suggestion.

    Response
    { "link": { "rel": "self", "href": "/knowledge/portalmgr/v4/portals/PROD-1000/suggestions/PROD-3259" }, "name": "Missing Article Information", "description": "Missing Account Type Information", "content": "<p>There should be an article that explains the account types offered. That would be very helpful.<br /></p>", "status": { "value": "suggested", "displayValue": "Suggested" }, "modifiedBy": { "firstName": "John", "middleName": "", "lastName": "Smith", "id": "1067" }, "modifiedDate": "2025-01-23T04:16:17.000Z", "language": { "code": "en-US", "label": "English" }, "hasRelatedArticles": false, "hasAttachments": false, "hasComments": true, "customAttribute": [], "id": "PROD-3259" }