---
title: Composite Searching
slug: api/74Js-composite-searching
icon: {"faIcon":"fa-brands fa-buffer"}
createdAt: 2025-03-04T04:58:12.758Z
---

**Composite search in Brazil enables clients to automate the selection of multiple services, processing verification inputs through successive data sources and returning responses from each selected service.**



<u>**Example&#x20;**</u>- API Requests and Responses with following services configured:

Brazil Tax Registration
Brazil National ID
Brazil Residential
Brazil National ID 2

:::ApiMethodV2
```json
{
  "name": "Brazil Composite Search",
  "method": "POST",
  "url": "https://idu-test.datazoo.com/api/v2/verify",
  "description": "* Verification Outcome – KYC verification from sequenced searching and returns single or duel (where possible) source matches\n* Consumer Consent – N/A\n* Mandatory Input – Name, DOB, Address and National ID number\n* Verifies – Name, DOB, Address, Phone and National ID number\n* Returned Data - For \"Brazil National ID 2\" service, returns data related to Address, flag indicator for Deceased and information on input ID number.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "f2jMy98sIuBrop0Bgc788",
        "language": "curl",
        "code": "curl --location 'https://idu-test.datazoo.com/api/v2/verify' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImMtbVZlMl9KRFhMcnkzaEhQWEN4TyJ9.eyJ1aWQiOiIzMDMiLCJvaWQiOiI2MiIsImlzcyI6Imh0dHBzOi8vZGF0YXpvby10ZXN0LnVzLmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwzMDMiLCJhdWQiOiJodHRwczovL2t5Yy10ZXN0LmRhdGF6b28uY29tIiwiaWF0IjoxNzQ1ODg0Mjg2LCJleHAiOjE3NDU5MjAyODYsImd0eSI6InBhc3N3b3JkIiwiYXpwIjoiSWxVdURJNTF1QXpuVnE2VGVoRXAyOXBrbEhBSjFtYnkifQ.EaCawREtQ7I-OiOELMh7BcvIY1augcEUQNnsHpqdU2O6DSIMJXqedRaJe9tyGHTatb1sbpZSwsMcInDGv03hfKfiClu8ulqAiDELs5SnC6-Dj4b3ei1nw0Zz2mm4xsH613YYoIQ6bPaMKrW9E4qMAnYDgJC9kWaPxG8cvZjkL7LYHmdapGYdYzgatX27U88SPVWjHfBhISxcgHkdCit5n55h-t-B0e6_BCkazTXPRuv4SF0St1awFR_p0MwuUszleF6auk2pTNZC54fONFC6LLfygH0nwE_49QNEV1VwyojWeCuGNMihDcdht3IMWBV2pnS58RIYsgEaQuSz6vqLJw' \\\n--data '{\n    \"countryCode\": \"BR\",\n    \"service\": [\n        \"Brazil Tax Registration\",\n        \"Brazil National ID\",\n        \"Brazil Residential\",\n        \"Brazil National ID 2\"\n    ],\n    \"clientReference\": \"Test_0001\",    \n    \"firstName\": \"TIAGO\",\n    \"middleName\": \"DE OLIVEIRA\",\n    \"lastName\": \"PINHEIRO\",\n    \"dateOfBirth\": \"11-07-1985\",\n    \"addressElement1\": \"R XINGU\",\n    \"addressElement2\": \"CARAJAS\",\n    \"addressElement3\": \"PATROCINIO\",\n    \"addressElement4\": \"MG\",\n    \"addressElement5\": \"38747382\",\n    \"identityVariables\": {\n        \"phoneNo\": \"03438327210\",\n        \"cpf\": \"06394406651\"\n    }\n}'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "f2jMy98sIuBrop0Bgc788"
  },
  "results": {
    "languages": [
      {
        "id": "-KLLvb-_jXQIuU-WuWQAF",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"countryCode\": \"Brazil\",\n    \"clientReference\": \"Test_0001\",\n    \"reportingReference\": \"DZ-a6562175-aae8-4942-a50c-1df27c026c43\",\n    \"matchStatus\": \"Full Match 2+2 Verification\",\n    \"searchErrorMessage\": \"\",\n    \"safeHarbour\": true,\n    \"searchStatus\": \"Successful\",\n    \"serviceResponses\": {\n        \"Brazil National ID\": {\n            \"status\": 2,\n            \"sourceStatus\": \"Successful\",\n            \"errorMessage\": \"\",\n            \"identityVerified\": false,\n            \"safeHarbourScore\": \"none\",\n            \"nameMatchScore\": \"0.000\",\n            \"addressMatchScore\": \"0.000\",\n            \"verifications\": {\n                \"addressElement1\": false,\n                \"addressElement3\": false,\n                \"addressElement4\": false,\n                \"addressElement5\": false,\n                \"cpf\": false,\n                \"dateOfBirth\": false,\n                \"firstName\": false,\n                \"lastName\": false,\n                \"middleName\": false,\n                \"phoneNo\": false\n            },\n            \"returnedData\": {}\n        },\n        \"Brazil National ID 2\": {\n            \"status\": 2,\n            \"sourceStatus\": \"Successful\",\n            \"errorMessage\": \"\",\n            \"identityVerified\": false,\n            \"safeHarbourScore\": \"L3\",\n            \"nameMatchScore\": \"1.000\",\n            \"addressMatchScore\": \"0.500\",\n            \"verifications\": {\n                \"addressElement1\": false,\n                \"addressElement2\": true,\n                \"addressElement3\": true,\n                \"addressElement4\": true,\n                \"addressElement5\": true,\n                \"cpf\": true,\n                \"dateOfBirth\": false,\n                \"firstName\": true,\n                \"lastName\": true,\n                \"middleName\": true\n            },\n            \"returnedData\": {\n                \"address\": \"119 Rua Xingu C C Carajás Patrocínio MG 38747382\",\n                \"dateOfDeath\": null,\n                \"dateOfRegistration\": \"17/08/2001\",\n                \"matchedAddress\": \"Previous\",\n                \"registrationStatus\": \"Regular\"\n            }\n        },\n        \"Brazil Residential\": {\n            \"status\": 1,\n            \"sourceStatus\": \"Successful\",\n            \"errorMessage\": \"\",\n            \"identityVerified\": true,\n            \"safeHarbourScore\": \"L1\",\n            \"nameMatchScore\": \"0.662\",\n            \"addressMatchScore\": \"1.000\",\n            \"verifications\": {\n                \"addressElement1\": true,\n                \"addressElement2\": true,\n                \"addressElement3\": true,\n                \"addressElement4\": true,\n                \"addressElement5\": true,\n                \"cpf\": true,\n                \"dateOfBirth\": true,\n                \"firstName\": true,\n                \"lastName\": false,\n                \"middleName\": false,\n                \"phoneNo\": true\n            },\n            \"returnedData\": {}\n        },\n        \"Brazil Tax Registration\": {\n            \"status\": 0,\n            \"sourceStatus\": \"Successful\",\n            \"errorMessage\": \"\",\n            \"identityVerified\": true,\n            \"safeHarbourScore\": \"L2\",\n            \"nameMatchScore\": \"1.000\",\n            \"addressMatchScore\": \"N/A\",\n            \"verifications\": {\n                \"cpf\": true,\n                \"dateOfBirth\": true,\n                \"fullName\": true\n            },\n            \"returnedData\": {}\n        }\n    },\n    \"remarks\": []\n}"
      },
      {
        "id": "AS5tJ4glQVhlG7b69Q21J",
        "language": "404",
        "customLabel": "",
        "code": "{\n  \"message\": \"Ain't no cake like that.\"\n}"
      }
    ],
    "selectedLanguageId": "-KLLvb-_jXQIuU-WuWQAF"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "sessionToken obtained via the Authentication call",
        "": "sessionToken obtained via the Authentication call"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "data",
        "kind": "required",
        "type": "object",
        "description": "request body sent to the API",
        "": "object",
        "children": [
          {
            "name": "countryCode",
            "kind": "required",
            "type": "string",
            "description": "BR"
          },
          {
            "name": "service",
            "kind": "required",
            "type": "array",
            "description": "\"Brazil Tax Registration\", \"Brazil National ID\", \"Brazil Residential\", \"Brazil National ID 2\""
          },
          {
            "name": "clientReference",
            "kind": "optional",
            "type": "string",
            "description": "a client reference field"
          },
          {
            "name": "fullName",
            "kind": "required",
            "type": "string",
            "description": "full name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "firstName",
            "kind": "required",
            "type": "string",
            "description": "first name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "middleName",
            "kind": "optional",
            "type": "string",
            "description": "the middle name(s) of the identity owner\n* See the note below for more details."
          },
          {
            "name": "lastName",
            "kind": "required",
            "type": "string",
            "description": "the last name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "dateOfBirth",
            "kind": "required",
            "type": "string",
            "description": "in YYYY-MM-DD (preferred) or DD-MM-YYYY format",
            "children": []
          },
          {
            "name": "addressElement1",
            "kind": "required",
            "type": "string",
            "description": "the street name of the address of the identity owner",
            "children": []
          },
          {
            "name": "addressElement2",
            "kind": "optional",
            "type": "string",
            "description": "the neighbourhood name of the address",
            "children": []
          },
          {
            "name": "addressElement3",
            "kind": "required",
            "type": "string",
            "description": "the City/Town/Locality of the address of the identity owner",
            "children": []
          },
          {
            "name": "addressElement4",
            "kind": "optional",
            "type": "string",
            "description": "the Province of the address of the identity owner"
          },
          {
            "name": "addressElement5",
            "kind": "required",
            "type": "string",
            "description": "the post code of the address of the identity owner",
            "children": []
          },
          {
            "name": "identityVariables",
            "kind": "required",
            "type": "object",
            "description": "other elements for verification",
            "children": [
              {
                "name": "phoneNo",
                "kind": "optional",
                "type": "string",
                "description": "phone number of the identity owner"
              },
              {
                "name": "cpf",
                "kind": "required",
                "type": "string",
                "description": "ID number of the identity owner"
              }
            ]
          }
        ],
        "schema": [
          {
            "name": "countryCode",
            "kind": "required",
            "type": "string",
            "description": "BR"
          },
          {
            "name": "service",
            "kind": "required",
            "type": "array",
            "description": "\"Brazil Tax Registration\", \"Brazil National ID\", \"Brazil Residential\", \"Brazil National ID 2\""
          },
          {
            "name": "clientReference",
            "kind": "optional",
            "type": "string",
            "description": "a client reference field"
          },
          {
            "name": "fullName",
            "kind": "required",
            "type": "string",
            "description": "full name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "firstName",
            "kind": "required",
            "type": "string",
            "description": "first name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "middleName",
            "kind": "optional",
            "type": "string",
            "description": "the middle name(s) of the identity owner\n* See the note below for more details."
          },
          {
            "name": "lastName",
            "kind": "required",
            "type": "string",
            "description": "the last name of the identity owner\n* See the note below for more details."
          },
          {
            "name": "dateOfBirth",
            "kind": "required",
            "type": "string",
            "description": "in YYYY-MM-DD (preferred) or DD-MM-YYYY format",
            "children": []
          },
          {
            "name": "addressElement1",
            "kind": "required",
            "type": "string",
            "description": "the street name of the address of the identity owner",
            "children": []
          },
          {
            "name": "addressElement2",
            "kind": "optional",
            "type": "string",
            "description": "the neighbourhood name of the address",
            "children": []
          },
          {
            "name": "addressElement3",
            "kind": "required",
            "type": "string",
            "description": "the City/Town/Locality of the address of the identity owner",
            "children": []
          },
          {
            "name": "addressElement4",
            "kind": "optional",
            "type": "string",
            "description": "the Province of the address of the identity owner"
          },
          {
            "name": "addressElement5",
            "kind": "required",
            "type": "string",
            "description": "the post code of the address of the identity owner",
            "children": []
          },
          {
            "name": "identityVariables",
            "kind": "required",
            "type": "object",
            "description": "other elements for verification",
            "children": [
              {
                "name": "phoneNo",
                "kind": "optional",
                "type": "string",
                "description": "phone number of the identity owner"
              },
              {
                "name": "cpf",
                "kind": "required",
                "type": "string",
                "description": "ID number of the identity owner"
              }
            ]
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "countryCode",
      "kind": "optional",
      "type": "string",
      "description": "Brazil",
      "children": []
    },
    {
      "name": "clientReference",
      "kind": "optional",
      "type": "string",
      "description": "the client reference (if given as input) ",
      "children": []
    },
    {
      "name": "reportingReference",
      "kind": "optional",
      "type": "string",
      "description": "a reference number generated which is unique to each transaction. ",
      "children": []
    },
    {
      "name": "validationErrors",
      "kind": "optional",
      "type": "string",
      "description": "Returned with HTTP status code 400 when the request contains invalid or improperly formatted input data.",
      "children": []
    },
    {
      "name": "matchStatus",
      "kind": "optional",
      "type": "string",
      "description": "\"Full Match 1+1 Verification\" \n\"Full Match 2+2 Verification\" \n\"No Match\""
    },
    {
      "name": "searchErrorMessage",
      "kind": "optional",
      "type": "string",
      "description": "error message returned querying the data source",
      "children": []
    },
    {
      "name": "safeHarbour",
      "kind": "optional",
      "type": "boolean",
      "description": "true or false",
      "children": []
    },
    {
      "name": "searchStatus",
      "kind": "optional",
      "type": "string",
      "description": "\"Successful\" \n\"Not Successful\"",
      "children": []
    },
    {
      "name": "serviceResponses",
      "kind": "optional",
      "type": "object",
      "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\"",
      "children": [
        {
          "name": "status",
          "kind": "optional",
          "type": "integer",
          "description": "0 - identityVerified TRUE - element verifications all TRUE\n1 - identityVerified TRUE - element verifications not all TRUE\n2 - identityVerified FALSE - sourceStatus SUCCESSFUL\n3 - identityVerified FALSE - sourceStatus NOT SUCCESSFUL"
        },
        {
          "name": "sourceStatus",
          "kind": "optional",
          "type": "string",
          "description": "\"Successful\"\n\"Unsuccessful\""
        },
        {
          "name": "errorMessage",
          "kind": "optional",
          "type": "string",
          "description": "error message(s) from the data source.  Example, \"Error querying data source\"."
        },
        {
          "name": "identityVerified",
          "kind": "optional",
          "type": "boolean",
          "description": "true or false"
        },
        {
          "name": "safeHarbourScore",
          "kind": "optional",
          "type": "string",
          "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\"\n* For more information, refer to Safe Harbour Scores page"
        },
        {
          "name": "nameMatchScore",
          "kind": "optional",
          "type": "string",
          "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\""
        },
        {
          "name": "addressMatchScore",
          "kind": "optional",
          "type": "string",
          "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\""
        },
        {
          "name": "verifications",
          "kind": "optional",
          "type": "object",
          "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\"",
          "children": [
            {
              "name": "addressElement1",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "addressElement2",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "addressElement3",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "addressElement4",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "addressElement5",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "cpf",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "dateOfBirth",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "firstName",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "fullName",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "lastName",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "middleName",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            }
          ]
        },
        {
          "name": "returnedData",
          "kind": "optional",
          "type": "object",
          "description": "* refer to the section at the bottom of the page titled \"Service Responses Overview\"",
          "children": [
            {
              "name": "address",
              "kind": "optional",
              "type": "string",
              "description": "address available in the data source"
            },
            {
              "name": "dateOfDeath",
              "kind": "optional",
              "type": "string",
              "description": "Deceased Date - if applicable"
            },
            {
              "name": "dateOfRegistration",
              "kind": "optional",
              "type": "string",
              "description": "date of the ID card registration"
            },
            {
              "name": "matchedAddress",
              "kind": "optional",
              "type": "string",
              "description": "status of the returned address (eg. Current or Previous)"
            },
            {
              "name": "registrationStatus",
              "kind": "optional",
              "type": "string",
              "description": "current status of the ID card (eg. Regular or Canceled or Suspended or Pending or Null)"
            }
          ]
        }
      ]
    },
    {
      "name": "remarks",
      "kind": "optional",
      "type": "array",
      "description": "Null",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "brazil-composite-search",
  "legacyHash": "gTEmsL1KqqV9EBdOGzmfo"
}
```
:::

***

:::hint{type="info"}
**Mandatory Input for Name**

Either of the following must be provided:&#x20;

- ( `firstName `+ `lastName `) **Mandatory&#x20;**&#x77;hen `fullName `is not provided
- `fullName `is **Mandatory&#x20;**&#x77;hen ( `firstName `+ `lastName `) are not provided

***Note***: If **Brazil National ID** service is included in the sequence, use ( `firstName `+ `lastName `)&#x20;
:::

***

:::hint{type="info"}
# Service Responses Overview&#x20;

Each service returns its own self-contained response block, ensuring modular and source-specific verification results. Consumers of this API should handle varying response structures dynamically based on the requested services.&#x20;

## Service Responses Element

The **serviceResponses** object in the API response contains verification results from one or more data sources, structured under their respective service names. Each service returns a distinct response block with service-specific data.

### Structure and Behavior:&#x20;

- Each key within **serviceResponses** corresponds to a **service name**, representing an individual verification source.
- Services may return data from **a single source or multiple sources** in a sequenced API call.
- The structure of each service response varies, with fields such as **status**, **identityVerified**, and **safeHarbourScore** differing between services.
- The **verifications** block contains service-specific boolean indicators for individual verification checks (e.g., **addressElement1**, **dateOfBirth**, **firstName**).
- The **returnedData** block provides metadata (if applicable).
:::

***

:::Changelog{title="Change History"}
::ChangelogItem{type="added" description="Last updated - 28 April, 2025"}
:::

