Should Creditsafe Connect ever return the following messaging then it's indicating that it isn't possible to combine some of the query parameters which are being sent in the /companies request: 


URIHTTP ACTION
/companies?countries={countryCode}&{criteriaSet}
GET



{
"correlationId": "4f250320-3399-11ea-8d73-065ffabb5914", "message": "Bad request", "details": "Specified criteria combination is not allowed" }{ "correlationId": "4f250320-3399-11ea-8d73-065ffabb5914", "message": "Bad request", "details": "Specified criteria combination is not allowed"}
JavaScript


When searching for a company using Creditsafe Connect's /companies endpoint it's only possible to search one "criteriaSet" at a time so whilst it's possible to combine the "name" and "postCode" parameters because they persist within the same "criteriaSet", it isn't possible to combine a "regNo" parameter with a "name" parameter: 



The HTTP 400 Bad Request response is best avoided by calling Creditsafe Connect's /searchcriteria endpoint prior to forming the /companies request as it will return a list of all possible "criteriaSets" which could be individually searched to find a company:


URIHTTP ACTION
/companies/searchcriteria?countries={countryCode}
GET


When implementing a watertight search process we would strongly advise adopting the following call sequence to ensure of more efficient company searches:


1. /authenticate

2. /access/countries

3. /companies/searchcriteria?countries={countryCode}

4. /companies?countries={countryCode}&{criteriaSet}


Should further detail be required with regards to the searching of companies via Creditsafe Connect then please refer to the following web link:


Searching Companies


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