@@ -20,15 +20,70 @@ source venv/bin/activate
2020make test
2121```
2222
23- ## Create Identity
23+ ## Create Verification
2424
2525``` python
2626from mati import Client
2727
28- client = Client()
29- georg = client.identities.create(
30- name = ' Georg Wilhelm Friedrich Hegel' ,
31- occupation = ' Philosopher' ,
32- dob = ' 1770-08-27'
28+ client = Client(' api_key' , ' secret_key' )
29+ verification = client.verifications.create(
30+ ' some_flow_id' ,
31+ company_id = ' some_id' ,
3332)
3433```
34+
35+ ## Upload documents
36+ ``` python
37+ from mati.types import (
38+ PageType,
39+ UserValidationFile,
40+ ValidationInputType,
41+ ValidationType,
42+ )
43+
44+ # Load documents
45+ front = open (' ine_front.jpg' , ' rb' )
46+ back = open (' ine_back.jpg' , ' rb' )
47+ live = open (' liveness.mp4' , ' rb' )
48+
49+ # Create document with metadata
50+ user_validation_file = UserValidationFile(
51+ filename = ' ine_front.jpg' ,
52+ content = front,
53+ input_type = ValidationInputType.document_photo,
54+ validation_type = ValidationType.national_id,
55+ country = ' MX' ,
56+ group = 0 , # The group is important when create your metamap
57+ )
58+ user_validation_file_back = UserValidationFile(
59+ filename = ' ine_back.jpg' ,
60+ content = back,
61+ input_type = ValidationInputType.document_photo,
62+ validation_type = ValidationType.national_id,
63+ country = ' MX' ,
64+ page = PageType.back,
65+ group = 0 ,
66+ )
67+ user_validation_live = UserValidationFile(
68+ filename = ' liveness.MOV' ,
69+ content = live,
70+ input_type = ValidationInputType.selfie_video,
71+ group = 1 ,
72+ )
73+
74+ # Send documentation for validation
75+ resp = client.verifications.upload_validation_data(
76+ [
77+ user_validation_file,
78+ user_validation_file_back,
79+ user_validation_live,
80+ ],
81+ verification.identity,
82+ )
83+ ```
84+
85+ ## Verification status
86+ Retrieve the verification when its complete
87+ ``` python
88+ verification = client.verifications.retrieve(' verification_id' )
89+ ```
0 commit comments