{
 "openapi": "3.0.4",
 "info": {
  "title": "Documents and Biometrics Endpoints Overview",
  "description": "GBG's Documents and Biometrics Core is our RESTful API offering for GBG's core document verification services including Document Verification, Passive Liveness, and Facematch. These API's empower our customers to have complete control of their desired user experience and user interfaces. Documents and Biometrics Core services allows our Customers to make decisions that best suit their business needs. Customers have full control over how they build their business logic and how they interpret the API results. These are built with a strong emphasis on scalability, enabling our customers to scale as quickly as they need to achieve their business goals. Documents and Biometrics is perfectly positioned to enable our customer's onboarding success.",
  "version": "2.0.0"
 },
 "paths": {
  "/FaceMatch": {
   "post": {
    "tags": [
     "FaceMatch"
    ],
    "summary": "Determines the similarity score between two facial biometric images.",
    "description": "The Documents and Biometrics Core FaceMatch Service endpoint allows for two portrait images(selfie/face images) to be uploaded for comparison against each other. The endpoint will return a result after processing.The score is a value between 0 and 1, where score value of 0.8 or above is considered a `Matched` result, and score below 0.8 is a `Not Matched` result.",
    "parameters": [
     {
      "name": "x-correlation-id",
      "in": "header",
      "description": "Correlation Id for the request",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "FirstFaceImage": {
          "type": "string",
          "description": "First face image to be matched.",
          "format": "binary"
         },
         "SecondFaceImage": {
          "type": "string",
          "description": "Second face image to be matched.",
          "format": "binary"
         },
         "AdditionalData": {
          "type": "object",
          "additionalProperties": {
           "type": "string",
           "nullable": true
          },
          "description": "Key value pair for request configurations, for any additional data to be passed."
         },
         "RequestId": {
          "type": "string",
          "readOnly": true
         },
         "CorrelationId": {
          "type": "string",
          "readOnly": true
         }
        }
       },
       "encoding": {
        "FirstFaceImage": {
         "style": "form"
        },
        "SecondFaceImage": {
         "style": "form"
        },
        "AdditionalData": {
         "style": "form"
        },
        "RequestId": {
         "style": "form"
        },
        "CorrelationId": {
         "style": "form"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Returns a success on the Endpoint after processing the submitted facial images.This code does not\nindicate a success on the validation of the facial images themselves but rather a success on the call to the\nEndpoint. The face match result is in the response body (See Response Body section below).",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       }
      }
     },
     "400": {
      "description": "Error with the provided parameters, please, check the response provided to get more insights on\nthe problem.",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error during our processing, please, get in touch with support so we can help you.",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/FaceMatch/Id": {
   "post": {
    "tags": [
     "FaceMatch"
    ],
    "summary": "Determines the similarity score between two facial biometric images, with provided image ids, where images are stored in cache/store.",
    "description": "The Documents and Biometrics Core FaceMatch Service endpoint allows for two portrait image ids(selfie/face images) to be uploaded for comparison against each other. The endpoint will return a result after processing.The score is a value between 0 and 1, where score value of 0.8 or above is considered a `Matched` result, and score below 0.8 is a `Not Matched` result.",
    "parameters": [
     {
      "name": "x-correlation-id",
      "in": "header",
      "description": "Correlation Id for the request",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "FirstFaceImageId": {
          "type": "string",
          "description": "Image id of the first face image to be matched."
         },
         "SecondFaceImageId": {
          "type": "string",
          "description": "Image id of the second face image to be matched."
         },
         "AdditionalData": {
          "type": "object",
          "additionalProperties": {
           "type": "string",
           "nullable": true
          },
          "description": "Key value pair for request configurations, for any additional data to be passed."
         },
         "RequestId": {
          "type": "string",
          "readOnly": true
         },
         "CorrelationId": {
          "type": "string",
          "readOnly": true
         }
        }
       },
       "encoding": {
        "FirstFaceImageId": {
         "style": "form"
        },
        "SecondFaceImageId": {
         "style": "form"
        },
        "AdditionalData": {
         "style": "form"
        },
        "RequestId": {
         "style": "form"
        },
        "CorrelationId": {
         "style": "form"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Returns a success on the Endpoint after processing the submitted facial images.This code does not\nindicate a success on the validation of the facial images themselves but rather a success on the call to the\nEndpoint. The face match result is in the response body (See Response Body section below).",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/FaceMatchResponse"
        }
       }
      }
     },
     "400": {
      "description": "Error with the provided parameters, please, check the response provided to get more insights on\nthe problem.",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error during our processing, please, get in touch with support so we can help you.",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "ErrorResponse": {
    "type": "object",
    "properties": {
     "correlationId": {
      "type": "string",
      "nullable": true,
      "readOnly": true
     },
     "errorMessage": {
      "type": "string",
      "nullable": true
     },
     "errors": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "FaceMatchResponse": {
    "type": "object",
    "properties": {
     "correlationId": {
      "type": "string",
      "nullable": true,
      "readOnly": true
     },
     "score": {
      "type": "number",
      "description": "Matching score of the query faces.",
      "format": "float"
     },
     "result": {
      "type": "string",
      "description": "Result of the match. Sets value of Matched,  or Not Matched.",
      "nullable": true
     },
     "additionalDetails": {
      "type": "object",
      "additionalProperties": {
       "type": "string",
       "nullable": true
      },
      "description": "Any additional details in key value pair.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Response of the face match service."
   }
  },
  "securitySchemes": {
   "Bearer": {
    "type": "http",
    "description": "JWT Authorization header using the Bearer scheme.",
    "scheme": "bearer"
   }
  }
 },
 "security": [
  {
   "Bearer": []
  }
 ],
 "tags": [
  {
   "name": "FaceMatch"
  }
 ]
}
