> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didx.co.za/llms.txt
> Use this file to discover all available pages before exploring further.

# Performs passport validation with face matching and liveness

> Performs passport validation with face matching and liveness



## OpenAPI

````yaml products/didx-verify/api-reference/v1/openapi.json post /Citizen/ValidatePassportAndPhotoWithLiveness
openapi: 3.0.1
info:
  title: SecureCitizen.Citizen.Api
  description: >-
    This is the API documentation for Secure Citizen products. Should you
    require further information please contact us on the email provided.
  contact:
    name: Api Contant Name
    email: support@securecitizen.co.za
  license:
    name: Proprietary
    url: https://www.securecitizen.co.za
  version: v1
  x-logo:
    url: >-
      https://securecitizen.co.za/wp-content/uploads/2022/11/Untitled-design-14.svg
    altText: Secure Citizen
servers:
  - url: https://citizen.uat.securecitizen.cloud
security: []
tags:
  - name: Citizen
    description: This details information we can replace to describe this endpoint
  - name: CitizenV
    description: This details information we can replace to describe this endpoint
  - name: CustomClient
    description: This details information we can replace to describe this endpoint
  - name: Partner
    description: This details information we can replace to describe this endpoint
paths:
  /Citizen/ValidatePassportAndPhotoWithLiveness:
    post:
      tags:
        - Citizen
      summary: Performs passport validation with face matching and liveness
      description: Performs passport validation with face matching and liveness
      operationId: ValidatePassportAndPhotoWithLiveness
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CombinedValidatePassportAndPhotoRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CombinedValidatePassportAndPhotoWithLivenessResponse
        '401':
          description: Unauthenticated
        '403':
          description: Unauthorized access to this resource
        '500':
          description: Cat-as-trophy
      security:
        - oauth2:
            - sc-citizen
components:
  schemas:
    CombinedValidatePassportAndPhotoRequest:
      required:
        - ConsentReceived
        - FaceString
        - PassportImage
        - PassportNumber
        - SCConsentReceived
      type: object
      properties:
        CRef:
          title: Client Reference
          type: string
          description: "Example: \"REF00001\"\r\n\r\nThis is the unique transaction reference number that can be supplied by the controller. This will be provided in response messages related to the transaction and will be required for identifying transactions for support purposes."
          format: string
          nullable: true
        ConsentReceived:
          title: Consent Received
          type: boolean
          description: "Example: true\r\n\r\nThis is an indicator to audit the fact that the controller has obtained consent from the subject to process their personal information and data as per the regulatory requirements pertaining to local and global privacy and data protection legislation."
          format: bool
        SCConsentReceived:
          title: Secure Citizen Consent Received
          type: boolean
          description: >-
            This is an indication that the client has obtained consent from the
            consumer for us to store their data.
        MobileNumber:
          title: Mobile Number
          type: string
          description: >-
            The client would share the mobile number provided by the consumer in
            this field.
          nullable: true
        EmailAddress:
          title: Email Address
          type: string
          description: >-
            The client would share the email address provided by the consumer in
            this field.
          nullable: true
        PassportNumber:
          title: Passport number
          minLength: 1
          type: string
          description: >-
            The client is required to input the passport number as seen in the
            consumers passport.
        PassportImage:
          title: Pasport Image
          minLength: 1
          type: string
          description: >-
            In this field the client would supply the passport image of the
            consumer whose documentation they would like to verify.
        FaceString:
          title: Face String
          minLength: 1
          type: string
          description: >-
            In this field the client is to provide an image with which a face
            comparison will be done, the provided image must be in BASE64 format
            - formats supports include Data URI Scheme.
      additionalProperties: false
    CombinedValidatePassportAndPhotoWithLivenessResponse:
      type: object
      properties:
        CRef:
          title: Client Reference
          type: string
          description: >-
            This field will return the reference provided by the client to track
            the transaction.
          format: string
          nullable: true
        Status:
          $ref: '#/components/schemas/ExternalStatusEnums'
        Message:
          title: Message
          type: string
          description: >-
            This will return a status of the transaction s well as external
            tracking information.
          format: string
          nullable: true
        result:
          title: Result
          type: boolean
          description: This will indicate whether the validation was successful.
        result_code:
          $ref: '#/components/schemas/ResultCode'
        response_object:
          $ref: '#/components/schemas/AdvancedPlusLookupObject'
        FaceResult:
          $ref: '#/components/schemas/VerifyResult'
        LivenessResult:
          $ref: '#/components/schemas/IDRNDParialResponse'
        IsWalletCreated:
          title: IsWalletCreated
          type: boolean
          description: >-
            Is wallet created. Only true when all validations pass and a wallet
            is created.
      additionalProperties: false
    ExternalStatusEnums:
      title: Status
      enum:
        - Success
        - Failure
        - Unknown
        - AuthFailure
        - DataDeserializationError
        - EmptyResults
        - ErrorContactSupport
        - FaceDetectionFailure
        - FaceComparisonFailure
        - NoStatusDefined
        - FaceDetectionQualityTooLow
        - FaceDetectionTooManyFaces
        - FaceDetectionNoFacesFound
        - FaceComparisonError
        - FaceComparisonNotSame
        - GoldenSourceImageNull
        - ProvidedImageNull
        - GoldenSourceNoFacesFound
        - ProvidedImageNoFacesFound
        - GoldenSourceHasTooManyFaces
        - ProvidedImageHasTooManyFaces
        - GoldenSourceQualityTooLow
        - ProvidedImageQualityTooLow
        - GoldenSourceGUIDIncorrect
        - ProvidedImageGUIDIncorrect
        - FaceAPIGeneralError
        - FaceAPIPublicUrlInputError
        - FaceBadInput
        - GoldenSourceIncorrectStringFormat
        - ProvidedImageIncorrectStringFormat
        - SAFPSNPROk
        - SAFPSHANISOk
        - SAFPSNIISOk
        - SAFPSNPRSlow
        - SAFPSHANISSlow
        - SAFPSNIISSlow
        - SAFPSFailure
        - SAFPSPossibleFailure
        - SAFPSNPRFailure
        - SAFPSHANISFailure
        - SAFPSNIISFailure
        - FaceTooClose
        - EyesClosed
        - FaceCloseToBorder
        - FaceCropped
        - FaceIsOccluded
        - FaceNotFound
        - TooManyFaces
        - FaceTooSmall
        - AbsoluteFaceTooSmall
        - RelativeFaceTooSmall
        - FaceAngleTooLarge
        - FailedToPredictLandmarks
        - Active
        - CSuccess
        - AsyncCSuccess
        - IdentificationNumberInvalid
        - IdentificationNumberAgeBelow18
        - UnableToVerifyIdentificationNumberOnDocument
        - UnableToVerifyIdentificationNumberAtGoldenSource
        - GoldenSourceUnavailable
        - MandatoryInformationMissing
        - NPRSuccess
        - HANISNotAvailable
        - InvalidIDNCheckDigitTestNotPassed
        - NPRNotAvailableOnlyPhotoIsReturned
        - IDNRIsNotCurrentlyAValidNPRIDNR
        - IDNRIsMarkedForDeletion
      type: string
      description: >-
        Status values (static strings) to be used for external connection
        management
      format: string
    ResultCode:
      type: object
      properties:
        name:
          title: ID Name
          type: string
          description: The name extracted from the identity document provided.
          nullable: true
        id:
          title: ID number
          type: integer
          description: >-
            The identity document number extracted from the identity document
            provided.
          format: int32
      additionalProperties: false
    AdvancedPlusLookupObject:
      type: object
      properties:
        ocr_result:
          $ref: '#/components/schemas/OcrResult'
      additionalProperties: false
    VerifyResult:
      type: object
      properties:
        isIdentical:
          type: boolean
        confidence:
          type: number
          format: double
      additionalProperties: false
    IDRNDParialResponse:
      type: object
      properties:
        LivenessResultScore:
          title: Liveness Result Score
          type: number
          description: >-
            This is the raw liveness score generated by the system. It's an
            unbounded linear value where higher scores indicate a greater
            likelihood that the input (e.g., a face) is from a live person. This
            score is primarily used for calibration and tuning purposes, such as
            adjusting the system's sensitivity to false positives or negatives.
          format: double
        LivenessResultProbability:
          title: Liveness Result Probability
          type: number
          description: >-
            This represents the system's calculated probability that the input
            is from a live person, expressed as a value between 0 and 1. A value
            greater than 0.5 typically indicates a live input, while a value
            below 0.5 suggests a spoof or fake. This probability is the main
            metric used to make liveness decisions.
          format: double
        LivenessResultQuality:
          title: Liveness Result Quality
          type: number
          description: >-
            This field assesses the quality of the input image in the context of
            liveness detection. The quality score ranges from 0 (poor quality)
            to 1 (high quality). A score below 0.5 generally indicates that the
            image is unsuitable for reliable liveness analysis. Note that in
            some contexts, this field may be deprecated in favor of more
            detailed image quality warnings.
          format: double
        LivenessResultClass:
          title: Liveness Result Class
          type: boolean
          description: >-
            This field classifies the input based on its suitability for
            liveness detection. For example, a value of 1 might indicate a
            good-quality image suitable for analysis, while 0 could denote a
            poor-quality image. However, this field is considered obsolete in
            some versions of the model, with a recommendation to use the quality
            score instead.
        LivenessPassResult:
          title: Liveness Pass Result
          type: boolean
          description: >-
            This boolean field indicates whether the liveness check was passed.
            A value of true means the input was determined to be live, while
            false indicates a failure in the liveness check. This is a
            straightforward pass/fail result based on the system's analysis.
          readOnly: true
        LivenessMessage:
          title: Liveness Message
          type: string
          description: >-
            This field likely provides a textual message or status related to
            the liveness check, such as "Live," "Spoof," or "Invalid." It offers
            a human-readable interpretation of the liveness result, which can be
            useful for logging or user feedback.
          nullable: true
          readOnly: true
      additionalProperties: false
    OcrResult:
      type: object
      properties:
        document_number:
          title: Document Number
          type: string
          description: The number associated with the document
          nullable: true
        validation_passed:
          title: Validation Passed
          type: string
          description: Whether or not the validation was successful
          nullable: true
        comparison_field_list:
          title: Comparison Field List
          type: array
          items:
            $ref: '#/components/schemas/ComparisonFieldList'
          description: >-
            This will return a list of all the fields in which a comparison was
            made
          nullable: true
        image_list:
          title: Image List
          type: array
          items:
            $ref: '#/components/schemas/ImageList'
          description: a list of information related to the images provided by the client.
          nullable: true
      additionalProperties: false
    ComparisonFieldList:
      type: object
      properties:
        field_name:
          title: Field Name
          type: string
          description: Name of the field
          nullable: true
        mrz_value:
          title: MRZ Value
          type: string
          description: >-
            The MRZ value zone located at the bottom, which can only be
            deciphered by a machine.
          nullable: true
        visual_zone_value:
          title: Visual Zone Value
          type: string
          description: >-
            This indicates the value of the personal data in the Visual Zone
            as�captured by machine.
          nullable: true
        barcode_value:
          title: Barcode Value
          description: This indicates the value of the barcode.
          nullable: true
        mrz_visual_match_ind_tristate:
          title: MRZ Visual Match
          type: string
          description: Machine readable zone match indication.
          nullable: true
        visual_barcode_match_ind_tristate:
          title: Value of Barcode
          type: string
          description: Visual barcode match indication.
          nullable: true
        mrz_barcode_match_ind_tristate:
          title: MRZ Match
          type: string
          description: Machine readable zone match indication.
          nullable: true
        valid_ind_tristate:
          title: Valid Indication
          type: string
          description: An indication that the match is valid
          nullable: true
      additionalProperties: false
    ImageList:
      type: object
      properties:
        image_name:
          title: Image Name
          type: string
          description: Name associated with image
          nullable: true
        base64_image:
          title: Base64 String
          type: string
          description: The Base64 string of the image
          nullable: true
        document_category:
          title: Document Category
          type: string
          description: Object representing the category of the document
          nullable: true
        document_type:
          title: Document Type
          type: string
          description: Object representing the type of document
          nullable: true
        raw_mrz:
          title: Raw MRZ
          type: string
          description: The raw Machine readable zone data
          nullable: true
        authenticity_check_list:
          $ref: '#/components/schemas/AuthenticityCheckList'
      additionalProperties: false
    AuthenticityCheckList:
      type: object
      properties:
        List:
          $ref: '#/components/schemas/List'
      additionalProperties: false
    List:
      type: object
      properties:
        List:
          type: array
          items:
            $ref: '#/components/schemas/CheckListProps'
          nullable: true
      additionalProperties: false
    CheckListProps:
      type: object
      properties:
        Type:
          type: integer
          format: int32
        Result:
          type: integer
          format: int32
        List:
          type: array
          items:
            $ref: '#/components/schemas/InnerList'
          nullable: true
      additionalProperties: false
    InnerList:
      type: object
      properties:
        ElementType:
          type: integer
          format: int32
        ElementRect:
          $ref: '#/components/schemas/ElementRect'
        Type:
          type: integer
          format: int32
        ElementResult:
          type: integer
          format: int32
        ElementDiagnose:
          type: integer
          format: int32
      additionalProperties: false
    ElementRect:
      type: object
      properties:
        left:
          type: integer
          format: int32
        top:
          type: integer
          format: int32
        right:
          type: integer
          format: int32
        bottom:
          type: integer
          format: int32
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://sts.uat.securecitizen.cloud/connect/authorize
          tokenUrl: https://sts.uat.securecitizen.cloud/connect/token
          scopes:
            sc-citizen: SecureCitizen.Citizen.Api

````