When implementing Creditsafe Connect's company monitoring functionality via its /monitoring endpoint it is advised that the following call sequence is initially adopted:


URIHTTP METHOD
/monitoring/portfoliosPOST
/monitoring/eventRulesGET
/monitoring/portfolios/{portfolioId}/eventRules/{countryCode}PUT
/monitoring/portfolios/{portfolioId}/companiesPOST
/monitoring/portfolios/{portfolioId}/notificationEventsGET


1. Create Portfolio

A portfolio must first be created via Creditsafe Connect by calling the following endpoint:


URIHTTP METHOD
/monitoring/portfoliosPOST


{
"name": "My New Portfolio",
"isDefault": "true"
}


2. Get Event Rules

A list of all available notification event rules which can be applied to said portfolio can be retrieved from Creditsafe Connect by calling the following endpoint: 


URIHTTP METHOD
/monitoring/eventRulesGET



3. Activate Event Rules

Creditsafe Connect's "notificationEvents" will only be generated for said portfolio's active "eventRules" so if no "eventRules" are active then no "notificationEvents" will be created for said portfolio, "eventRules" can only be activated by calling the following endpoint:


URIHTTP METHOD
/monitoring/portfolios/{portfolioId}/eventRules/{countryCode}PUT

[
  {
    "ruleCode": 1801,
    "ruleCountryCode": "GB",
    "isActive": 1,
    "param0": "15"
  },
  {
    "ruleCode": 1802,
    "ruleCountryCode": "GB",
    "isActive": 1,
    "param0": "10"
  },
  {
    "ruleCode": 3054,
    "ruleCountryCode": "GB",
    "isActive": 1
  }
]


4. Add Company

Once "eventRules" have been activated, a "company" can then be added to said portfolio using the following Creditsafe Connect endpoint:


URIHTTP METHOD
/monitoring/portfolios/{portfolioId}/companiesPOST


{
  "id": "GB-0-123456789",
  "personalReference": "",
  "freeText": "",
  "personalLimit": ""
}


5. Get Notification Events

Once "eventRules" have been activated and a "company" has been added to said portfolio, the following Creditsafe Connect endpoint should be called periodically to monitor if any "notificationEvents" have been generated for said "company" / "eventRules":


URIHTTP METHOD
/monitoring/portfolios/{portfolioId}/notificationEventsGET


Whilst this article covers off the fundamentals we strongly advise referring to Creditsafe Connect's documentation site using the following web link:


/monitoring


Should you happen to experience issues then please submit a ticket.