Appearance
createSupportGroup ​
Creates a new Suport Group including:
- Product
- Asset - requires an logo
- Asset Version (actual asset) - requires a file. Could this be a modular asset?
- Team
- QR Code - uses team above - requires
- Smart Library -
- Smart Directory - links to Team above
- TeamAdmin(s) (support group leader) provisioned as
isTeamAdmin=trueand assigned to new Team with Push Notification roles and SmartLibrary Publisher role..
Request ​
http
POST rest/company/support-groupHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
x-nextinteract-company-api-key | Yes | Admin-specific API key UUID provided to company |
Parameters ​
Form URL Encoded Params:
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | integer | Yes | Company id of the company for which SGL is being created. |
supportGroupPrefix | string | Yes | Prefix name given to support group being created. |
supportGroupName | string | Yes | Nice name given to support group being created. |
countryCode | string | No | TBC dunno if we'll use this but intention was to combine countryCode with stateCode to include in Support Group prefix. |
stateCode | string | No | TBC dunno if we'll use this but intention was to combine countryCode with stateCode to include in Support Group prefix. |
teamAdminUserEmails | string | Yes | A comma-separated list of Team Admin email address(es). NOTE: these users need to be Accepted connections on the wall. |
directoryType | string | Yes | Type to use when creating Smart Directory. Possible values: UNRESTRICTED, PARTIALLY_RESTRICTED, FULLY_RESTRICTED |
directoryOrder | string | Yes | Method to order fields in directory. Possible values: FL = Firstname, Lastname, LF = Lastname, Firstname |
directoryFieldIds | string | Yes | Comma-separated integers. Field Ids to add to Smart Directory. Call /rest/refdata/field-defs for full list. NOTE: You don't need to include Firstname, Lastname as these are added by default. |
autoPopulateFromProfile | string | No | "true" or "false" value indicating whether the SmartDirectory should allow population using the user's profile data. |
directoryConsents | JSON string | Yes | List of JSON objects detailing type and details of Smart Directory consents. See example below. |
json
[
{
"consentType": "DS",
"name": "My 1st Disclaimer",
"desc": "By agreeing to this you agree to have lunch with Martin",
"optionalDesc": "Some optional disclaimer text",
"required": true
},
{
"consentType": "DS",
"name": "My 2nd Disclaimer",
"desc": "By agreeing to this you agree to share your disease with other patients in the group",
"optionalDesc": "Some optional disclaimer text",
"required": true
}
]| Parameter | Type | Required | Description |
|---|---|---|---|
teamImageFile | file | No | File representing the logo associated with a Support Group. Should be same dimensions as company logo image. |
assetName1-10 | string | No | Name of an asset to be uploaded. |
assetType1-10 | string | No | Type of an asset to be uploaded. Supported values - html, smartlib, smartdir |
assetDescription1-10 | string | No | Description of an asset to be uploaded. |
assetInternalId1-10 | string | No | Internal id/name of asset to help Firebase storage uniqueness. |
assetImageFile1-10 | file | No | File representing the asset image. Must conform to asset image size. |
assetVersionFile1-10 | file | No | File representing the asset version. |
SAMPLE CURL COMMAND
curl --location 'http://localhost:8080/nextinteract-webapp/rest/company/support-group/'
--header 'x-nextinteract-authtoken: zJqjVmHLxlBoE7n7p9OT6w=='
--header 'x-nextinteract-company-api-key: ADMINCOMPANYAPIKEYUUID'
--header 'Cookie: JSESSIONID=A3B3CB62EAB52B872B58786DB06B6979'
--form 'companyId="3"'
--form 'supportGroupName="SGL AARON6"'
--form 'supportGroupPrefix="MYESGL6"'
--form 'directoryConsents="[{"consentType":"DS","name":"My Disclaimer","desc":"By agreeing to this you agree to have lunch with Martin","optionalDesc":"Some optional disclaimer","required":true}]"'
--form 'directoryType="PARTIALLY_RESTRICTED"'
--form 'directoryOrder="FL"'
--form 'autoPopulateFromProfile="true"'
--form 'directoryFieldIds="1,6,9"'
--form 'assetImageFile1=@"/Users/aaronmcmullen/Downloads/Slack/2724-logo.1652136098493.PNG"'
--form 'assetVersionFile1=@"/Users/aaronmcmullen/Downloads/1Brochures/1Testing/PDFMacEmailNoToCV6.zip"'
--form 'assetName1="My Patient App"'
--form 'assetType1="html"'
--form 'assetDescription1="All patients to use this app"'
--form 'assetName2="Patient Resource"'
--form 'assetType2="smartlib"'
--form 'assetDescription2="Resources for this group"'
--form 'assetImageFile2=@"/Users/aaronmcmullen/Downloads/Slack/2724-logo.1652136098493.PNG"'
--form 'assetName3="Patient Directory"'
--form 'assetType3="smartdir"'
--form 'assetDescription3="Directory for our suport group"'
--form 'assetImageFile3=@"/Users/aaronmcmullen/Downloads/Slack/2724-logo.1652136098493.PNG"'
--form 'teamImageFile=@"/Users/aaronmcmullen/Downloads/Slack/2724-logo.1652136098493.PNG"'
--form 'teamAdminUserEmails="dev.sam2@yopmail.com,dev.sam3@yopmail.com"'
Response ​
200 OK ​
json
{
"companyId": 3,
"productId": 223,
"productName": "MYESGL6 Product",
"teamId": 141,
"teamName": "MYESGL6 Team",
"qrCodeId": 52,
"qrCodeName": "MYESGL6 QR Code",
"teamAdminUserEmails": [
"dev.sam2@yopmail.com",
"dev.sam3@yopmail.com"
],
"supportGroupAssetsCreated": [
{
"assetId": 261,
"assetName": "My Patient App",
"assetType": "html"
},
{
"assetId": 262,
"assetName": "Patient Resource",
"assetType": "smartlib"
},
{
"assetId": 263,
"assetName": "Patient Directory",
"assetType": "smartdir"
}
]
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSUserServiceException | See Error Definitions |