Appearance
requestEntityConnection ​
Use this to action a connection request for a discoverable company/entity, and supply user profile metadata which the user may have added to or amended, to justify the criteria are satisfied by the sharing company.
Any user supplied metadata will be updated in the users’ user profile.
Any successful connection will invoke additional behaviour in SAM to invite the user to connect, without the additional notifications, email etc…
See link for further details: https://docs.google.com/document/d/11alwVD_i64tv-Cy8J7SCYEZ_J9JjQwG94MWAbKREG40/edit#heading=h.qbims0cayo6c
Version = 2 adds functionality to send cafData as per user story: TP19195 - https://healthinteract.tpondemand.com/entity/19195-apis
Request ​
http
POST /rest/user/recommended/requestConnectionHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Response ​
200 OK ​
Returns a JSON dictionary of status information.
json
{
"connectionStatus" : 1,
"connectionMessage" : "Successfully connected..."
}Response Fields ​
| Field | Type | Description |
|---|---|---|
connectionStatus | Number | Representing the status of the connection request. This is separate from an error status code - multiple success states are possible. |
connectionMessage | String | A user friendly description of the status. |
Currently Supported Status’: 1 = “Connection successful.” 2 = “Thank you for requesting access to {company name}.\n\nYou will receive an email and notification once your details have been verified.” 3 = “Connection unsuccessful.\n\nPlease contact {company name} for more information.”
Response Headers ​
{ "version" : 1, "entityType" : "company", "entityId" : "1234" }
| Field | Type | Description |
|---|---|---|
version | Number | Currently set to the number 2. Version 2 adds optional cafData if the company has CAF enabled. CAF data will not be processed if null. |
entityType | String | Specifies the type of entity we are querying about: ”company” for a company, ”event” for an event (RESERVED FOR FUTURE USE). |
entityId | String | The value is dependent on the entity type. For a company it will be a company ID (number), for an event it will be the event ID (UUID). Represented and passed as a string. |
cafData | Object | Adds CAF (Company Access Form) data to the request so that a Contact record can be updated during the request. See below for a sample version=2 payload. |
Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSUnsupportedVersionException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInsufficientPrivilegesException | See Error Definitions |
WSInvalidEmailDomainNameException | See Error Definitions |
WSPreRegistrationAlreadyExistsException | See Error Definitions |
WSInvalidTeamException | See Error Definitions |
WSConnectionAlreadyExistsException | See Error Definitions |
WSInvalidMyInteractUserSetupException | See Error Definitions |
WSEmailAddressAlreadyInUseException | See Error Definitions |
WSUserUsesFederatedLoginException | See Error Definitions |
CompanyNotActiveException | See Error Definitions |
WSDiscoverableServiceException | See Error Definitions |