Request/response examples
The following are some examples of the JSON requests and responses.
For endpoint-specific request and response examples, see Integration endpoints.
Example custom check response
If your check type is an INDIVIDUAL_CUSTOM
or COMPANY_CUSTOM
check, the following is an example of the response, which includes the optional embedded link.
{ "provider_data": "Demo result. Did not make request to provider.", "errors": [], "warnings": [], "external_resources": [{ "type": "LINK", "url": "https://www.example-url.com/made-up/123456", "id": "7cde8cf5-3904-4e9a-be77-6df909e00a49", "label": "External embedded link label" }], "result": { "decision": "PASS", "summary": "The check has passed successfully." } }
Example error response
This example shows when you have encountered an error from your integration or from the request itself.
You can indicate a particular type
of error using one of the following error types:
INVALID_CREDENTIALS
INVALID_CONFIG
MISSING_CHECK_INPUT
INVALID_CHECK_INPUT
PROVIDER_CONNECTION
PROVIDER_MESSAGE
The message
field can be a string with any value, but be aware this message
is displayed to Maxsight users in the check response.
You must also include the warnings
field, even if it is just an empty array.
{ "errors": [ { "type": "MISSING_CHECK_INPUT", "message": "The request is missing required fields." } ], "warnings": [] }
Note
Error responses should be sent with a 200 response code.
This is so Maxsight knows your integration has correctly handled the error.
Example company request
If your check type is a related to company entities, the following is an example of the sort of company request you may receive from Maxsight.
{ "id": "6d756084-78e5-4bea-9054-25656cc081cd", "demo_result": null, "commercial_relationship": "DIRECT", "check_input": { "entity_type": "COMPANY", "metadata": { "number": "01234566", "lei": "11112yhdiwhee888", "name": "Made up company UK, LTD", "addresses": [ { "type": "trading_address", "address": { "type": "STRUCTURED", "country": "GBR", "county": "Greater London", "premise": "The Building", "street_number": 52, "route": "London Street", "postal_town": "London", "postcal_code": "EC3M 7AF" } } ], "country_of_incorporation": "GBR", "contact_details": { "url": "www.made-up-company.com" }, "incorporation_date": "2014-06-12", "structured_company_type": { "is_public": false, "is_limited": true, } }, }, "provider_config": {}, "provider_credentials": { "API Token": "xxxxxxxxxx" } }
The data fields included in the request may be slightly different than those that appear in the Maxsight UI. Although you likely always have at least country_of_incorporation
and name
.
Example individual request
If your check type is a related to individual entities, the following is an example of the sort of individual request you may receive from Maxsight.
{ "id": "06666b2f-ebf3-4811-b39f-6ba7e3cb017d", "demo_result": null, "commercial_relationship": "DIRECT", "check_input": { "entity_type": "INDIVIDUAL", "address_history": [ { "address": { "type": "STRUCTURED", "country": "CAN", "postal_code": "A1 1AA", "postal_town": "Somewhereville", "route": "Somewhere St", "street_number": "1" } } ], "contact_details": { "email": "someone@somewhere.com", "phone_number": "0131 496 0007" }, "personal_details": { "dob": "1990-01-01", "name": { "family_name": "Smith", "given_names": [ "John" ] } } }, "provider_config": {}, "provider_credentials": null }
The data fields included in the request may be slightly different than those that appear in the Maxsight UI. Although you likely always have at least family_name
and given_names
Example /complete and /get_result endpoint request
If your check template is using callbacks, you implemented the /complete
or /get_result
endpoint. The following is an example request to these endpoints. Note that the reference
is used to indicate which entity’s data is expected in the response.
For more information on using callbacks, see Maxsight callback endpoints.
{ "id": "1edc731b-7cf4-4bd1-9e1d-570f3f1728e6", "provider_id": "d1d2dc88-2947-4dd4-a9a8-c3ee047b9183", "reference": "08b07dd9-a212-482a-819a-90318b5481ba", "commercial_relationship": "DIRECT", "provider_config": {}, "provider_credentials": null, "custom_data": {} }