Skip to content

Self Service Endpoints

Jay edited this page Jun 6, 2024 · 14 revisions

Below are the currently supported self-service endpoints.

Articles

GET /selfservice/article

$articles = $api->getSelfServiceApi()->getArticles();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get

$articles = $api->getSelfServiceApi()->getArticles(['type_id' => 1]);

GET /selfservice/article/{id}

$article = $api->getSelfServiceApi()->getArticle($id);

Additional query parameters are available. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get-1

$article = $api->getSelfServiceApi()->getArticle($id, ['type_id' => 1, 'increment_views' => 1]);

GET /selfservice/article/search

$articles = $api->getSelfServiceApi()->getArticlesByTerm($term = 'foo');

Additional filtering options are available. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get-2

$articles = $api->getSelfServiceApi()->getArticlesByTerm($term = 'foo', ['type_id' => 1]);

GET /selfservice/article/related

$articles = $api->getSelfServiceApi()->getRelatedArticles($typeId = 1, $term = 'foo');

Additional filtering options are available. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get-3

$articles = $api->getSelfServiceApi()->getRelatedArticles($typeId = 1, $term = 'foo', ['protected' => 1]);

Categories

GET /selfservice/category

$categories = $api->getSelfServiceApi()->getCategories();

Additional filtering options are available. For a full list of available filtering options, see https://api.supportpal.com/api.html#self-service-category-get

$categories = $api->getSelfServiceApi()->getCategories(['type_id' => 1]);

GET /selfservice/category/{id}

$category = $api->getSelfServiceApi()->getCategory($id);

Comments

GET /selfservice/comment

$comments = $api->getSelfServiceApi()->getComments();

Additional filtering options are available. For a full list of available filtering options, see https://api.supportpal.com/api.html#self-service-comment-get

$comments = $api->getSelfServiceApi()->getComments(['type_id' => 1]);

POST /selfservice/comment

$createComment = new \SupportPal\ApiClient\Model\SelfService\Request\CreateComment([
    'text'         => 'foo',
    'article_id'   => 3,
    'type_id'      => 1,
    'parent_id'    => 1,
    'status'       => 3,
    'notify_reply' => 0
]);
$comment = $api->getSelfServiceApi()->createComment($createComment);

Settings

GET /selfservice/settings

$settings = $api->getSelfServiceApi()->getSettings();

Tags

GET /selfservice/tag

$tags = $api->getSelfServiceApi()->getTags();

Additional filtering options are available. For a full list of filtering options, see https://api.supportpal.com/api.html#self-service-tag-get

$tags = $api->getSelfServiceApi()->getTags(['order_column' => 'name]);

GET /selfservice/tag/{id}

$tag = $api->getSelfServiceApi()->getTag($id);

Types

GET /selfservice/type

$types = $api->getSelfServiceApi()->getTypes();

Additional filtering options are available. For a full list of filtering options, see https://api.supportpal.com/api.html#self-service-type-get

$types = $api->getSelfServiceApi()->getTypes(['brand_id' => 1]);

GET /selfservice/type/{id}

$type = $api->getSelfServiceApi()->getType($id);