Matching a customer identity by checking a set of attributes related against the account data bound to their phone number.
client.knowyourcustomermatch.match(KnowyourcustomermatchMatchParams { address, birthdate, cityOfBirth, 23 more } params, RequestOptionsoptions?): KnowyourcustomermatchMatchResponse { addressMatch, addressMatchScore, birthdateMatch, 35 more }
POST/knowyourcustomermatch/match
Verify matching of a number of attributes related to a customer identity against the verified data bound to their phone number in the Operator systems. Regardless of whether the phoneNumber is explicitly stated in the request body, at least one of the other fields must be provided, otherwise a HTTP 400 - KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION error will be returned.
The API will return the result of the matching process for each requested attribute. This means that the response will only contain the attributes for which validation has been requested. Possible values are:
- true: the attribute provided matches with the one in the Operator systems, which is equal to a
match_scoreof 100. - false: the attribute provided does not match with the one in the Operator systems.
- not_available: the attribute is not available to validate.
Matching a customer identity by checking a set of attributes related against the account data bound to their phone number.
import Camara from 'camara-sdk';
const client = new Camara({
bearerToken: process.env['CAMARA_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.knowyourcustomermatch.match({
address: 'Tokyo-to Chiyoda-ku Iidabashi 3-10-10',
birthdate: '1978-08-22',
cityOfBirth: 'Madrid',
country: 'JP',
countryOfBirth: 'ES',
email: 'abc@example.com',
familyName: 'Sanchez Arjona',
familyNameAtBirth: 'YYYY',
gender: 'OTHER',
givenName: 'Federica',
houseNumberExtension: 'VVVV',
idDocument: '66666666q',
idDocumentExpiryDate: '2027-07-12',
idDocumentType: 'passport',
locality: 'ZZZZ',
middleNames: 'Sanchez',
name: 'Federica Sanchez Arjona',
nameKanaHankaku: 'federica',
nameKanaZenkaku: 'Federica',
nationality: 'ES',
phoneNumber: '+34629255833',
postalCode: '1028460',
region: 'Tokyo',
streetName: 'Nicolas Salmeron',
streetNumber: '4',
});
console.log(response.idDocumentExpiryDateMatch);{
"idDocumentMatch": "true",
"idDocumentTypeMatch": "true",
"idDocumentExpiryDateMatch": "true",
"nameMatch": "true",
"givenNameMatch": "not_available",
"familyNameMatch": "not_available",
"nameKanaHankakuMatch": "true",
"nameKanaZenkakuMatch": "false",
"middleNamesMatch": "true",
"familyNameAtBirthMatch": "false",
"familyNameAtBirthMatchScore": 90,
"addressMatch": "true",
"streetNameMatch": "true",
"streetNumberMatch": "true",
"postalCodeMatch": "true",
"regionMatch": "true",
"localityMatch": "not_available",
"countryMatch": "true",
"houseNumberExtensionMatch": "not_available",
"birthdateMatch": "false",
"emailMatch": "false",
"emailMatchScore": 87,
"genderMatch": "false",
"cityOfBirthMatch": "false",
"cityOfBirthMatchScore": 86,
"countryOfBirthMatch": "true",
"nationalityMatch": "true"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION",
"message": "Indicated parameter combination is invalid"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 403,
"code": "INVALID_TOKEN_CONTEXT",
"message": "phoneNumber is not consistent with access token."
}{
"status": 404,
"code": "NOT_FOUND",
"message": "The specified resource is not found."
}{
"status": 404,
"code": "IDENTIFIER_NOT_FOUND",
"message": "The phone number provided is not associated with a customer account"
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not applicable for the provided phone number"
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "No phone number has been provided"
}Returns Examples
{
"idDocumentMatch": "true",
"idDocumentTypeMatch": "true",
"idDocumentExpiryDateMatch": "true",
"nameMatch": "true",
"givenNameMatch": "not_available",
"familyNameMatch": "not_available",
"nameKanaHankakuMatch": "true",
"nameKanaZenkakuMatch": "false",
"middleNamesMatch": "true",
"familyNameAtBirthMatch": "false",
"familyNameAtBirthMatchScore": 90,
"addressMatch": "true",
"streetNameMatch": "true",
"streetNumberMatch": "true",
"postalCodeMatch": "true",
"regionMatch": "true",
"localityMatch": "not_available",
"countryMatch": "true",
"houseNumberExtensionMatch": "not_available",
"birthdateMatch": "false",
"emailMatch": "false",
"emailMatchScore": 87,
"genderMatch": "false",
"cityOfBirthMatch": "false",
"cityOfBirthMatchScore": 86,
"countryOfBirthMatch": "true",
"nationalityMatch": "true"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION",
"message": "Indicated parameter combination is invalid"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 403,
"code": "INVALID_TOKEN_CONTEXT",
"message": "phoneNumber is not consistent with access token."
}{
"status": 404,
"code": "NOT_FOUND",
"message": "The specified resource is not found."
}{
"status": 404,
"code": "IDENTIFIER_NOT_FOUND",
"message": "The phone number provided is not associated with a customer account"
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not applicable for the provided phone number"
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "No phone number has been provided"
}