Skip to content

createSupportGroup ​

Creates a new Suport Group including:

  1. Product
  2. Asset - requires an logo
  3. Asset Version (actual asset) - requires a file. Could this be a modular asset?
  4. Team
  5. QR Code - uses team above - requires
  6. Smart Library -
  7. Smart Directory - links to Team above
  8. TeamAdmin(s) (support group leader) provisioned as isTeamAdmin=true and assigned to new Team with Push Notification roles and SmartLibrary Publisher role..

Request ​

http
POST rest/company/support-group

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser
x-nextinteract-company-api-keyYesAdmin-specific API key UUID provided to company

Parameters ​

Form URL Encoded Params:

ParameterTypeRequiredDescription
companyIdintegerYesCompany id of the company for which SGL is being created.
supportGroupPrefixstringYesPrefix name given to support group being created.
supportGroupNamestringYesNice name given to support group being created.
countryCodestringNoTBC dunno if we'll use this but intention was to combine countryCode with stateCode to include in Support Group prefix.
stateCodestringNoTBC dunno if we'll use this but intention was to combine countryCode with stateCode to include in Support Group prefix.
teamAdminUserEmailsstringYesA comma-separated list of Team Admin email address(es). NOTE: these users need to be Accepted connections on the wall.
directoryTypestringYesType to use when creating Smart Directory. Possible values: UNRESTRICTED, PARTIALLY_RESTRICTED, FULLY_RESTRICTED
directoryOrderstringYesMethod to order fields in directory. Possible values: FL = Firstname, Lastname, LF = Lastname, Firstname
directoryFieldIdsstringYesComma-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.
autoPopulateFromProfilestringNo"true" or "false" value indicating whether the SmartDirectory should allow population using the user's profile data.
directoryConsentsJSON stringYesList 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
  }
]
ParameterTypeRequiredDescription
teamImageFilefileNoFile representing the logo associated with a Support Group. Should be same dimensions as company logo image.
assetName1-10stringNoName of an asset to be uploaded.
assetType1-10stringNoType of an asset to be uploaded. Supported values - html, smartlib, smartdir
assetDescription1-10stringNoDescription of an asset to be uploaded.
assetInternalId1-10stringNoInternal id/name of asset to help Firebase storage uniqueness.
assetImageFile1-10fileNoFile representing the asset image. Must conform to asset image size.
assetVersionFile1-10fileNoFile 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 ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSUserServiceExceptionSee Error Definitions