api:helpcenter:case:search
Table of Contents
API : HelpCenter Case Search
Introduction
Searches for cases which fits matches the filter passed on.
Request
| URL | https://api.telecomx.dk/helpcenter/case/search | |
|---|---|---|
| Method | GET | |
| Access Level | RESELLER, RESELLER_ADMIN OR ADMIN | |
| Query | id | Id of the helpcenter to search cases in. |
| offset | [optional] Index of first item to return. Default 0. |
|
| limit | [optional] The number of cases to return. Default 10, max 500. |
|
| sortOrder | [optional] Sorting order, 'asc' for ascending or 'desc' for descending. Default to asc. |
|
| searchFilter | Text to search for. the follow properties are searched: customerName subject phoneNumber emailAddress messages.content messages.sentBy |
|
Query Example
https://api.telecomx.dk/helpcenter/case/search?id=1234567890ABCDEF12345678&sortOrder=asc https://api.telecomx.dk/helpcenter/case/search?id=1234567890ABCDEF12345678&searchFilter=mikkel@test.dk https://api.telecomx.dk/helpcenter/case/search?id=1234567890ABCDEF12345678&sortOrder=desc&searchFilter=printerproblem
Response
| JSON object | |
|---|---|
| offset | How many cases skipped |
| limit | How many cases that matches, returned |
| total | Total amount of matches |
| cases | HelpCenterCases |
| HelpCenterCase object | ||
|---|---|---|
| _id | String | Case id |
| caseNumber | Number | Number of the case |
| conversationId | String | ID of the email conversation, provided by Microsoft Graph |
| latestMessageId | String | ID of the lastest received email from the customer. Used as a parameter to reply to emails |
| subject | String | Overall subject, fetched from the email |
| createdAt | Date | Date time stamp from when the Case was created |
| state | String | Status of the cases. Values: UNHANDLED / HANDLING / CLOSED |
| customer | String | Id of the customer who the case regards |
| company | String | Name of the customer who the case regards to |
| customerName | String | Name of the sender on the original email that originated the case |
| helpCenterId | String | Id of the helpcenter who handles the case |
| emailAddress | String | Email of the customer who sent the original email |
| phoneNumber | String | Phonenumber of the customer |
| actionNeeded | boolean | Flag for showing if case is unhandled |
| messages | Array of Objects | Contains every email and intern comment in the Case |
| messages[].content | String | Content of email or comment |
| messages[].messageId | String | ID of the message provided by Graph |
| messages[].sent | Date | Datetimestamp of when the email or comment was sent |
| messages[].sentBy | String | Name of sender |
| messages[].type | String | Type to filter between intern comments, incoming and outgoing email. Values: COMMENT / INCOMING / OUTGOING |
Example
{ _id: "12345678901234567890ABCD", caseNumber: 5 conversationId: "abcdefg12345678", latestMessageId: "1234", subject: "#5 Skærm går i sort", createdAt: "2024-05-14T08:48:05.000Z", state: "HANDLING", customer: "87654321abcdefg", customerName: "Mikkel Jørgensen", helpCenterId: "helpcenterid1234" emailAddress: "mmj@powernet.dk", phoneNumber: "+4588888888", actionNeeded: true, messages: [ { content: "Hej, min skærm...", messageId: "123", sent: 2024-05-14T08:48:05.000Z, public: true, sentBy: "Mikkel Jørgensen", isSupporter: false }, { content: "Hej! Kan du ikke...", messageId: "1234", sent: 2024-05-14T08:48:05.000Z, sentBy: "Thomas Andersen", type: INCOMING } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | id | Invalid helpcenterId |
| 422 | sortOrder | Invalid sortOrder, use asc or desc |
| 500 | internal_error | <Unspecified error> |
api/helpcenter/case/search.txt · Last modified: 2025/04/08 12:11 by Mikkel Meerwaldt Jørgensen