openapi: 3.0.3 info: title: Global System for Mobile Communications GSMA Camara Project Know Your Customer Match description: >- This API provides the customer with the ability to compare the information it (Service Provider, SP) has for a particular mobile phone user with that on file (and verified) by the mobile phone user's Operator in their own KYC records, in order for the SP to confirm the accuracy of the information and provide a specific service to the mobile phone user. license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html version: 0.2.1 x-camara-commonalities: 0.4.0 servers: - url: '{apiRoot}/kyc-match/v0.2' variables: apiRoot: default: http://localhost:9091 description: >- API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath` tags: - name: Match description: >- Operations to match a customer identity against the account data bound to their phone number. paths: /match: post: tags: - Match summary: >- Global System for Mobile Communications Matching a customer identity by checking a set of attributes related against the account data bound to their phone number. description: >- 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. operationId: KYC_Match security: - openId: - kyc-match:match parameters: - $ref: '#/components/parameters/x-correlator' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/KYC_MatchRequestBody' examples: KYC_MatchRequestBodyExample: value: phoneNumber: '+34629255833' idDocument: 66666666q name: Federica Sanchez Arjona givenName: Federica familyName: Sanchez Arjona nameKanaHankaku: federica nameKanaZenkaku: middleNames: Sanchez familyNameAtBirth: YYYY address: Tokyo-to Chiyoda-ku Iidabashi 3-10-10 streetName: Nicolas Salmeron streetNumber: 4 postalCode: 1028460 region: Tokyo locality: ZZZZ country: JP houseNumberExtension: VVVV birthdate: '1978-08-22' email: abc@example.com gender: MALE responses: '200': description: OK headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/KYC_MatchResponse' examples: KYC_Match200Example: value: idDocumentMatch: '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' '400': $ref: '#/components/responses/Generic400' '401': $ref: '#/components/responses/Generic401' '403': $ref: '#/components/responses/Generic403' '404': $ref: '#/components/responses/Generic404' '500': $ref: '#/components/responses/Generic500' '503': $ref: '#/components/responses/Generic503' '504': $ref: '#/components/responses/Generic504' components: securitySchemes: openId: type: openIdConnect openIdConnectUrl: https://example.com/.well-known/openid-configuration headers: x-correlator: description: Correlation id for the different services schema: type: string parameters: x-correlator: name: x-correlator in: header description: Correlation id for the different services schema: type: string schemas: KYC_MatchRequestBody: type: object description: Payload to validate the customer data. properties: phoneNumber: type: string description: >- A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'. idDocument: type: string description: >- Id number associated to the official identity document in the country. It may contain alphanumeric characters. name: type: string description: >- Complete name of the customer, usually composed of first/given name and last/family/sur- name in a country. Depending on the country, the order of first/give name and last/family/sur- name varies, and middle name could be included. It can use givenName, middleNames, familyName and/or familyNameAtBirth. For example, in ESP, name+familyName; in NLD, it can be name+middleNames+familyName or name+middleNames+familyNameAtBirth, etc. givenName: type: string description: First/given name or compound first/given name of the customer. familyName: type: string description: Last name, family name, or surname of the customer. nameKanaHankaku: type: string description: >- Complete name of the customer in Hankaku-Kana format (reading of name) for Japan. nameKanaZenkaku: type: string description: >- Complete name of the customer in Zenkaku-Kana format (reading of name) for Japan. middleNames: type: string description: Middle name/s of the customer. familyNameAtBirth: type: string description: Last/family/sur- name at birth of the customer. address: type: string description: >- Complete address of the customer. For some countries, it is built following the usual concatenation of parameters in a country, but for other countries, this is not the case. For some countries, it can use streetName, streetNumber and/or houseNumberExtension. For example, in ESP, streetName+streetNumber; in NLD, it can be streetName+streetNumber or streetName+streetNumber+houseNumberExtension. streetName: type: string description: >- Name of the street of the customer's address. It should not include the type of the street. streetNumber: type: string description: >- The street number of the customer's address. Number identifying a specific property on the 'streetName'. postalCode: type: string description: Zip code or postal code region: type: string description: Region/prefecture of the customer's address locality: type: string description: Locality of the customer's address country: type: string description: Country of the customer's address. Format ISO 3166-1 alpha-2 houseNumberExtension: type: string description: >- Specific identifier of the house needed depending on the property type. For example, number of apartment in an apartment building. birthdate: type: string description: >- The birthdate of the customer, in ISO 8601 calendar date format (YYYY-MM-DD). email: type: string description: >- Email address of the customer in the RFC specified format (local-part@domain). gender: type: string description: Gender of the customer (Male/Female/Other). enum: - MALE - FEMALE - OTHER MatchResult: type: string enum: - 'true' - 'false' - not_available MatchScoreResult: type: integer description: >- Indicates the similarity score assigned to the input value when it does not exactly match the value stored in the operator's system. This property shall only be returned when the value of the corresponding match field is `false`. minimum: 0 maximum: 100 KYC_MatchResponse: type: object properties: idDocumentMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether Id number associated to the ID document of the customer matches with the one on the Operator's system. nameMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the complete name of the customer matches with the one on the Operator's system. nameMatchScore: $ref: '#/components/schemas/MatchScoreResult' givenNameMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether First name/given name of the customer matches with the one on the Operator's system. givenNameMatchScore: $ref: '#/components/schemas/MatchScoreResult' familyNameMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether last name/ family name/ surname of the customer matches with the one on the Operator's system. familyNameMatchScore: $ref: '#/components/schemas/MatchScoreResult' nameKanaHankakuMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether complete name of the customer in Hankaku-Kana format (reading of name) for Japan matches with the one on the Operator's system. nameKanaHankakuMatchScore: $ref: '#/components/schemas/MatchScoreResult' nameKanaZenkakuMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether complete name of the customer in Zenkaku-Kana format (reading of name) for Japan matches with the one on the Operator's system. nameKanaZenkakuMatchScore: $ref: '#/components/schemas/MatchScoreResult' middleNamesMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the middle names of the customer matches with the one on the Operator's system. middleNamesScore: $ref: '#/components/schemas/MatchScoreResult' familyNameAtBirthMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the Family Name At Birth of the customer matches with the one on the Operator's system. familyNameAtBirthMatchScore: $ref: '#/components/schemas/MatchScoreResult' addressMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether complete address of the customer matches with the one on the Operator's system. addressMatchScore: $ref: '#/components/schemas/MatchScoreResult' streetNameMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the street name of the customer matches with the one on the Operator's system. streetNameMatchScore: $ref: '#/components/schemas/MatchScoreResult' streetNumberMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the street number of the customer matches with the one on the Operator's system. streetNumberMatchScore: $ref: '#/components/schemas/MatchScoreResult' postalCodeMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the postal code / zip code of the customer matches with the one on the Operator's system. regionMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the region of the customer's address matches with the one on the Operator's system. regionMatchScore: $ref: '#/components/schemas/MatchScoreResult' localityMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the locality of the customer's address matches with the one on the Operator's system. localityMatchScore: $ref: '#/components/schemas/MatchScoreResult' countryMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the country of the customer's address matches with the one on the Operator's system. houseNumberExtensionMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the house number extension of the customer's address with the one on the Operator's system. birthdateMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the birthdate of the customer matches with the one on the Operator's system. emailMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the email address of the customer matches with the one on the Operator's system. emailMatchScore: $ref: '#/components/schemas/MatchScoreResult' genderMatch: allOf: - $ref: '#/components/schemas/MatchResult' - description: >- Indicates whether the gender of the customer matches with the one on the Operator's system. ErrorInfo: type: object required: - status - code - message properties: status: type: integer description: HTTP response status code code: type: string description: Code given to this error message: type: string description: Detailed error description responses: Generic400: description: >- Problem with the client request. In addition to regular scenario of `INVALID_ARGUMENT`, another scenario may exist. - Indicated param combination is invalid (`"code": "KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION","message": "Indicated parameter combination is invalid"`) headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: InvalidArgument: value: status: 400 code: INVALID_ARGUMENT message: >- Client specified an invalid argument, request body or query param InvalidParamCombination: value: status: 400 code: KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION message: Indicated parameter combination is invalid Generic401: description: >- Authentication problem with the client request. Unauthorized error. Access Token related errors. headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: Unauthenticated: value: status: 401 code: UNAUTHENTICATED message: >- Request not authenticated due to missing, invalid, or expired credentials Generic403: description: > Client does not have sufficient permission. In addition to regular scenario of `PERMISSION_DENIED`, another scenarios may exist: - Phone number cannot be deducted from access token context.(`{"code": "INVALID_TOKEN_CONTEXT","message": "Phone number mismatch with access token context"}`) - The idDocument property is missing.(`{"code": "KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED","message": "The idDocument is required to perform the properties validation"}`) - The idDocument does not match the one associated to the provided phoneNumber in the Operator's system.(`{"code": "KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH","message": "The idDocument needs to match the one associated with the provided phoneNumber"}`) headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: PermissionDenied: value: status: 403 code: PERMISSION_DENIED message: >- Client does not have sufficient permissions to perform this action InvalidTokenContext: value: status: 403 code: INVALID_TOKEN_CONTEXT message: Phone number mismatch with access token context IdDocumentRequired: value: status: 403 code: KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED message: >- The idDocument is required to perform the properties validation IdDocumentMismatch: value: status: 403 code: KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH message: >- The idDocument needs to match the one associated with the provided phoneNumber Generic404: description: | Not Found error. Error if URL is wrong / user is not found. headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: NotFound: value: status: 404 code: NOT_FOUND message: not_found_contractor/not_found Generic500: description: >- Server error. Problem with MNO's server side. Some processing error within MNO's servers. headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: ServerError: value: status: 500 code: INTERNAL message: Server error Generic503: description: >- Service unavailable. Typically the server is down. Problem with MNO's server side. Any unexpected error within MNO's servers. headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: ServiceUnavailable: value: status: 503 code: UNAVAILABLE message: Service unavailable Generic504: description: >- Request time exceeded. If it happens repeatedly, consider reducing the request complexity headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' example: status: 504 code: TIMEOUT message: Request timeout exceeded. Try later.