Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 175 additions & 56 deletions enveloped-application.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
"$ref": "#/components/schemas/ResultMetadata"
},
"application": {
"$ref": "#/components/schemas/Application"
"$ref": "#/components/schemas/ResultApplication"
},
"verificationTypes": {
"$ref": "#/components/schemas/VerificationTypes"
Expand All @@ -282,65 +282,45 @@
"description": "The data to verify",
"properties": {
"fields": {
"$ref": "#/components/schemas/Fields"
},
"documents": {
"type": "array",
"description": "Data fields to check.\n\nFor example: Last Name and Date of Birth sent from web form\n",
"description": "Documents for data extraction or cross-checking",
"items": {
"$ref": "#/components/schemas/Field"
},
"example": [
{
"contentType": "string",
"category": "First name",
"content": "Artem"
},
{
"contentType": "string",
"category": "Last name",
"content": "Gerus"
},
{
"contentType": "sex",
"category": "Sex",
"content": "male"
},
{
"contentType": "bool",
"category": "Agree on something",
"content": "true"
"$ref": "#/components/schemas/Document"
}
},
"selfie": {
"description": "Media required for `face-matching`",
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FacesMedia"
}
}
]
},
"required": [
"files"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"ResultApplication": {
"type": "object",
"description": "The data to verify",
"properties": {
"fields": {
"$ref": "#/components/schemas/Fields"
},
"documents": {
"type": "array",
"description": "Documents for data extraction or cross-checking",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "document id (filled automatically when missing)"
},
"issuingCountry": {
"type": "string",
"description": "The code of the country of issue\n([alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nor [alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements))\n",
"pattern": "^[a-zA-Z]{2,3}$",
"example": "JPN"
},
"documentType": {
"$ref": "#/components/schemas/DocumentType"
},
"files": {
"description": "Document photos or scans",
"type": "array",
"items": {
"$ref": "#/components/schemas/DocumentMedia"
}
}
},
"required": [
"files"
],
"additionalProperties": false
"$ref": "#/components/schemas/ResultDocument"
}
},
"selfie": {
Expand All @@ -349,7 +329,7 @@
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FacesMedia"
"$ref": "#/components/schemas/ResultFacesMedia"
}
}
},
Expand All @@ -361,6 +341,93 @@
},
"additionalProperties": false
},
"Fields": {
"type": "array",
"description": "Data fields to check.\n\nFor example: Last Name and Date of Birth sent from web form\n",
"items": {
"$ref": "#/components/schemas/Field"
},
"example": [
{
"contentType": "string",
"category": "First name",
"content": "Artem"
},
{
"contentType": "string",
"category": "Last name",
"content": "Gerus"
},
{
"contentType": "sex",
"category": "Sex",
"content": "male"
},
{
"contentType": "bool",
"category": "Agree on something",
"content": "true"
}
]
},
"Document": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "document id (filled automatically when missing)"
},
"issuingCountry": {
"type": "string",
"description": "The code of the country of issue\n([alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nor [alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements))\n",
"pattern": "^[a-zA-Z]{2,3}$",
"example": "JPN"
},
"documentType": {
"$ref": "#/components/schemas/DocumentType"
},
"files": {
"description": "Document photos or scans",
"type": "array",
"items": {
"$ref": "#/components/schemas/DocumentMedia"
}
}
},
"required": [
"files"
],
"additionalProperties": false
},
"ResultDocument": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "document id (filled automatically when missing)"
},
"issuingCountry": {
"type": "string",
"description": "The code of the country of issue\n([alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nor [alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements))\n",
"pattern": "^[a-zA-Z]{2,3}$",
"example": "JPN"
},
"documentType": {
"$ref": "#/components/schemas/DocumentType"
},
"files": {
"description": "Temporary links to the document photos or scans",
"type": "array",
"items": {
"$ref": "#/components/schemas/ResultDocumentMedia"
}
}
},
"required": [
"files"
],
"additionalProperties": false
},
"Field": {
"type": "object",
"oneOf": [
Expand Down Expand Up @@ -563,7 +630,27 @@
"uri": {
"description": "Data URI of the media\n\nAll common image formats are acceptable.\n\nAcceptable video formats: WebM + VP8, MP4 + AVC\n",
"type": "string",
"example": "data:video/webm;base64,<data>"
"format": "media-data-uri",
"example": "data:video/webm;base64,aGVsbG8="
}
},
"required": [
"uri"
],
"additionalProperties": false
},
"ResultFacesMedia": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "file id (filled automatically when missing)"
},
"uri": {
"description": "Temporary link to the media",
"type": "string",
"format": "uri",
"example": "https://some.site/image.jpeg?t=123"
}
},
"required": [
Expand All @@ -589,9 +676,10 @@
"example": "front"
},
"uri": {
"description": "Data URI of the media",
"description": "Data URI of the media\n\nAll common image formats are acceptable.\n",
"type": "string",
"example": "data:image/png;base64,R0lGODlhDAAMAK..."
"format": "media-data-uri",
"example": "data:image/png;base64,aGVsbG8="
}
},
"required": [
Expand All @@ -600,6 +688,37 @@
],
"additionalProperties": false
},
"ResultDocumentMedia": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "file id (filled automatically when missing)"
},
"kind": {
"type": "string",
"description": "kind of document page",
"enum": [
"front",
"back",
"single-page"
],
"example": "front"
},
"uri": {
"description": "Temporary link to the media",
"type": "string",
"format": "uri",
"example": "https://some.site/image.jpeg?t=123"
}
},
"required": [
"id",
"uri",
"kind"
],
"additionalProperties": false
},
"OverallResult": {
"type": "object",
"description": "Summary verification result (omitted if state is `processing`)",
Expand Down
Loading