Testing¶
Testing in Sandbox¶
Sandbox API¶
Using our API in the sandbox environment is a great way to understand how the API behaves and provides a stable environment for you to write and test your integration. This can include checking that API responses are read and handled correctly, and that the communication with the relevant API endpoints works as expected.
Real-world test scenarios in Sandbox¶
You can use Consumer Intelligence's Sandbox API to create mocked persons and simulate real-world scenarios -- please see our guide to Sandbox to learn more.
For some of our external sources, we have integrated sandbox with their testing environment. See Sandbox column in the Sources table for the status and availability.
Testing external integrations requires permit
Contact us if you want to set up a testing permit to any of our external data providers.
Create a mock person¶
Send an API request to create a mocked person. This person will be made available for your client only.
curl https://sandbox-api.bisnode.com/consumer-intelligence/sandbox/persons \
-X POST \
-H "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"id": "custom-id-123",
"country": "SE",
"legalId": "190101050953",
"firstName": "Kalle",
"familyName": "Customsson",
"dateOfBirth": "1901-01-05",
"gender": "Male",
"addressList": [
{
"type": "Postal",
"subType": "Domicile",
"restricted": "Confidential",
"careOf": "Kalle",
"streetName": "Sveavägen",
"streetNumber": "22",
"entrance": "A",
"country": "SE"
}
],
"phoneList": [
{
"type": "Mobile",
"number": "+46123456789"
}
],
"citizenship": ["SE"]
}'
This will create a new person available in sandbox just for your client, and assign a GEDI to your created person.
You can use the Get Person API to find the person using GEDI from the response.
curl https://sandbox-api.bisnode.com/consumer-intelligence/v3/persons/{MOCKED_PERSON_GEDI} \
-H "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
-H "Content-Type: application/json"
Ensure correct permissions
If you get 404 Not Found
when trying to retrieve a mocked person by GEDI,
it might mean that you do not have permissions to the market (country
) of your mocked person.
Contact us to verify your permissions.
Trigger real life changes of a mocked person¶
You can trigger real life changes of a mocked person by importing them with the same id
and country
.
Below you can find an example of
{
"id": "custom-id-123",
"country": "SE",
"deceased": false, // (1)
"protectedIdentity": false, // (2)
"removed": false, // (3)
"deregistered": false, // (4)
"legalId": "190101050953",
"firstName": "Kalle",
"familyName": "Customsson",
"dateOfBirth": "1901-01-05",
"gender": "Male",
"addressList": [
{
"type": "Postal",
"subType": "Domicile",
"restricted": "Confidential",
"careOf": "Kalle",
"streetName": "Sveavägen",
"streetNumber": "22",
"entrance": "A",
"country": "SE"
}
],
"phoneList": [
{
"type": "Mobile",
"number": "+46123456789"
}
],
"citizenship": ["SE"]
}
- Set to
true
to mark this person as deceased. Additional propertiesdateOfDeath
is optionally available for deceased persons. - Set to
true
to mark this person as protected. - Set to
true
to mark this person as removed. - Set to
true
to mark this person as deregistered. Additional propertiesderegisteredReason
andderegisteredDate
is optionally available for deregistered persons.
Trigger a life event¶
- Send an API request to create a mocked person.
- Use the Trigger life event API to trigger a life event of the mocked person.