> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/framework-plugins/extras/selphid/selphid-resultado.md).

# Selphid Result

The possible fields returned in the result are as follows:

#### finishStatus

Returns a number representing the result of the operation. Possible values:

* **1**: The operation was successful.
* **2**: An error occurred, which will be indicated in the string ***`errorType`*** and, optionally, an additional information message will be displayed in the ***`errorMessage`***.

#### finishStatusDescription

Returns a description of the result of the operation. Possible values:

* **STATUS\_OK**: The operation was successful.
* **STATUS\_ERROR**: An error occurred, which will be indicated in the string ***`errorType(errorDiagnostic para Flutter)`*** and, optionally, an additional information message will be displayed in the ***`errorMessage`***.

#### errorType or errorDiagnostic (only for Flutter) <a href="#id-61-recepcion-de-errores" id="id-61-recepcion-de-errores"></a>

Indicates why the component failed. Possible values:

On iOS, the `errorType` received from the SDK during a timeout may be `SDK_TIMEOUT` or `SELPHID_TIMEOUT(UIImage?, UIImage?)`. There is no `TIMEOUT` case without a prefix on iOS. The `SELPHID_TIMEOUT` case retains, when available, the raw document images captured before the timeout (`UIImage?` associated with the enum, not fields in the success result). Hybrid integrations should not use the internal Swift enum name as a response contract.

To serialize the error on iOS, use:

```swift
errorType.toString(addComponentPrefix: "SPD_")
```

This returns `SPD_TIMEOUT` for both `SDK_TIMEOUT` and `SELPHID_TIMEOUT`. On Android, the equivalent error-list value is `TIMEOUT` (without a prefix).

For an iOS timeout:

* `finishStatus` is `STATUS_ERROR`
* `data` is `nil` (no `frontDocument`, `ocrResults`, etc.)
* Raw images, if any, are in the associated value of `SELPHID_TIMEOUT`, not in `data`

{% content-ref url="/pages/43986144f280860ca43439e85e910470d97ff251" %}
[Selphid - Error List](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/framework-plugins/extras/selphid/selphid-listado-de-errores.md)
{% endcontent-ref %}

#### errorMessage

Indicates an additional error message. This is an optional value.

#### **frontDocument / tokenFrontDocument:**

The processed front image of the document, cleaned and cropped to the edges, and its corresponding token.

#### **backDocument / tokenBackDocument**

The processed back image of the document, cleaned and cropped to the edges, and its associated token.

#### **faceImage / tokenFaceImage**

The image of the face found in the document, if any, and its associated token.

Valid for the FACIAL MATCHING process.

#### **documentCaptured**

This property indicates the document model that was captured when performing a search in SMSearch mode. This allows the application to determine which model, among all permitted models, was detected.

#### **matchingSidesScore**

This property returns a calculation of the similarity between the data read from the front and back of the document. The calculation compares the similarity between the common fields read on both sides. If the document contains common fields, the result is a value between 0.0 and 1.0. The higher the value, the more similar the compared data. If the calculation returns -1.0, the document contains no common fields or information from both sides is not yet available.

**captureProgress property**

This property returns the state of the capture process when the widget completed successfully (`STATUS_OK`). On an iOS timeout, `data` is `nil` and this value is not included in the `SdkResult` of the error callback. The possible values are:

```
Front_Detection_None = 0
Front_Detection_Uncertain = 1
Front_Detection_Completed = 2
Front_Document_Analyzed = 3
Back_Detection_None = 4
Back_Detection_Uncertain = 5
Back_Detection_Completed = 6
Back_Document_Analyzed = 7
```

* **0**: During front-side reading, the widget finished without detecting anything. This usually happens when no document is presented.
* **1**: During front-side reading, the widget finished after partially detecting a document. In this case, some of the expected elements were detected, but not all the required ones.
* **2**: During front-side reading, the widget finished after detecting all the elements of the document. If the widget ends in this state, the OCR analysis could not be completed successfully.
* **3**: During front-side reading, the widget finished analyzing the document and extracting all its OCR data. This is the state in which a successful front-side document reading would end.

The states from **4** to **7** are exactly the same, except that they refer to the result of the process when the back is analyzed.

#### **ocrResults**

This dictionary contains all the data detected in the document. The keys for each field are encoded so that each key contains information about where the value was obtained. For example, the key `Front/MRZ/DocumentNumber` indicates the DocumentNumber value read from the front of the document in the MRZ region. These keys depend on the captured document and therefore differ between countries and document models. The dictionary also contains keys with more generic names that do not include location information. These keys contain the most complete value read for each field.

These keys are as follows:

* **FirstName**: The value associated with this key contains the user's first name.
* **LastName**: The value associated with this key contains the user's surnames.
* **DateOfBirth**: The value associated with this key contains the date of birth detected in the document.
* **Gender**: The value associated with this key contains the user's gender detected in the document.
* **Nationality**: The value associated with this key contains the user's nationality detected in the document.
* **DocumentNumber**: The value associated with this key contains the document number.
* **DateOfExpiry**: The value associated with this key contains the document's expiration date.
* **Issuer**: The value associated with this key contains the document issuer.
* **DateofIssue**: The value associated with this key contains the document's issue date.
* **PlaceOfBirth**: The value associated with this key contains the user's place of birth.
* **Address**: The value associated with this key contains the address detected in the document.

Additionally, keys from the results object itself are included to make them easier to find:

* **DocumentCaptured**: Value of the document model that was captured, according to the model .xml. Corresponds to the documentCaptured property.
* **MatchingSidesScore**: Value indicating the match between the sides of the document that were read. Corresponds to the matchingSidesScore property.

#### **timeoutDiagnostic**

On Android, this property returns a text string explaining why the Widget timed out. On iOS, the Widget generates this information internally, but the component **does not** expose it in the error `SdkResult` . If `showDiagnostic` is enabled, the timeout message is displayed on the component's own diagnostic screen.

#### **countryCaptured**

Document country.

#### **documentTypeCaptured**

Document type. Corresponds to those in section 5.1.10.

#### **personalData**

Reduced set of data obtained from the user:

* issuer
* documentNumber
* issueDate
* expiryDate
* name
* surname
* fullName
* gender
* birthDate
* birthPlace
* nationality
* address
* nfcKey
* numSupport
* MRZ

***
