background image pattern

Developer news

News KYC API v2: validation on POST endpoints

KYC API v2: validation on POST endpoints

Posted 2025-01-16 | Updated 2025-01-28

Summary

We would like to announce significant updates to our KYC API v2 POST endpoints’ validations rolling out with the 12th of February 2025’s release.

We are restricting the validation with the change resulting in a 400 error with the message “Invalid parameter detected: ‘{input}’. Please check the documentation” if a client includes invalid parameters (e.g. “apple”), whereas previously it returned a 200 status avoiding the parameter.

Change

In the first response, the current situation (as-is) is shown where a 200 status is returned even when an invalid parameter is included in the body parameters. In contrast, the second example (to-be) represents the future scenario after the change is deployed to production. In this case, it will return a 400 error with the message ‘Invalid parameter detected: ‘{input}’. Please check the documentation’ if a client includes invalid parameters (e.g. ‘apple’).

To understand what are valid body parameters in our endpoints, please refer to the console or our openAPI specifications.

Request
curl --location 'https://api.kompany.com/api/v2/company/liveSearch' \
--header 'Content-Type: application/json' \
--header 'user_key: ••••••' \
--data '{
    "countryCode":"AT",
    "searchMethod":"number",
    "searchValue":"340561a",
    "alternativeSource": null,
    "strictSearch":true,
    "limit":10,
    "apple": true
}'

Response now (as-is)
{
    "countryCode": "AT",
    "searchMethod": "number",
    "searchValue": "340561a",
    "searchId": null,
    "status": "COMPLETED",
    "requestTime": "2025-01-14T14:23:26+00:00",
    "responseTime": "2025-01-14T14:23:26+00:00",
    "limit": 10,
    "searchResults": []
}

Response after changes (to-be)
{
    "code": 400,
    "message": "Invalid parameter detected: 'apple'. Please check the documentation.",
    "tag": "#17368681965437",
    "fault": "ERR_COMPANY_LIVESEARCH_INVALID_PARAM"
}


If you would like to provide us with feedback or you have a question related to this, contact us here: support team.