Add Service
Using this API, serivce providers will be added as per the request provided.
Resource Informations
Name | Value |
---|---|
Requires authentication? | Yes |
Rate limited? | Yes |
Request
Request headers
Key | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/json |
HTTP request URL for SSMS
POST https://{tenantId}.{hostname}/digitanium/v3/mpower/services/?category=<CATEGORY>
HTTP request URL for SHIFT
POST https://{hostname}/auth/realms/{tenantId}/mpower/v1/services/?category={CATEGORY}
note
API requests must be made over https. Calls made over plain http will fail.
Parameters
Field Name | Type | Description |
---|---|---|
category (Required) | String | Category for which you wanted to get Service Providers. Possible values partner, backend, operator, information |
Request body
Field Name | Type | Description |
---|---|---|
name (Required) | String | Name of the service |
type (Required) | String | Type of the service. Available types: chat, MiniApp, InformationApp, externalApp. |
position (Required) | Integer | Position of the service where it needs to be in app |
allowNewMessagesByUser (Required) | boolean | To restrict user messages to the service use false |
displayName (Required) | Object | Name to be displayed for the service |
description (Required) | Object | Description of the service |
openUrl (Required) | String | Url of the service |
avatarPicture (Required) | Object | Picture which should be displayed in app for the service. |
informationPicture (Required) | Object | Picture which should be displayed in app for the service. Only for information category. |
callbackURL (Required) | callBackUrl | URL where to return the results, whenever a media or message is sent through mpower chat. |
appUri (Required) | String | The application url. Applicable for externalApp only. |
playStoreLinkAndroid (Required) | String | Playstore link of the application. Applicable for externalApp only. |
appStoreLinkIos (Required) | String | App store link of the application. Applicable for externalApp only. |
clientId (Required) | String | The client ID of the application. Applicable for externalApp only. |
scope (Required) | String | The scope requested by the application. Applicable for externalApp only. Scope is mandatory if clientId is provided. |
redirectUri (Required) | String | The URL to be redirected to post authentication. Applicable for externalApp only. redirectUri is mandatory if clientId is provided. |
tags (Required) | String | Add respective tag category (Example : recommended). |
Sample Request
[{
"name": "info2",
"type": "informationapp",
"position": 1,
"displayName": {
"de": "Info 2"
},
"description": {
"de": "Info 2"
},
"tags": ["tag1", "test1"],
"openUrl": "https://google.com",
"informationPicture": {
"mimetype": "image/jpeg",
"data": "test from API"
},
"allowNewMessagesByUser": true
}]
Sample Response
[
{
"uuid": "cdd202bb-197f-4139-8341-e1bb8717e43f",
"name": "operator"
},
{
"uuid": "caa202aa-197f-4139-8341-e1ab8818e33f",
"name": "operator one"
}
]
Response Status Information
Status | Type | Description |
---|---|---|
200 | OK | For successfull update |
400 | status | Bad request |
401 | status | Unauthorized |