# SPIDX API Specification

## createUserDemand

> This method returns a dynamic link for sharing attributes already stored in the device using SPIDX.

```json
{"openapi":"3.0.1","info":{"title":"SPIDX API Specification","version":"1.13.0"},"servers":[{"url":"http://<ip>:8090","description":"Generated server url"}],"paths":{"/checkid":{"post":{"description":"This method returns a dynamic link for sharing attributes already stored in the device using SPIDX.","operationId":"createUserDemand","summary":"createUserDemand","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"CreateRequisitionRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BiometricDemand"}}},"BiometricDemand":{"type":"object","properties":{"securityLevel":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"biometricFields":{"type":"array","items":{"type":"string","enum":["FACE","FINGERPRINT","FULL_NAME","DATE_OF_BIRTH","PERSONAL_EMAIL","WORK_EMAIL","OTHER_EMAIL","ADDRESS","COUNTRY","GENDER","NATIONALITY","MOBILE_NUMBER"]}},"otc":{"type":"integer","format":"int32"},"notificationEndpoint":{"type":"string"},"organizationName":{"type":"string"},"callback":{"type":"string"},"userEmail":{"type":"string"},"keyIdentifier":{"$ref":"#/components/schemas/KeyIdentifier"},"qualityThreshold":{"type":"integer","format":"int32"}}},"KeyIdentifier":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"CreateRequisitionResponse":{"type":"object","properties":{"transactionID":{"$ref":"#/components/schemas/GUID"},"dynamicLink":{"type":"string"},"status":{"type":"string","enum":["AWAITING_DATA_COLLECTION","DATA_COLLECTED","FINISHED","DENIED","ERROR"]}}},"GUID":{"type":"object","properties":{"guid":{"type":"string"}}},"InternalError":{"type":"object","properties":{"type":{"type":"string","enum":["INTERNAL_ERROR"]},"code":{"type":"string"},"message":{"type":"string"},"meta":{"type":"object"}}}}}}
```

## collectUserDataRequest

> This method returns a dynamic link for real-time capture and sharing of attributes using SPIDX.

```json
{"openapi":"3.0.1","info":{"title":"SPIDX API Specification","version":"1.13.0"},"servers":[{"url":"http://<ip>:8090","description":"Generated server url"}],"paths":{"/checkid/collect":{"post":{"description":"This method returns a dynamic link for real-time capture and sharing of attributes using SPIDX.","operationId":"collectUserDataRequest","summary":"collectUserDataRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateRequisitionResponse"}}}}}}}},"components":{"schemas":{"CreateRequisitionRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BiometricDemand"}}},"BiometricDemand":{"type":"object","properties":{"securityLevel":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"biometricFields":{"type":"array","items":{"type":"string","enum":["FACE","FINGERPRINT","FULL_NAME","DATE_OF_BIRTH","PERSONAL_EMAIL","WORK_EMAIL","OTHER_EMAIL","ADDRESS","COUNTRY","GENDER","NATIONALITY","MOBILE_NUMBER"]}},"otc":{"type":"integer","format":"int32"},"notificationEndpoint":{"type":"string"},"organizationName":{"type":"string"},"callback":{"type":"string"},"userEmail":{"type":"string"},"keyIdentifier":{"$ref":"#/components/schemas/KeyIdentifier"},"qualityThreshold":{"type":"integer","format":"int32"}}},"KeyIdentifier":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"CreateRequisitionResponse":{"type":"object","properties":{"transactionID":{"$ref":"#/components/schemas/GUID"},"dynamicLink":{"type":"string"},"status":{"type":"string","enum":["AWAITING_DATA_COLLECTION","DATA_COLLECTED","FINISHED","DENIED","ERROR"]}}},"GUID":{"type":"object","properties":{"guid":{"type":"string"}}}}}}
```

## getIdentity

> This method returns the attributes of a transaction, given its GUID.

```json
{"openapi":"3.0.1","info":{"title":"SPIDX API Specification","version":"1.13.0"},"servers":[{"url":"http://<ip>:8090","description":"Generated server url"}],"paths":{"/checkid/{guid}":{"get":{"description":"This method returns the attributes of a transaction, given its GUID.","operationId":"getIdentity","summary":"getIdentity","parameters":[{"name":"guid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBiometricsReponse"}}}},"404":{"description":"transaction does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"GetBiometricsReponse":{"type":"object","properties":{"biometricPackage":{"$ref":"#/components/schemas/BiometricPackage"},"biographicPackage":{"$ref":"#/components/schemas/BiographicPackage"},"userInformation":{"$ref":"#/components/schemas/UserInformation"}}},"BiometricPackage":{"type":"object","properties":{"biometricsGuid":{"type":"string"},"biometricList":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"walletAdress":{"type":"string"}}},"Biometric":{"type":"object","properties":{"content":{"type":"string"},"index":{"type":"integer","format":"int32"},"biometricProperties":{"$ref":"#/components/schemas/BiometricProperties"}}},"BiometricProperties":{"type":"object","properties":{"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"}}},"BiographicPackage":{"type":"object","properties":{"biographicList":{"type":"array","items":{"$ref":"#/components/schemas/Biographic"}}}},"Biographic":{"type":"object","properties":{"type":{"type":"string","enum":["FULL_NAME","DATE_OF_BIRTH","PERSONAL_EMAIL","WORK_EMAIL","OTHER_EMAIL","ADDRESS","COUNTRY","GENDER","NATIONALITY","MOBILE_NUMBER"]},"value":{"type":"string"}}},"UserInformation":{"type":"object","properties":{"spidx":{"type":"string"},"deduplicationStatus":{"type":"string","enum":["ENQUEUED","PROCESSING","ENROLLED","EXCEPTION","FAILED","REFUSED","PENDING"]},"verificationStatus":{"type":"string","enum":["MATCH","NOT_MATCH","NONE"]}}},"ProcessingError":{"type":"object","properties":{"type":{"type":"string","enum":["PROCESSING_ERROR"]},"code":{"type":"string"},"message":{"type":"string"},"meta":{"type":"object"}}},"CreateRequisitionErrorResponse":{"type":"object","properties":{"type":{"type":"string","enum":["PROCESSING_ERROR"]},"code":{"type":"string","enum":["AWAITING_DATA_COLLECTION","DATA_COLLECTED","FINISHED","DENIED","ERROR"]},"message":{"type":"string"}}},"InternalError":{"type":"object","properties":{"type":{"type":"string","enum":["INTERNAL_ERROR"]},"code":{"type":"string"},"message":{"type":"string"},"meta":{"type":"object"}}}}}}
```

## verifyUserDataRequest

> This method returns a dynamic link for real-time capture of biometrics to verify user.

```json
{"openapi":"3.0.1","info":{"title":"SPIDX API Specification","version":"1.13.0"},"servers":[{"url":"http://<ip>:8090","description":"Generated server url"}],"paths":{"/checkid/verify":{"post":{"description":"This method returns a dynamic link for real-time capture of biometrics to verify user.","operationId":"verifyUserDataRequest","summary":"verifyUserDataRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateRequisitionResponse"}}}}}}}},"components":{"schemas":{"CreateRequisitionRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BiometricDemand"}}},"BiometricDemand":{"type":"object","properties":{"securityLevel":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"biometricFields":{"type":"array","items":{"type":"string","enum":["FACE","FINGERPRINT","FULL_NAME","DATE_OF_BIRTH","PERSONAL_EMAIL","WORK_EMAIL","OTHER_EMAIL","ADDRESS","COUNTRY","GENDER","NATIONALITY","MOBILE_NUMBER"]}},"otc":{"type":"integer","format":"int32"},"notificationEndpoint":{"type":"string"},"organizationName":{"type":"string"},"callback":{"type":"string"},"userEmail":{"type":"string"},"keyIdentifier":{"$ref":"#/components/schemas/KeyIdentifier"},"qualityThreshold":{"type":"integer","format":"int32"}}},"KeyIdentifier":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"CreateRequisitionResponse":{"type":"object","properties":{"transactionID":{"$ref":"#/components/schemas/GUID"},"dynamicLink":{"type":"string"},"status":{"type":"string","enum":["AWAITING_DATA_COLLECTION","DATA_COLLECTED","FINISHED","DENIED","ERROR"]}}},"GUID":{"type":"object","properties":{"guid":{"type":"string"}}}}}}
```
