Skip to content

acceptRejectCompanyConnection ​

Accepts or rejects an invitation to connect for a given user and company.

April 2023 - Added "version" to this API. Assumes if null or version=1 that it is the previous version, otherwise if version=2 is passed it assumes a CAF (Company Access Form) will be passed.

Request ​

http
PUT Version 1: /rest/user/company/connections/{connectionId}/{inviteStatusName}?version=1
Version 2: /rest/user/company/connections/{connectionId}/{inviteStatusName}/v{version}

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

ParameterTypeRequiredDescription
connectionIdYesThe id of the connection returned by call to findConnectionsForUser()
inviteStatusNameYesEither Accepted or Rejected or Cancelled
versionNoAdded for CAF support (April 2023). NOTE: v1 version is passed as a "query parameter". For v2 it is passed as a "path parameter".

VERSION 1 /user/company/connections/2/Accepted?version=1 VERSION 2 /user/company/connections/2/Accepted/v2

CAF Payload for version 2 (path parameter)

json
{
  "contact_external_id": "External Id",
  "contact_type": "Contact Type",
  "contact_firstname": "George",
  "contact_lastname": "Citizen",
  "contact_title": "Mr",
  "contact_primary_country_code": "AU",
  "contact_email1": "george.citizen@yopmail.com",
  "contact_gender_code": "M",
  "contact_dietary_requirements": "Dark chocolate allergy",
  "contact_date_of_birth": "01/01/2000",
  "contact_profession": "Freeform Profession",
  "contact_specialty": "Freeform Specialty",
  "contact_timezone_id": "Australia/Sydney",
  "contact_interests": "snowboarding",
  "contact_primary_mobile": "0418192021",
  "contact_photo": "http://some.domain.com/photo.jpg",
  "address1_uuid": "1bb06ae3-9eb5-4521-8b6c-eb11a11784e7",
  "address1_type": "W",
  "address1_name": "George at work",
  "address1_street": "123 My Street",
  "address1_suburb": "Suburb",
  "address1_city": "Sydney",
  "address1_state": "AU-NSW",
  "address1_postcode": "2000",
  "address1_country_code": "AU",
  "address1_email": "george@work.com",
  "address1_email_validated": "Y",
  "address1_phone": "09 2357 5634",
  "address1_fax": "09 5674 7893",
  "address1_mobile": "0418121314",
  "address1_department": "Gastroenterology",
  "address1_division": "Emergency",
  "address1_job_title": "Head of Gastro Emergencies",
  "address2_uuid": "b67b928a-2f09-4076-9fd0-03a09cbfd396",
  "address2_type": "W",
  "address2_name": "George at Randwick Hospital",
  "address2_street": "105 Avoca Street",
  "address2_suburb": "Randwick",
  "address2_city": "Sydney",
  "address2_state": "AU-NSW",
  "address2_postcode": "2031",
  "address2_country_code": "AU",
  "address2_email": "george@randwick.health.nsw.gov",
  "address2_email_validated": "Y",
  "address2_phone": "09 9876 2345",
  "address2_fax": "90 9546 7834",
  "address2_mobile": "0405123456",
  "address2_department": "N/A",
  "address2_division": "Gastroenterology",
  "address2_job_title": "Head of Gastroenterology",
  "contact_category": "Category",
  "contact_owned_by": "Sally",
  "contact_notes": "Would like to see more content",
  "contact_facebook_id": "facebookid",
  "contact_twitter_id": "twitterid",
  "contact_linkedin_id": "linkedinid",
  "condition_id": 1,
  "treatment_notes": "No treatment",
  "wall_consent_1": "Consent 1",
  "wall_consent_2": "Consent 2",
  "wall_consent_3": "Consent 3",
  "wall_consent_4": "Consent 4",
  "wall_consent_5": "Consent 5",
  "wall_consent_6": "Consent 6",
  "event_consent_1": "Event Consent 1",
  "event_consent_2": "Event Consent 2",
  "event_consent_3": "Event Consent 3",
  "event_consent_4": "Event Consent 4",
  "additional_1": "Additional 1",
  "additional_2": "Additional 2",
  "additional_3": "Additional 3",
  "lead": "My lead",
  "representative_name": "My Rep1",
  "contact_identifiers": [
    {
      "id": 1,
      "value": "ABC0123456789"
    }
  ],
   "userProfileFields" TODO
}

Response ​

200 OK ​

json
{"errorCode":0,"errorMsg":"Connection updated."}

Where 0 means success, anything else is an error.

Errors ​

ExceptionDescription
WSUserServiceUnavailableExceptionSee Error Definitions
WSUserNotFoundExceptionSee Error Definitions
WSInvalidParameterExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSInvitationToConnectionNotFoundExceptionSee Error Definitions
WSUserServiceExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSCompanyNotActiveExceptionSee Error Definitions