# Data Objects

This document describes the data structures and validation rules for objects used in the Lean Disposable API.

## DisposableHolder

Represents the certificate holder's personal information.

The `identificationCode`, `identificationType`, and `identificationCountry` compose the [serial number](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-serial-number) in the certificate.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `firstName` | First name of the holder (UTF-8, max 64 characters) | Yes | See [allowed characters rules](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters) |
| `lastName` | Last name of the holder (UTF-8, max 64 characters) | Yes | See [allowed characters rules](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters) |
| `identificationType` | Type of identification document | Yes | See [`DisposableHolderIdentificationType`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableholderidentificationtype) |
| `identificationCode` | Unique code of the identification document | Yes | See [allowed characters rules](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters) |
| `identificationCountry` | Country where identification was issued | Yes | ISO 3166-1 alpha-2 |
| `birthDate` | Date of birth | No | ISO 8601 `yyyy-MM-dd` (e.g. `1980-01-01`). Other formats are not accepted. |
| `birthCity` | City of birth | No | See [allowed characters rules](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-faq-allowed-characters) |
| `citizenShip` | Citizenship country | No | ISO 3166-1 alpha-2 |


## DisposableContacts

Contact information for OTP delivery.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `email` | Email address of the holder | Yes, if [`otpType=EMAIL`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableotptype) | Valid email format |
| `mobile` | Mobile phone number | Yes, if [`otpType=SMS`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableotptype) or [`otpType=WHATSAPP`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableotptype) | E.164 format with `+` prefix (e.g. `+390000000000`) |


## DisposableDoc

Identity document information.

The entire object is not required:

- if [`DisposableIdentification = AML`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableidentificationtype)
- or `identificationType` in [`DisposableHolder`](#disposableholder) is one of: `PASSPORT`, `PERSONAL_NUMBER`, `NATIONAL_IDENTITY_CARD`, `DRIVING_LICENSE`, `RESIDENCE_PERMIT`, `RESIDENCE_PERMIT_TEMP`, `EMBASSY_DOCUMENT`


The `documentNr`, `documentType`, and `documentIssuerCountry` identify the type of document that the user shows at the time of recognition.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `documentType` | Identity document type | Yes | See values below |
| `documentNr` | Document number | Yes | — |
| `documentIssuer` | Entity that issued the document | No | — |
| `documentIssuerDate` | Date on which the document was issued | Yes | `YYYY-MM-DD` |
| `documentExpirationDate` | Date on which the document expires | Yes | `YYYY-MM-DD` |
| `documentIssuerCountry` | Country where document was issued | Yes | ISO 3166-1 alpha-2 |


#### documentType values

| Value | Description |
|  --- | --- |
| `CI` | National identity card |
| `PASS` | Passport |
| `PA` | Driving license |
| `RP` | Residence permit |
| `CIE` | National Electronic Identity Card |
| `RT` | Temporary residence permit |
| `DC` | Documents for embassy/consulate personnel |
| `AT` | Other |


## DisposableCertificate

Certificate configuration and credentials.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `password` | Certificate PIN | Yes | 8–32 characters, `[A-Za-z0-9]` |
| `securityCode` | Certificate security code | Yes | 8–32 characters, `[A-Za-z0-9]` |
| `type` | Disposable certificate type | Yes | See [`DisposableType`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposabletype) |
| `otpType` | OTP delivery method | No | See [`DisposableOtpType`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableotptype). Default: `SMS` |
| `fullData` | Enroll with full profile | No | Boolean. Default: `false` |
| `withoutUsageLimitLRA` | Omit LRA limitation of use (LoU) | No | Boolean. Default: `false` |
| `transactionLimit` | Transaction value limits for which the certificate can be used | No | See [`transactionLimit` object](#transactionlimit-object) |
| `limitationOfUse` | Language of the LoU text | No | `language`: ISO 639-1 alpha-2. If not specified, the default text is used. |


In some enroll methods the `type` value may be overridden by the method itself.

#### transactionLimit object

| Field | Description | Required |
|  --- | --- | --- |
| `value` | Transaction limit amount | Yes |
| `currency` | Currency code | Yes |


## DisposableIdentification

Identification method.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `identificationType` | Identification method type | Yes | See [`DisposableIdentificationType`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposableidentificationtype) |


## DisposableAddress

Address information for the certificate holder.

| Field | Description | Required |
|  --- | --- | --- |
| `country` | Country | Yes |
| `province` | Province | Yes |
| `city` | City | Yes |
| `ccat` | Cadastral code | No |
| `street` | Street address | Yes |
| `zip` | Zip/Postal code | Yes |


## DisposableeIDAssertionHolder

eID assertion information for eID-based enrollment.

| Field | Description | Required | Validation Rules |
|  --- | --- | --- | --- |
| `country` | Country of eID | Yes | ISO 3166-1 alpha-2 |
| `eIDType` | Type of eID | Yes | See [authorized eID types](/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-ig-eid-identification) |
| `assertion` | Assertion string | Yes | Base64 encoded |


## DisposableIssued

Response object returned by enrollment methods.

| Field | Description |
|  --- | --- |
| `cert` | The issued certificate |
| `certIdOtp` | OTP identifier associated with the certificate |
| `certType` | Type of certificate issued. See [`DisposableType`](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enum-types#disposabletype) |
| `certSerialNumber` | Serial number of the issued certificate |
| `certUsageLimit` | Limitation of use (LoU) in the certificate |
| `deviceCode` | Device code of the issued certificate |